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:
Wim Taymans 2009-03-16 15:31:44 +01:00
parent 04a860c6f7
commit ce9360b9fd
4 changed files with 4 additions and 4 deletions

View file

@ -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
* 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", app->length, NULL);
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
g_object_set (app->appsrc, "stream-type", 2, NULL);
/* configure the appsrc, we will push a buffer to appsrc when it needs more

View file

@ -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
* 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", 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
* out buffers of an undefined size and that seeks happen only occasionally
* and only by request of the user. */

View file

@ -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
* 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", 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
* mainloop. */

View file

@ -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
* 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", 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
* data */