mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
Remove unneeded BUFFERING playbin2 flag for this tutorial.
This commit is contained in:
parent
5569f41783
commit
9cbd722bbe
1 changed files with 0 additions and 11 deletions
|
@ -7,11 +7,6 @@ typedef struct _CustomData {
|
||||||
GMainLoop *loop;
|
GMainLoop *loop;
|
||||||
} CustomData;
|
} CustomData;
|
||||||
|
|
||||||
/* playbin2 flags */
|
|
||||||
typedef enum {
|
|
||||||
GST_PLAY_FLAG_BUFFERING = (1 << 8) /* We want to allow buffering */
|
|
||||||
} GstPlayFlags;
|
|
||||||
|
|
||||||
static void cb_message (GstBus *bus, GstMessage *msg, CustomData *data) {
|
static void cb_message (GstBus *bus, GstMessage *msg, CustomData *data) {
|
||||||
|
|
||||||
switch (GST_MESSAGE_TYPE (msg)) {
|
switch (GST_MESSAGE_TYPE (msg)) {
|
||||||
|
@ -65,7 +60,6 @@ int main(int argc, char *argv[]) {
|
||||||
GstStateChangeReturn ret;
|
GstStateChangeReturn ret;
|
||||||
GMainLoop *main_loop;
|
GMainLoop *main_loop;
|
||||||
CustomData data;
|
CustomData data;
|
||||||
guint flags;
|
|
||||||
|
|
||||||
/* Initialize GStreamer */
|
/* Initialize GStreamer */
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
@ -77,11 +71,6 @@ int main(int argc, char *argv[]) {
|
||||||
pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
|
pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
|
||||||
bus = gst_element_get_bus (pipeline);
|
bus = gst_element_get_bus (pipeline);
|
||||||
|
|
||||||
/* Set the buffering flag */
|
|
||||||
g_object_get (pipeline, "flags", &flags, NULL);
|
|
||||||
flags |= GST_PLAY_FLAG_BUFFERING;
|
|
||||||
g_object_set (pipeline, "flags", flags, NULL);
|
|
||||||
|
|
||||||
/* Start playing */
|
/* Start playing */
|
||||||
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE) {
|
if (ret == GST_STATE_CHANGE_FAILURE) {
|
||||||
|
|
Loading…
Reference in a new issue