mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +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
|
* total duration of the stream. It's a good idea to set the property when you
|
||||||
* can but it's not required. */
|
* can but it's not required. */
|
||||||
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
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
|
/* configure the appsrc, we will push a buffer to appsrc when it needs more
|
||||||
* data */
|
* 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
|
/* 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
|
* out buffers of an undefined size and that seeks happen only occasionally
|
||||||
* and only by request of the user. */
|
* 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
|
/* configure the appsrc, we will push a buffer to appsrc when it needs more
|
||||||
* data */
|
* data */
|
||||||
|
|
Loading…
Reference in a new issue