There haven't been any replies on this and I'm considering alternatives and am trying to make things work.<div><br></div><div>When a new project is created in XCode, it creates its own main.m file and loads the windows from a NIB.</div>
<div><br></div><div>The gstxoverlay example for cocoa comes pretty close, but needed some work in areas where</div><div>the pointer is no longer allowed to be passed as such (ARC issue) and the application pool is now changed</div>
<div>to some "@autoreleasepool" directive.</div><div><br></div><div>After moving the code to different files, I should have the same setup, but the video example doesn't yet work</div><div>at that point. The window pops up (usually), but is green (videotestsrc) and the cursor changes to the famous </div>
<div>rotating beach ball when hovering in the window.</div><div><br></div><div>What I'd like to do now is to use a widget in the center where the video gets played and use standard controls around</div><div>this window for other purposes. It'd be easier if everything can work as close as possible to how XCode works,</div>
<div>instead of setting up controls in GTK and handle things that way.</div><div><br></div><div><br></div><div>Does anyone know of examples where a NIB file was used to define the looks of the window and which </div><div>
initializes the application in main.m in the proper way, such that the video runs and that all controls are also</div><div>able to react to events? I'm considering that this requires some code changes as far as the windows themselves</div>
<div>are getting constructed from the NIB description, hook into a couple of places to set the xwindow id for the video</div><div>overlay and do things that way?</div><div><br></div><div>Rgds,</div><div><br></div><div>Gerard</div>
<div><br></div><div><br><div class="gmail_quote">On Sat, Aug 4, 2012 at 4:53 PM, Gerard Toonstra <span dir="ltr"><<a href="mailto:gtoonstra@gmail.com" target="_blank">gtoonstra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<div><br></div><div>I've been using gstreamer on Linux with great satisfaction. Recently I acquired a Mac and wanted to see how easy it would be to rebuild the application using the Cocoa layouts, preserving as much as possible of the architecture, but upgrading some user interface elements here and there.</div>
<div><br></div><div>I have an rtsp video stream that's transmitted wirelessly and which, on Linux, is displayed straight onto the window frame. It is using the glimagesink for this purpose, so that I can add some relatively simple 3D elements to this video. I'm using gstreamer, because this allows me to have control over latency and other parameters, which are important here.</div>
<div><br></div><div>I was looking to do the same thing on the Mac OSX and have finally managed to get this compiling in Xcode using the excellent mac OSX install packages here:</div><div><br></div><div><a href="http://docs.gstreamer.com/display/GstSDK/Installing+on+Mac+OS+X" target="_blank">http://docs.gstreamer.com/display/GstSDK/Installing+on+Mac+OS+X</a></div>
<div><br></div><div><br></div><div>In some testing, I inadvertently had a mix of macports still available on the system, which caused me to think that glimagesink was available, but later discovered my flaw. It seems that the glimagesink plugin is not available in the SDK version. Is this not supposed to be used anymore or are there other issues on Mac? The code did seem to have a specific "cocoa" example/test available.</div>
<div><br></div><div><br></div><div>What I'm looking for is how to make a simple application with a couple of gui elements and a large OpenGL component in the middle that plays the video and also allows me to perform some additional, custom drawing over that. Ideally, this should a subclass of NSOpenGLView that I can drag onto a window and through some additional code hook up to a gstreamer pipeline and start playing. Most examples I saw create their own main windows and then use the entire area for drawing, which is not what I want to use. Also, a lot of examples were written prior to ARC and some other improvements on Mac OSX.</div>
<div><br></div><div>If that's a yes, is there a general strategy for hooking up the NSOpenGLView to a gstreamer pipeline without creating a window in code in a separate "main" window in C code? The idea is to just use the more Apple-like NIB files to define the windows and restrict the GStreamer stuff within the UI component. I'd like to have as little impact as possible on the Mac development process/XCode.</div>
<div><br></div><div>Thanks for your help,</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- <br>Gerard Toonstra<br><br>
</div>
</font></span></blockquote></div><br>
</div>