<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">The difference between the
basic-hello-world example and the basic-playback example is that
the latter uses a GMainLoop for the event loop whereas the former
directly pops GstMessage's off the GstBus. This matters because
in order to perform GUI related functionality, macOS requires that
the application be running a CFRunLoop and<br>
if you're running with the binaries provided by the GStreamer
project, then they contain additions to GMainLoop to run a
CFRunLoop alongside the GMainLoop.<br>
<br>
Without such an addition, the application would need to run their
own CFRunLoop using something like <a moz-do-not-send="true"
href="https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/gl/cocoa/cocoa-videooverlay.m#n222">https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/gl/cocoa/cocoa-videooverlay.m#n222</a>
as a kludge.<br>
<br>
As far as the example is concerned, I think the intention of the
basic-examples is that they don't rely on the use of GMainLoop for
simplicity reasons to avoid introducing event processing and to
show that GMainLoop is *not* required for interacting with
GStreamer (a common misconception) however they could be ported to
the use of GMainLoop for the macOS use case or also pump the main
CFRunLoop.<br>
<br>
Hope that helps.<br>
-Matt<br>
<br>
On 02/01/18 09:30, Sean Ogden wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8D14EACB-C63C-434D-9A6B-734EA9C0F1ED@icloud.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
First - love your work guys. I think more people need to know
that. So getting inexperienced people using your stuff is the way
to go. So its a bit of a problem when the hello world doesn't
work as expected, so I hope you don't think this trivial
<div class=""><br class="">
</div>
<div class="">First, my setup. I do not normally develop in C, so
my experience is on a pretty fresh XCode, and my machine is
pretty clean. </div>
<div class="">Following the instructions at <a
href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html"
class="" moz-do-not-send="true">https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html</a></div>
<div class=""><br class="">
</div>
<div class="">Everything compiles and runs, I get audio, but <b
class="">no window with video</b>.</div>
<div class=""><br class="">
</div>
<div class="">I was able to run the <span style="font-family:
Menlo; font-size: 11px; background-color: rgb(255, 255, 255);"
class="">gst_parse_launch command string through </span><span
style="font-family: Menlo; font-size: 11px; background-color:
rgb(255, 255, 255);" class="">/Library/Frameworks/GStreamer.framework/Versions/1.0/bin/</span><span
style="font-family: Menlo; font-size: 11px; background-color:
rgb(255, 255, 255);" class="">gst-launch-1.0 with no trouble.
Window came up fine.</span></div>
<div class=""><span style="font-family: Menlo; font-size: 11px;
background-color: rgb(255, 255, 255);" class=""><br class="">
</span></div>
<div class=""><span style="background-color: rgb(255, 255, 255);"
class=""><font class="" face="Menlo"><span style="font-size:
11px;" class="">After trying to work out how to debug such
a problem - and I would love to have advice from an
experienced XCode developer - How do you debug windows
events??? I'm guessing you need to be in the know of
exactly what debug context will expose them from the rest
of the debugging data.</span></font></span></div>
<div class=""><span style="background-color: rgb(255, 255, 255);"
class=""><font class="" face="Menlo"><span style="font-size:
11px;" class=""><br class="">
</span></font></span></div>
<div class=""><span style="background-color: rgb(255, 255, 255);"
class=""><font class="" face="Menlo"><span style="font-size:
11px;" class="">I then tried the <b class="">example </b></span></font></span><font
class="" face="Menlo"><b style="font-size: 11px;" class="">playback-tutorial-1.c.
That worked.</b><span class=""> So direct instantiation and
manipulation of the </span></font><span class="">g_object </span><span
class="">playbin works.</span></div>
<span class=""><br class="">
</span>
<div class=""><font class="" face="Menlo"><span style="font-size:
11px;" class="">With my inexperienced xcode / c debugging I
discovered: </span></font></div>
<div class=""><font class="" face="Menlo"><span style="font-size:
11px;" class=""><br class="">
</span></font></div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; color: rgb(209, 47,
27); background-color: rgb(255, 255, 255);" class=""><span
style="color: #000000" class="">pipeline = gst_parse_launch
(</span>"playbin uri='<a
href="file:///Users/drsog/Local/GStream_dev/gst-docs/examples/tutorials/test.mp4"
class="" moz-do-not-send="true">file:///Users/drsog/Local/GStream_dev/gst-docs/examples/tutorials/test.mp4</a>'"<span
style="color: #000000" class="">, error);</span></div>
</div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal; background-color: rgb(255, 255, 255);" class=""><span
style="color: rgb(0, 0, 0); font-family: Menlo; font-size:
11px;" class="">returns with a pipeline with </span></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal; background-color: rgb(255, 255, 255);" class=""><font
class="" face="Menlo"><span style="font-size: 11px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>current_state<span class="Apple-tab-span" style="white-space: pre;"> </span>GstState<span class="Apple-tab-span" style="white-space: pre;"> </span>GST_STATE_NULL</span></font></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal; background-color: rgb(255, 255, 255);" class=""><span
style="color: rgb(0, 0, 0); font-family: Menlo; font-size:
11px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>error
is null </span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; color: rgb(209, 47,
27); background-color: rgb(255, 255, 255);" class=""><br
class="">
</div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; color: rgb(209, 47,
27); background-color: rgb(255, 255, 255);" class=""><br
class="">
</div>
<span class="">After gst_element_set_state (pipeline,
GST_STATE_PLAYING); </span><span style="font-family: Menlo;
font-size: 11px; background-color: rgb(255, 255, 255);" class="">pipeline</span><span
class=""> has the following state:<br class="">
</span>
<div style="margin: 0px; font-stretch: normal; line-height:
normal; background-color: rgb(255, 255, 255);" class="">
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><font class="" face="Menlo"><span
style="font-size: 11px;" class="">current_state<span class="Apple-tab-span" style="white-space: pre;"> </span>GstState<span class="Apple-tab-span" style="white-space: pre;"> </span>GST_STATE_READY</span></font></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><font class="" face="Menlo"><span
style="font-size: 11px;" class="">next_state<span class="Apple-tab-span" style="white-space:pre"> </span>GstState<span class="Apple-tab-span" style="white-space:pre"> </span>GST_STATE_PAUSED</span></font></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><font class="" face="Menlo"><span
style="font-size: 11px;" class="">pending_state<span class="Apple-tab-span" style="white-space: pre;"> </span>GstState<span class="Apple-tab-span" style="white-space: pre;"> </span>GST_STATE_PLAYING</span></font></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><font class="" face="Menlo"><span
style="font-size: 11px;" class="">and ret = </span></font><span
style="color: rgb(49, 89, 93); font-family: Menlo;
font-size: 11px;" class="">GST_STATE_CHANGE_FAILURE</span></div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height:
normal;" class=""><font class="" face="Menlo"><span
style="font-size: 11px;" class="">So the obvious question
is how to get debugging info on </span></font><span
style="color: rgb(49, 89, 93); font-family: Menlo;
font-size: 11px;" class="">GST_STATE_CHANGE_FAILURE.</span></div>
<span class="">Or is the practice to recompile al of gst to get
debugging info (or on the mac apparently </span><a
href="https://medium.com/@maxraskin/background-1b4b6a9c65be"
class="" moz-do-not-send="true">dSYM packages
with dwarf-with-dsym set</a>) so xcode can bind the sources in
debug), and then trace to the cause?</div>
<span class=""><br class="">
</span>
<div class="">Happy to look into it further myself if someone
would be kind enough to mentor me so I don't go down too many
rabbit holes.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class=""><br class="">
</div>
<div class="">Sean Ogden</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
</body>
</html>