[gst-embedded] how to get user data in cbk
Edward Hervey
edward.hervey at collabora.co.uk
Wed Nov 5 01:25:40 PST 2008
On Wed, 2008-11-05 at 09:58 +0530, Raghavendra wrote:
> Hi all,
> How to get user specified data in below code. Means, where I can set my user specific data???/ please help meee…………..
Read the documentation and fill in the blank you left in your code.
There's a chapter in the documentation SPECIFICALLY about this.
Edward
>
> Thank you,
> Raghu
>
> static void
> cb_handoff (GstElement *fakesrc,
> GstBuffer *buffer,
> GstPad *pad,
> gpointer user_data)
> {
<THIS IS THE BLANK IN YOUR CODE BTW>
>
> }
>
> gint
> main (gint argc,
> gchar *argv[])
> {
> GstElement *pipeline, *fakesrc, *flt, *conv, *videosink;
> GMainLoop *loop;
>
> /* init GStreamer */
> gst_init (&argc, &argv);
> loop = g_main_loop_new (NULL, FALSE);
>
> /* setup pipeline */
> pipeline = gst_pipeline_new ("pipeline");
> fakesrc = gst_element_factory_make ("fakesrc", "source");
> videosink = gst_element_factory_make ("xvimagesink", "videosink");
>
> gst_bin_add_many (GST_BIN (pipeline), fakesrc, videosink, NULL);
> gst_element_link_many (fakesrc, videosink, NULL);
>
> /* setup fake source */
> g_object_set (G_OBJECT (fakesrc),
> "signal-handoffs", TRUE,
> "sizemax", 384 * 288 * 2,
> "sizetype", 2, NULL);
> g_signal_connect (fakesrc, "handoff", G_CALLBACK (cb_handoff), NULL);
>
> /* play */
> gst_element_set_state (pipeline, GST_STATE_PLAYING);
> g_main_loop_run (loop);
>
> /* clean up */
> gst_element_set_state (pipeline, GST_STATE_NULL);
> gst_object_unref (GST_OBJECT (pipeline));
>
> return 0;
> }
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Gstreamer-embedded mailing list Gstreamer-embedded at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-embedded
--
Edward Hervey
Lead Platforms Engineer / Director
Collabora Multimedia
More information about the Gstreamer-embedded
mailing list