I'm adapting the code of gnome cheese to my program, but I encountered some difficulties since I'm new to glib programming.
I find in the file cheese-webcam.c a statement:
Code:
g_signal_connect (G_OBJECT (priv->photo_sink), "handoff",
G_CALLBACK (cheese_webcam_photo_data_cb), webcam);
in the function cheese_webcam_take_photo and the prototype of cheese_webcam_photo_data_cb is:
Code:
static void
cheese_webcam_photo_data_cb (GstElement *element, GstBuffer *buffer,
GstPad *pad, CheeseWebcam *webcam);
My problem is that 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 uses this buffer extensively.
How should I pass an argument to this parameter?
Thanks in advance.