I’ve got a Gstreamer pipeline grabbing frames of raw video data several times faster than real-time (which is great !)
I’ve done this using something like: while( !gst_app_sink_is_eos( sink )) { buffer = gst_app_sink_pull_buffer( sink ); do_something_with_buffer(...); } This works, but there is no error detection for events other than end of stream. If I were to use a GMainLoop/GMainContext approach instead, is there a Gstreamer event which would tell me every time a frame was ready to be processed ? The GstMessageType documentation seems to hint that GST_MESSAGE_STEP_DONE will do this, but then says it’s not implemented yet... Is there a better way to do this ? Darren
*** FRIEND MTS LIMITED EMAIL CONFIDENTIALITY *** This email message and any attachments may contain information which is confidential or privileged and is intended for the sole use of the person to whom it is addressed. If you are not the intended recipient, be aware that any disclosures, copying, distribution or use of the contents is prohibited. If you have received this email message in error, please notify our office by telephone (+44 (0)121 633 2000) or email ([hidden email]) immediately. Thank you. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
El lun, 19-01-2009 a las 14:47 +0000, Darren Staples escribió:
> If I were to use a GMainLoop/GMainContext approach instead, is there a > Gstreamer event which would tell me every time a frame was ready to be > processed ? Hi Darren in my code with no GMainLoop i use something like: g_object_set (G_OBJECT (sink), "emit-signals", TRUE, "sync", TRUE, NULL); g_signal_connect (sink, "new-buffer", G_CALLBACK (on_new_buffer_from_source), &gstData); where on_new_buffer_from_source is a callback of the format: static void on_new_buffer_from_source (GstElement * elt, void * data){ guint size; GstBuffer *buffer; //get the buffer from appsink buffer = gst_app_sink_pull_buffer (GST_APP_SINK (elt)); ... that is being notified everytime there's a new buffer to process, and gstData a container to pass the raw pixels to the main app from the callback (in my case needed as the data is inside an object) also if you change "sync", TRUE by "sync", FALSE you'll get the frames at the fastest speed the system can. in your case being raw video i suppose it won' matter anyway ciao //------------------------------------------ arturo castro oF core developer barcelona ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |