Confusion about Mac OSX / opengl gstreamer

Gerard Toonstra gtoonstra at gmail.com
Fri Aug 10 07:31:25 PDT 2012


There haven't been any replies on this and I'm considering alternatives and
am trying to make things work.

When a new project is created in XCode, it creates its own main.m file and
loads the windows from a NIB.

The gstxoverlay example for cocoa comes pretty close, but needed some work
in areas where
the pointer is no longer allowed to be passed as such (ARC issue) and the
application pool is now changed
to some "@autoreleasepool" directive.

After moving the code to different files, I should have the same setup, but
the video example doesn't yet work
at that point. The window pops up (usually), but is green (videotestsrc)
and the cursor changes to the famous
rotating beach ball when hovering in the window.

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
this window for other purposes. It'd be easier if everything can work as
close as possible to how XCode works,
instead of setting up controls in GTK and handle things that way.


Does anyone know of examples where a NIB file was used to define the looks
of the window and which
initializes the application in main.m in the proper way, such that the
video runs and that all controls are also
able to react to events?  I'm considering that this requires some code
changes as far as the windows themselves
are getting constructed from the NIB description, hook into a couple of
places to set the xwindow id for the video
overlay and do things that way?

Rgds,

Gerard


On Sat, Aug 4, 2012 at 4:53 PM, Gerard Toonstra <gtoonstra at gmail.com> wrote:

> Hello,
>
> 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.
>
> 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.
>
> 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:
>
> http://docs.gstreamer.com/display/GstSDK/Installing+on+Mac+OS+X
>
>
> 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.
>
>
> 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.
>
> 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.
>
> Thanks for your help,
>
> --
> Gerard Toonstra
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120810/7bfa61d9/attachment.html>


More information about the gstreamer-devel mailing list