mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
examples: use new method to set flags
Use the new core method for setting object enum properties by name.
This commit is contained in:
parent
9bf8277d13
commit
b6fdf68dc0
2 changed files with 3 additions and 2 deletions
|
@ -126,7 +126,8 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
|||
* total duration of the stream. It's a good idea to set the property when you
|
||||
* can but it's not required. */
|
||||
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
||||
g_object_set (app->appsrc, "stream-type", 2, NULL);
|
||||
gst_util_set_object_arg (G_OBJECT (app->appsrc), "stream-type",
|
||||
"random-access");
|
||||
|
||||
/* configure the appsrc, we will push a buffer to appsrc when it needs more
|
||||
* data */
|
||||
|
|
|
@ -132,7 +132,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
|||
/* we are seekable in push mode, this means that the element usually pushes
|
||||
* out buffers of an undefined size and that seeks happen only occasionally
|
||||
* and only by request of the user. */
|
||||
g_object_set (app->appsrc, "stream-type", 1, NULL);
|
||||
gst_util_set_object_arg (G_OBJECT (app->appsrc), "stream-type", "seekable");
|
||||
|
||||
/* configure the appsrc, we will push a buffer to appsrc when it needs more
|
||||
* data */
|
||||
|
|
Loading…
Reference in a new issue