Command line for compiling

Ian Davidson id012c3076 at blueyonder.co.uk
Mon Jan 13 06:48:07 PST 2014


Hi Tim,

Now that I have stopped 'worrying about it' and started coding, I do 
have a program that works (although I still have to finish it off and 
may find other problems yet).

I was thinking that my code would be like a Y - and that I would either 
be calling gtk_main() (and monitoring for button presses) OR calling 
g_main_loop_run() specifying my code to handle events from the Gstreamer 
bus watches.  While lying in bed, it occurred to me that my main program 
was going to end up calling gtk_main() (always) and that when I pressed 
the appropriate button, I would then call a nested g_main_loop_run() - 
so no problem.  I can start and stop the recording by pressing buttons 
on the screen, and I can press other buttons while the recording is 
active and life is good.

Ian

On 13/01/2014 11:52, Tim Müller wrote:
> On Sun, 2014-01-12 at 12:21 +0000, Ian Davidson wrote:
>
> Hi Ian,
>
>> I have realised that the documentation says that calls to
>> g_main_loop_run can be nested - so my fears are probably groundless.
> Not sure where you're stuck right now, or what's unclear.
>
> gtk_main() calls g_main_loop_run() internally, so if you have a Gtk+
> application and a gtk_main() call in your code, then you don't need to
> do anything else for GStreamer bus watches to work.
>
> Which 'two bits of code waiting' were you refering to?
>
>   Cheers
>    -Tim
>
>
>> On 11/01/2014 11:58, Ian Davidson wrote:
>>
>>> 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?
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
--
Ian Davidson
/239 Streetsbrook Road, Solihull, West Midlands, B91 1HE/
--
Facts used in this message may or may not reflect an underlying 
objective reality. Facts are supplied for personal use only.
Recipients quoting supplied information do so at their own risk. Facts 
supplied may vary in whole or part from widely accepted standards.
While painstakingly researched, facts may or may not be indicative of 
actually occurring events or natural phenomena.
The author accepts no responsibility for personal loss or injury 
resulting from memorisation and subsequent use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140113/9a68ae6f/attachment-0001.html>


More information about the gstreamer-devel mailing list