From b53972a5cb98830b2ed837a8b74c6b3750e3a330 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 Jan 2016 09:52:47 +0200 Subject: [PATCH] player: Remove gst_player_new() and make gst_player_new_full() the normal constructor In very few cases the simple version was actually needed and having the parameters hidden by a _full() version caused application that actually needed it to not use it. --- docs/libs/gst-plugins-bad-libs-sections.txt | 1 - gst-libs/gst/player/gstplayer.c | 13 +------------ gst-libs/gst/player/gstplayer.h | 3 +-- tests/check/libs/player.c | 8 ++++---- win32/common/libgstplayer.def | 1 - 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt index 84c435e..c672555 100644 --- a/docs/libs/gst-plugins-bad-libs-sections.txt +++ b/docs/libs/gst-plugins-bad-libs-sections.txt @@ -1445,7 +1445,6 @@ gst_videoaggregator_pad_get_type GstPlayer gst_player_new -gst_player_new_full gst_player_play gst_player_pause diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index 94892b7..78f36d5 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -2491,17 +2491,6 @@ gst_player_init_once (G_GNUC_UNUSED gpointer user_data) /** * gst_player_new: - * - * Returns: a new #GstPlayer instance - */ -GstPlayer * -gst_player_new (void) -{ - return gst_player_new_full (NULL, NULL); -} - -/** - * gst_player_new_full: * @video_renderer: (transfer full) (allow-none): GstPlayerVideoRenderer to use * @signal_dispatcher: (transfer full) (allow-none): GstPlayerSignalDispatcher to use * @@ -2516,7 +2505,7 @@ gst_player_new (void) * Returns: a new #GstPlayer instance */ GstPlayer * -gst_player_new_full (GstPlayerVideoRenderer * video_renderer, +gst_player_new (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher) { static GOnce once = G_ONCE_INIT; diff --git a/gst-libs/gst/player/gstplayer.h b/gst-libs/gst/player/gstplayer.h index 29287bd..3391b0f 100644 --- a/gst-libs/gst/player/gstplayer.h +++ b/gst-libs/gst/player/gstplayer.h @@ -97,8 +97,7 @@ const gchar *gst_player_color_balance_type_get_name (GstPlayerColorBalanceType GType gst_player_get_type (void); -GstPlayer * gst_player_new (void); -GstPlayer * gst_player_new_full (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher); +GstPlayer * gst_player_new (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher); void gst_player_play (GstPlayer * player); void gst_player_pause (GstPlayer * player); diff --git a/tests/check/libs/player.c b/tests/check/libs/player.c index 0f7a63c..5586e63 100644 --- a/tests/check/libs/player.c +++ b/tests/check/libs/player.c @@ -69,7 +69,7 @@ START_TEST (test_create_and_free) { GstPlayer *player; - player = gst_player_new (); + player = gst_player_new (NULL, NULL); fail_unless (player != NULL); g_object_unref (player); } @@ -81,7 +81,7 @@ START_TEST (test_set_and_get_uri) GstPlayer *player; gchar *uri; - player = gst_player_new (); + player = gst_player_new (NULL, NULL); fail_unless (player != NULL); @@ -101,7 +101,7 @@ START_TEST (test_set_and_get_position_update_interval) GstPlayer *player; guint interval = 0; - player = gst_player_new (); + player = gst_player_new (NULL, NULL); fail_unless (player != NULL); @@ -355,7 +355,7 @@ test_player_new (TestPlayerState * state) GstElement *playbin, *fakesink; player = - gst_player_new_full (NULL, + gst_player_new (NULL, gst_player_g_main_context_signal_dispatcher_new (NULL)); fail_unless (player != NULL); diff --git a/win32/common/libgstplayer.def b/win32/common/libgstplayer.def index c994674..5c5dbe7 100644 --- a/win32/common/libgstplayer.def +++ b/win32/common/libgstplayer.def @@ -42,7 +42,6 @@ EXPORTS gst_player_media_info_get_uri gst_player_media_info_is_seekable gst_player_new - gst_player_new_full gst_player_pause gst_player_play gst_player_seek -- 2.7.4