new to g_signal_connect



Hi guys,

I'm always confused of the function g_signal_connect. In your project,
I find in file cheese-webcam.c there is a

g_signal_connect (G_OBJECT (priv->photo_sink),
			    "handoff",
			    G_CALLBACK (cheese_webcam_photo_data_cb),
			    webcam);

in function cheese_webcam_take_photo and the prototype of
cheese_webcam_photo_data_cb is

static void
cheese_webcam_photo_data_cb (GstElement *element, GstBuffer *buffer,
                             GstPad *pad, CheeseWebcam *webcam);

My problem is I want to make use of this function as a regular function
rather than a callback while I don't know where is this GstBuffer *buffer
from. I see that the function makes extensive use of this buffer.

Can I get this buffer from a CheeseWebcamPrivate structrue?

Thanks in advance.

--
Charles


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]