mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
examples: fix g_object_set() value type.
Make sure we cast the length value as a gint64 to the vararg g_object_set() just incase sizeof(gsize) != sizeof(gint64).
This commit is contained in:
parent
04a860c6f7
commit
ce9360b9fd
4 changed files with 4 additions and 4 deletions
|
@ -125,7 +125,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
||||||
/* we can set the length in appsrc. This allows some elements to estimate the
|
/* we can set the length in appsrc. This allows some elements to estimate the
|
||||||
* 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", app->length, NULL);
|
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
||||||
g_object_set (app->appsrc, "stream-type", 2, NULL);
|
g_object_set (app->appsrc, "stream-type", 2, NULL);
|
||||||
|
|
||||||
/* 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
|
||||||
|
|
|
@ -128,7 +128,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
||||||
/* we can set the length in appsrc. This allows some elements to estimate the
|
/* we can set the length in appsrc. This allows some elements to estimate the
|
||||||
* 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", app->length, NULL);
|
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
||||||
/* 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. */
|
||||||
|
|
|
@ -151,7 +151,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
||||||
/* we can set the length in appsrc. This allows some elements to estimate the
|
/* we can set the length in appsrc. This allows some elements to estimate the
|
||||||
* 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", app->length, NULL);
|
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
||||||
|
|
||||||
/* configure the appsrc, we will push data into the appsrc from the
|
/* configure the appsrc, we will push data into the appsrc from the
|
||||||
* mainloop. */
|
* mainloop. */
|
||||||
|
|
|
@ -123,7 +123,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
|
||||||
/* we can set the length in appsrc. This allows some elements to estimate the
|
/* we can set the length in appsrc. This allows some elements to estimate the
|
||||||
* 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", app->length, NULL);
|
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
|
||||||
|
|
||||||
/* 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