mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
docs: playbin2 -> playbin
This commit is contained in:
parent
f70ebca937
commit
3591df23b1
8 changed files with 28 additions and 28 deletions
|
@ -1434,7 +1434,7 @@ gst_ogg_pad_handle_push_mode_state (GstOggPad * pad, ogg_page * page)
|
|||
/* If we were determining the duration of the stream, we're now done,
|
||||
and can get back to sending the original event we delayed.
|
||||
We stop a bit before the end of the stream, as if we get a EOS
|
||||
event and there is a queue2 upstream (such as when using playbin2),
|
||||
event and there is a queue2 upstream (such as when using playbin),
|
||||
it will pause the task *after* we come back from the EOS handler,
|
||||
so we cannot prevent the pausing by issuing a seek. */
|
||||
if (ogg->push_byte_offset + EOS_AVOIDANCE_THRESHOLD >=
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* <refsect2>
|
||||
* <para>
|
||||
* This interface is implemented by elements that provide a stream volume. Examples for
|
||||
* such elements are #volume and #playbin2.
|
||||
* such elements are #volume and #playbin.
|
||||
* </para>
|
||||
* <para>
|
||||
* Applications can use this interface to get or set the current stream volume. For this
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
* The device to use for CDs/DVDs needs to be set on the source element
|
||||
* playbin creates before it is opened. The most generic way of doing this
|
||||
* is to connect to playbin's "source-setup" (or "notify::source") signal,
|
||||
* which will be emitted by playbin2 when it has created the source element
|
||||
* which will be emitted by playbin when it has created the source element
|
||||
* for a particular URI. In the signal callback you can check if the source
|
||||
* element has a "device" property and set it appropriately. In some cases
|
||||
* the device can also be set as part of the URI, but it depends on the
|
||||
|
@ -198,18 +198,18 @@
|
|||
* <refsect2>
|
||||
* <title>Examples</title>
|
||||
* |[
|
||||
* gst-launch -v playbin2 uri=file:///path/to/somefile.avi
|
||||
* gst-launch -v playbin uri=file:///path/to/somefile.avi
|
||||
* ]| This will play back the given AVI video file, given that the video and
|
||||
* audio decoders required to decode the content are installed. Since no
|
||||
* special audio sink or video sink is supplied (not possible via gst-launch),
|
||||
* playbin will try to find a suitable audio and video sink automatically
|
||||
* using the autoaudiosink and autovideosink elements.
|
||||
* |[
|
||||
* gst-launch -v playbin2 uri=cdda://4
|
||||
* gst-launch -v playbin uri=cdda://4
|
||||
* ]| This will play back track 4 on an audio CD in your disc drive (assuming
|
||||
* the drive is detected automatically by the plugin).
|
||||
* |[
|
||||
* gst-launch -v playbin2 uri=dvd://
|
||||
* gst-launch -v playbin uri=dvd://
|
||||
* ]| This will play back the DVD in your disc drive (assuming
|
||||
* the drive is detected automatically by the plugin).
|
||||
* </refsect2>
|
||||
|
@ -1687,7 +1687,7 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_playbin2_send_custom_event (GstObject * selector, const gchar * event_name)
|
||||
gst_play_bin_send_custom_event (GstObject * selector, const gchar * event_name)
|
||||
{
|
||||
GstPad *src;
|
||||
GstPad *peer;
|
||||
|
@ -1744,7 +1744,7 @@ gst_play_bin_set_current_video_stream (GstPlayBin * playbin, gint stream)
|
|||
g_object_get (selector, "active-pad", &old_sinkpad, NULL);
|
||||
|
||||
if (old_sinkpad != sinkpad) {
|
||||
if (gst_playbin2_send_custom_event (selector,
|
||||
if (gst_play_bin_send_custom_event (selector,
|
||||
"playsink-custom-video-flush"))
|
||||
playbin->video_pending_flush_finish = TRUE;
|
||||
|
||||
|
@ -1802,7 +1802,7 @@ gst_play_bin_set_current_audio_stream (GstPlayBin * playbin, gint stream)
|
|||
g_object_get (selector, "active-pad", &old_sinkpad, NULL);
|
||||
|
||||
if (old_sinkpad != sinkpad) {
|
||||
if (gst_playbin2_send_custom_event (selector,
|
||||
if (gst_play_bin_send_custom_event (selector,
|
||||
"playsink-custom-audio-flush"))
|
||||
playbin->audio_pending_flush_finish = TRUE;
|
||||
|
||||
|
@ -1988,7 +1988,7 @@ gst_play_bin_set_current_text_stream (GstPlayBin * playbin, gint stream)
|
|||
gst_play_bin_suburidecodebin_block (group, group->suburidecodebin,
|
||||
TRUE);
|
||||
|
||||
if (gst_playbin2_send_custom_event (selector,
|
||||
if (gst_play_bin_send_custom_event (selector,
|
||||
"playsink-custom-subtitle-flush"))
|
||||
playbin->text_pending_flush_finish = TRUE;
|
||||
|
||||
|
@ -2603,7 +2603,7 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
|
|||
if (playbin->video_pending_flush_finish) {
|
||||
playbin->video_pending_flush_finish = FALSE;
|
||||
GST_PLAY_BIN_UNLOCK (playbin);
|
||||
gst_playbin2_send_custom_event (GST_OBJECT (selector),
|
||||
gst_play_bin_send_custom_event (GST_OBJECT (selector),
|
||||
"playsink-custom-video-flush-finish");
|
||||
goto notify;
|
||||
}
|
||||
|
@ -2617,7 +2617,7 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
|
|||
if (playbin->audio_pending_flush_finish) {
|
||||
playbin->audio_pending_flush_finish = FALSE;
|
||||
GST_PLAY_BIN_UNLOCK (playbin);
|
||||
gst_playbin2_send_custom_event (GST_OBJECT (selector),
|
||||
gst_play_bin_send_custom_event (GST_OBJECT (selector),
|
||||
"playsink-custom-audio-flush-finish");
|
||||
goto notify;
|
||||
}
|
||||
|
@ -2630,7 +2630,7 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
|
|||
if (playbin->text_pending_flush_finish) {
|
||||
playbin->text_pending_flush_finish = FALSE;
|
||||
GST_PLAY_BIN_UNLOCK (playbin);
|
||||
gst_playbin2_send_custom_event (GST_OBJECT (selector),
|
||||
gst_play_bin_send_custom_event (GST_OBJECT (selector),
|
||||
"playsink-custom-subtitle-flush-finish");
|
||||
goto notify;
|
||||
}
|
||||
|
@ -2877,7 +2877,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
|
|||
sinkpad = NULL;
|
||||
|
||||
/* store the selector for the pad */
|
||||
g_object_set_data (G_OBJECT (pad), "playbin2.select", select);
|
||||
g_object_set_data (G_OBJECT (pad), "playbin.select", select);
|
||||
}
|
||||
GST_SOURCE_GROUP_UNLOCK (group);
|
||||
|
||||
|
@ -2958,7 +2958,7 @@ pad_removed_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
|
|||
|
||||
GST_SOURCE_GROUP_LOCK (group);
|
||||
|
||||
if ((select = g_object_get_data (G_OBJECT (pad), "playbin2.select"))) {
|
||||
if ((select = g_object_get_data (G_OBJECT (pad), "playbin.select"))) {
|
||||
g_assert (select->selector == NULL);
|
||||
g_assert (select->srcpad == pad);
|
||||
gst_object_unref (pad);
|
||||
|
|
|
@ -112,8 +112,8 @@ seek_data (GstElement * appsrc, guint64 position, App * app)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* this callback is called when playbin2 has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin2, this will be the
|
||||
/* this callback is called when playbin has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin, this will be the
|
||||
* appsrc that we must handle. We set up some signals to push data into appsrc
|
||||
* and one to perform a seek. */
|
||||
static void
|
||||
|
@ -190,7 +190,7 @@ main (int argc, char *argv[])
|
|||
/* create a mainloop to get messages */
|
||||
app->loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
app->playbin = gst_element_factory_make ("playbin2", NULL);
|
||||
app->playbin = gst_element_factory_make ("playbin", NULL);
|
||||
g_assert (app->playbin);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin));
|
||||
|
|
|
@ -114,8 +114,8 @@ seek_data (GstElement * appsrc, guint64 position, App * app)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* this callback is called when playbin2 has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin2, this will be the
|
||||
/* this callback is called when playbin has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin, this will be the
|
||||
* appsrc that we must handle. We set up some signals to push data into appsrc
|
||||
* and one to perform a seek. */
|
||||
static void
|
||||
|
@ -194,7 +194,7 @@ main (int argc, char *argv[])
|
|||
/* create a mainloop to get messages */
|
||||
app->loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
app->playbin = gst_element_factory_make ("playbin2", NULL);
|
||||
app->playbin = gst_element_factory_make ("playbin", NULL);
|
||||
g_assert (app->playbin);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin));
|
||||
|
|
|
@ -137,8 +137,8 @@ stop_feed (GstElement * playbin, App * app)
|
|||
}
|
||||
}
|
||||
|
||||
/* this callback is called when playbin2 has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin2, this will be the
|
||||
/* this callback is called when playbin has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin, this will be the
|
||||
* appsrc that we must handle. We set up some signals to start and stop pushing
|
||||
* data into appsrc */
|
||||
static void
|
||||
|
@ -214,7 +214,7 @@ main (int argc, char *argv[])
|
|||
* feed data to appsrc. */
|
||||
app->loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
app->playbin = gst_element_factory_make ("playbin2", NULL);
|
||||
app->playbin = gst_element_factory_make ("playbin", NULL);
|
||||
g_assert (app->playbin);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin));
|
||||
|
|
|
@ -110,8 +110,8 @@ feed_data (GstElement * appsrc, guint size, App * app)
|
|||
return;
|
||||
}
|
||||
|
||||
/* this callback is called when playbin2 has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin2, this will be the
|
||||
/* this callback is called when playbin has constructed a source object to read
|
||||
* from. Since we provided the appsrc:// uri to playbin, this will be the
|
||||
* appsrc that we must handle. We set up a signals to push data into appsrc. */
|
||||
static void
|
||||
found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
||||
|
@ -184,7 +184,7 @@ main (int argc, char *argv[])
|
|||
/* create a mainloop to get messages */
|
||||
app->loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
app->playbin = gst_element_factory_make ("playbin2", NULL);
|
||||
app->playbin = gst_element_factory_make ("playbin", NULL);
|
||||
g_assert (app->playbin);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin));
|
||||
|
|
|
@ -106,7 +106,7 @@ main (int argc, char *argv[])
|
|||
gst_init (NULL, NULL);
|
||||
gtk_init (NULL, NULL);
|
||||
|
||||
pipeline = gst_element_factory_make ("playbin2", NULL);
|
||||
pipeline = gst_element_factory_make ("playbin", NULL);
|
||||
g_assert (pipeline);
|
||||
g_object_set (G_OBJECT (pipeline), "uri", argv[1], NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue