Re: GTK drawing + Gstreamer
- From: Matteo Landi <landimatte gmail com>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: ML-gtk <gtk-list gnome org>
- Subject: Re: GTK drawing + Gstreamer
- Date: Fri, 20 Mar 2009 19:09:58 +0100
i have solved with the g_idle_add solution: basically i launch a
thread that makes all
the image process and then realizes the image to the drawing area. Now
it should be
a safe procedure. what about the gtk_widget_queue_draw method? is it a
more correct
way to do such things? and how should i get the lock over a thread?
Thanks in advace
--
M@
On Fri, Mar 20, 2009 at 4:06 PM, Paul Davis <paul linuxaudiosystems com> wrote:
>
>
> On Thu, Mar 19, 2009 at 12:24 PM, Matteo Landi <matteo landi email it>
> wrote:
>>
>> Hi all,
>> i'm trying to develop a basic image processing that sources the
>> frames from the webcam.
>> Basically the gtk application is composed of three windows:
>> 1 - drawing area displaying modified stream
>> 2 - drawing area displaying the webcam stream (i used an xoverlay
>> for the link between the gstreamer videosink and the drawing area)
>> 3 - box containing settings for the webcam stream
>>
>> I have a gst object that everytime it has a new frame, launch a callback
>> function. Inside this method i make the image process, and save the
>> result inside a gdk_pixbuff. Once the process is terminated, inside the
>> function, i call gdk_draw_pixbuf over the first drawing area. Is it
>> correct to
>> draw over drawing areas from gstreamer callbacks?
>
> no. you really can't call anything except g_idle_add() without taking the
> gtk thread lock. if you take the lock, you can call gtk_widget_queue_draw()
> and then the right things will happen.
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]