Command line for compiling
Ian Davidson
id012c3076 at blueyonder.co.uk
Sat Jan 11 03:58:02 PST 2014
I have taken a break from programming over the festivities and have now
turned my thoughts back to my program.
With my GStreamer console based application, the program's main 'lined
up all the gstreamer elements', set the ball rolling, and then went to
g_main_loop_run which waited for interesting signals. I realise that
there was a lot of multi-threading and other clever stuff going on, but
what I had to write was impressively simple.
Then I turned to look at my GUI interface and chose GTK as, seemingly,
the best way to write my code. I notice that the main program lines up
all the buttons I want on the screen, I have event handlers for when
buttons are pressed and then I go to gtk_main() to wait for things to
happen.
My hang-up is that I don't know how to reconcile these two bits of code
waiting. I think that I have read that gtk_main is a wrapper for
g_main_loop_run, so there must be something from there that I need to
incorporate into my main loop. Is there some sample code I can look at?
On 18/12/2013 11:30, Ian Davidson wrote:
> Thanks Tim,
>
> You were right to guess that I was using Gtk+ 1.2. This was not a
> deliberate choice, but based on ignorance - I did not realise that
> there were any other flavours.
>
> I have now 'ported' my GUI to Gtk+3.0 and can make progress..Once
> again, thanks for your help.
>
> Ian
>
> On 17/12/2013 23:02, Tim Müller wrote:
>> So, first of all, if I'm not mistaken your use of gtk-config implies
>> that you are using an ancient version of Gtk+, namely Gtk+ 1.2. Is this
>> correct? This would then also use an ancient GLib 1.2, which is not
>> API/ABI compatible with modern GLib/Gtk applications, and you can't use
>> GStreamer 1.0 (or 0.10 or 0.8) with GLib 1.2, only with GLib 2.0. But I
>> might be mistaken about all of this of course.
>>
>> So in any case, make sure to use either Gtk+ 2.x or 3.x which both use
>> GLib 2.x. Then what should work is:
>>
>> gcc -Wall foo.c -o foo $(pkg-config --cflags --libs gstreamer-1.0 gtk
>> +-3.0)
>>
>> Cheers
>> -Tim
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140111/86c508c2/attachment.html>
More information about the gstreamer-devel
mailing list