diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index ddd982fa9c..a4fa976773 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -3169,6 +3169,46 @@ gst_player_set_uri (GstPlayer * self, const gchar * val) g_object_set (self, "uri", val, NULL); } +/** + * gst_player_set_subtitle_uri: + * @player: #GstPlayer instance + * @uri: subtitle URI + * + * Returns: %TRUE or %FALSE + * + * Sets the external subtitle URI. + */ +gboolean +gst_player_set_subtitle_uri (GstPlayer * self, const gchar * suburi) +{ + g_return_val_if_fail (GST_IS_PLAYER (self), FALSE); + + g_object_set (self, "suburi", suburi, NULL); + + return TRUE; +} + +/** + * gst_player_get_subtitle_uri: + * @player: #GstPlayer instance + * + * current subtitle URI + * + * Returns: (transfer full): URI of the current external subtitle. + * g_free() after usage. + */ +gchar * +gst_player_get_subtitle_uri (GstPlayer * self) +{ + gchar *val = NULL; + + g_return_val_if_fail (GST_IS_PLAYER (self), NULL); + + g_object_get (self, "suburi", &val, NULL); + + return val; +} + /** * gst_player_get_position: * @player: #GstPlayer instance @@ -3548,46 +3588,6 @@ gst_player_set_subtitle_track_enabled (GstPlayer * self, gboolean enabled) GST_DEBUG_OBJECT (self, "track is '%s'", enabled ? "Enabled" : "Disabled"); } -/** - * gst_player_set_subtitle_uri: - * @player: #GstPlayer instance - * @uri: subtitle URI - * - * Returns: %TRUE or %FALSE - * - * Sets the external subtitle URI. - */ -gboolean -gst_player_set_subtitle_uri (GstPlayer * self, const gchar * suburi) -{ - g_return_val_if_fail (GST_IS_PLAYER (self), FALSE); - - g_object_set (self, "suburi", suburi, NULL); - - return TRUE; -} - -/** - * gst_player_get_subtitle_uri: - * @player: #GstPlayer instance - * - * current subtitle URI - * - * Returns: (transfer full): URI of the current external subtitle. - * g_free() after usage. - */ -gchar * -gst_player_get_subtitle_uri (GstPlayer * self) -{ - gchar *val = NULL; - - g_return_val_if_fail (GST_IS_PLAYER (self), NULL); - - g_object_get (self, "suburi", &val, NULL); - - return val; -} - /** * gst_player_set_visualization: * @player: #GstPlayer instance diff --git a/gst-libs/gst/player/gstplayer.h b/gst-libs/gst/player/gstplayer.h index 41fe267221..e51d8c5c7c 100644 --- a/gst-libs/gst/player/gstplayer.h +++ b/gst-libs/gst/player/gstplayer.h @@ -118,6 +118,10 @@ gchar * gst_player_get_uri (GstPlayer * player); void gst_player_set_uri (GstPlayer * player, const gchar * uri); +gchar * gst_player_get_subtitle_uri (GstPlayer * player); +gboolean gst_player_set_subtitle_uri (GstPlayer * player, + const gchar *uri); + GstClockTime gst_player_get_position (GstPlayer * player); GstClockTime gst_player_get_duration (GstPlayer * player); @@ -160,10 +164,6 @@ GstPlayerVideoInfo * gst_player_get_current_video_track GstPlayerSubtitleInfo * gst_player_get_current_subtitle_track (GstPlayer * player); -gboolean gst_player_set_subtitle_uri (GstPlayer * player, - const gchar *uri); -gchar * gst_player_get_subtitle_uri (GstPlayer * player); - gboolean gst_player_set_visualization (GstPlayer * player, const gchar *name);