<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
<p class="western">I have taken a break from programming over the
festivities and have now turned my thoughts back to my program.</p>
<p class="western">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.</p>
<p class="western">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.</p>
<p class="western">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?</p>
<title></title>
<meta name="GENERATOR" content="OpenOffice 4.0.0 (Win32)">
<style type="text/css">
<!--
@page { margin: 2cm }
-->
</style>
<div class="moz-cite-prefix">On 18/12/2013 11:30, Ian Davidson
wrote:<br>
</div>
<blockquote cite="mid:52B18759.6070603@blueyonder.co.uk" type="cite">Thanks
Tim,
<br>
<br>
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.
<br>
<br>
I have now 'ported' my GUI to Gtk+3.0 and can make progress..Once
again, thanks for your help.
<br>
<br>
Ian
<br>
<br>
On 17/12/2013 23:02, Tim Müller wrote:
<br>
<blockquote type="cite">So, first of all, if I'm not mistaken your
use of gtk-config implies
<br>
that you are using an ancient version of Gtk+, namely Gtk+ 1.2.
Is this
<br>
correct? This would then also use an ancient GLib 1.2, which is
not
<br>
API/ABI compatible with modern GLib/Gtk applications, and you
can't use
<br>
GStreamer 1.0 (or 0.10 or 0.8) with GLib 1.2, only with GLib
2.0. But I
<br>
might be mistaken about all of this of course.
<br>
<br>
So in any case, make sure to use either Gtk+ 2.x or 3.x which
both use
<br>
GLib 2.x. Then what should work is:
<br>
<br>
gcc -Wall foo.c -o foo $(pkg-config --cflags --libs
gstreamer-1.0 gtk
<br>
+-3.0)
<br>
<br>
Cheers
<br>
-Tim
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>