mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
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.
This commit is contained in:
parent
40b0736dfd
commit
b53972a5cb
5 changed files with 6 additions and 20 deletions
|
@ -1445,7 +1445,6 @@ gst_videoaggregator_pad_get_type
|
||||||
GstPlayer
|
GstPlayer
|
||||||
|
|
||||||
gst_player_new
|
gst_player_new
|
||||||
gst_player_new_full
|
|
||||||
|
|
||||||
gst_player_play
|
gst_player_play
|
||||||
gst_player_pause
|
gst_player_pause
|
||||||
|
|
|
@ -2491,17 +2491,6 @@ gst_player_init_once (G_GNUC_UNUSED gpointer user_data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_player_new:
|
* 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
|
* @video_renderer: (transfer full) (allow-none): GstPlayerVideoRenderer to use
|
||||||
* @signal_dispatcher: (transfer full) (allow-none): GstPlayerSignalDispatcher to use
|
* @signal_dispatcher: (transfer full) (allow-none): GstPlayerSignalDispatcher to use
|
||||||
*
|
*
|
||||||
|
@ -2516,7 +2505,7 @@ gst_player_new (void)
|
||||||
* Returns: a new #GstPlayer instance
|
* Returns: a new #GstPlayer instance
|
||||||
*/
|
*/
|
||||||
GstPlayer *
|
GstPlayer *
|
||||||
gst_player_new_full (GstPlayerVideoRenderer * video_renderer,
|
gst_player_new (GstPlayerVideoRenderer * video_renderer,
|
||||||
GstPlayerSignalDispatcher * signal_dispatcher)
|
GstPlayerSignalDispatcher * signal_dispatcher)
|
||||||
{
|
{
|
||||||
static GOnce once = G_ONCE_INIT;
|
static GOnce once = G_ONCE_INIT;
|
||||||
|
|
|
@ -97,8 +97,7 @@ const gchar *gst_player_color_balance_type_get_name (GstPlayerColorBalanceType
|
||||||
|
|
||||||
GType gst_player_get_type (void);
|
GType gst_player_get_type (void);
|
||||||
|
|
||||||
GstPlayer * gst_player_new (void);
|
GstPlayer * gst_player_new (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher);
|
||||||
GstPlayer * gst_player_new_full (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher);
|
|
||||||
|
|
||||||
void gst_player_play (GstPlayer * player);
|
void gst_player_play (GstPlayer * player);
|
||||||
void gst_player_pause (GstPlayer * player);
|
void gst_player_pause (GstPlayer * player);
|
||||||
|
|
|
@ -69,7 +69,7 @@ START_TEST (test_create_and_free)
|
||||||
{
|
{
|
||||||
GstPlayer *player;
|
GstPlayer *player;
|
||||||
|
|
||||||
player = gst_player_new ();
|
player = gst_player_new (NULL, NULL);
|
||||||
fail_unless (player != NULL);
|
fail_unless (player != NULL);
|
||||||
g_object_unref (player);
|
g_object_unref (player);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ START_TEST (test_set_and_get_uri)
|
||||||
GstPlayer *player;
|
GstPlayer *player;
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
|
|
||||||
player = gst_player_new ();
|
player = gst_player_new (NULL, NULL);
|
||||||
|
|
||||||
fail_unless (player != NULL);
|
fail_unless (player != NULL);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ START_TEST (test_set_and_get_position_update_interval)
|
||||||
GstPlayer *player;
|
GstPlayer *player;
|
||||||
guint interval = 0;
|
guint interval = 0;
|
||||||
|
|
||||||
player = gst_player_new ();
|
player = gst_player_new (NULL, NULL);
|
||||||
|
|
||||||
fail_unless (player != NULL);
|
fail_unless (player != NULL);
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ test_player_new (TestPlayerState * state)
|
||||||
GstElement *playbin, *fakesink;
|
GstElement *playbin, *fakesink;
|
||||||
|
|
||||||
player =
|
player =
|
||||||
gst_player_new_full (NULL,
|
gst_player_new (NULL,
|
||||||
gst_player_g_main_context_signal_dispatcher_new (NULL));
|
gst_player_g_main_context_signal_dispatcher_new (NULL));
|
||||||
fail_unless (player != NULL);
|
fail_unless (player != NULL);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ EXPORTS
|
||||||
gst_player_media_info_get_uri
|
gst_player_media_info_get_uri
|
||||||
gst_player_media_info_is_seekable
|
gst_player_media_info_is_seekable
|
||||||
gst_player_new
|
gst_player_new
|
||||||
gst_player_new_full
|
|
||||||
gst_player_pause
|
gst_player_pause
|
||||||
gst_player_play
|
gst_player_play
|
||||||
gst_player_seek
|
gst_player_seek
|
||||||
|
|
Loading…
Reference in a new issue