mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
gst/playback/gstplaybin.c: Improve docs: point out that the application needs to assist playbin with buffering.
Original commit message from CVS: * gst/playback/gstplaybin.c: Improve docs: point out that the application needs to assist playbin with buffering.
This commit is contained in:
parent
e8e648a76d
commit
d35f4efe67
2 changed files with 20 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-02-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/playback/gstplaybin.c:
|
||||||
|
Improve docs: point out that the application needs to assist playbin
|
||||||
|
with buffering.
|
||||||
|
|
||||||
2007-02-23 Tim-Philipp Müller <tim at centricular dot net>
|
2007-02-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst-libs/gst/utils/install-plugins.c:
|
* gst-libs/gst/utils/install-plugins.c:
|
||||||
|
|
|
@ -161,28 +161,33 @@
|
||||||
* new_state=PAUSED), since before that the list might not be complete yet or
|
* new_state=PAUSED), since before that the list might not be complete yet or
|
||||||
* not contain all available information (like language-codes).
|
* not contain all available information (like language-codes).
|
||||||
* </para>
|
* </para>
|
||||||
* <title>Buffering status</title>
|
* <title>Buffering</title>
|
||||||
* <para>
|
* <para>
|
||||||
* Playbin handles buffering automatically. When playbin is buffering, it
|
* Playbin handles buffering automatically for the most part, but applications
|
||||||
* will post BUFFERING messages on the bus with a percentage value that
|
* need to handle parts of the buffering process as well. Whenever playbin is
|
||||||
* shows the progress of the buffering. Applications may want to show this
|
* buffering, it will post BUFFERING messages on the bus with a percentage
|
||||||
* information to the user in some form or another. Here is how to extract
|
* value that shows the progress of the buffering process. Applications need
|
||||||
* the percentage information from the message:
|
* to set playbin to PLAYING or PAUSED state in response to these messages.
|
||||||
|
* They may also want to convey the buffering progress to the user in some
|
||||||
|
* way. Here is how to extract the percentage information from the message
|
||||||
|
* (requires GStreamer >= 0.10.11):
|
||||||
* </para>
|
* </para>
|
||||||
* <para>
|
* <para>
|
||||||
* <programlisting>
|
* <programlisting>
|
||||||
* switch (GST_MESSAGE_TYPE (msg)) {
|
* switch (GST_MESSAGE_TYPE (msg)) {
|
||||||
* case GST_MESSAGE_BUFFERING: {
|
* case GST_MESSAGE_BUFFERING: {
|
||||||
* gint percent = 0;
|
* gint percent = 0;
|
||||||
* gst_structure_get_int (msg->structure, "buffer-percent", &percent);
|
* gst_message_parse_buffering (msg, &percent);
|
||||||
* g_print ("Buffering (%%u percent done)", percent);
|
* g_print ("Buffering (%%u percent done)", percent);
|
||||||
* break;
|
* break;
|
||||||
* }
|
* }
|
||||||
* ...
|
* ...
|
||||||
* }
|
* }
|
||||||
* </programlisting>
|
* </programlisting>
|
||||||
* Note that application should keep the pipeline in the PAUSED state when a
|
* Note that applications should keep/set the pipeline in the PAUSED state when
|
||||||
* GST_MESSAGE_BUFFERING message is received with a buffer-percent < 100.
|
* a BUFFERING message is received with a buffer percent value < 100 and set
|
||||||
|
* the pipeline back to PLAYING state when a BUFFERING message with a value
|
||||||
|
* of 100 percent is received (if PLAYING is the desired state, that is).
|
||||||
* </para>
|
* </para>
|
||||||
* <title>Embedding the video window in your application</title>
|
* <title>Embedding the video window in your application</title>
|
||||||
* <para>
|
* <para>
|
||||||
|
|
Loading…
Reference in a new issue