diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-08-23 14:32:24 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-08-23 15:02:19 +0300 |
commit | a0f6105204f3fa75c8d693635d8dc3b8ffc26ab6 (patch) | |
tree | 481e3148ab2f86d088a0ada1036eec84d97b9468 | |
parent | 26c7ca4c24fdad9b599b7c68adee036e20c07ef1 (diff) |
player: Move subtitle URI setter next to the uri setter
It's confusing to have them a couple of hundred lines apart.
-rw-r--r-- | gst-libs/gst/player/gstplayer.c | 80 | ||||
-rw-r--r-- | gst-libs/gst/player/gstplayer.h | 8 |
2 files changed, 44 insertions, 44 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index ddd982fa9..a4fa97677 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -3170,6 +3170,46 @@ gst_player_set_uri (GstPlayer * self, const gchar * val) } /** + * 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 * @@ -3549,46 +3589,6 @@ gst_player_set_subtitle_track_enabled (GstPlayer * self, gboolean enabled) } /** - * 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 * @name: visualization element obtained from diff --git a/gst-libs/gst/player/gstplayer.h b/gst-libs/gst/player/gstplayer.h index 41fe26722..e51d8c5c7 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); |