How to get "min-percent" property of appsrc?

classic Classic list List threaded Threaded
3 messages Options
ms
Reply | Threaded
Open this post in threaded view
|

How to get "min-percent" property of appsrc?

ms
I have read a document of appsrc. appsrc has "min-percent" property which is
can read/write, but I don't know how to read/write this property of appsrc,
please help me. Thank so much!


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-min-percent-property-of-appsrc-tp4448727p4448727.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get "min-percent" property of appsrc?

Tim-Philipp Müller-2
On Mon, 2012-03-05 at 20:21 -0800, ms wrote:
> I have read a document of appsrc. appsrc has "min-percent" property which is
> can read/write, but I don't know how to read/write this property of appsrc,
> please help me. Thank so much!


g_object_set (src, "min-percent", 5, NULL);

(note: careful when setting 64-bit integer values this way, best to
assign to a gint64/guint64 variable first and then pass that to
g_object_set()).

unsigned int val;
g_object_get (src, "min-percent", &val, NULL);

Cheers
-Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
ms
Reply | Threaded
Open this post in threaded view
|

Re: How to get "min-percent" property of appsrc?

ms
This post was updated on .
thank you, it works fine. I have another question: How to get current size of appsrc? I have used gst_app_src_get_size function, but it returns -1. Please help me solves this problem.