[gst-devel] osxvideosink: how to get the window id?
laguillaumie sylvain
s.lagui at free.fr
Tue Apr 19 10:50:20 PDT 2011
Le 18 avr. 2011 à 17:02, Antoine Martin a écrit :
Hi
> On 04/18/2011 06:47 PM, Sylvain LAGUILLAUMIE wrote:
>> hi
>>
>> i had the same problem with my app, it s now fixed with the nsview added
>> in pygtk 2.24,
> Can you expand on that? What is this "nsview" fix?
I have a gtk.DrawingArea as self.movie_window in my app to embed the videos from gstreamer (i use playbin...) here's my on_sync_message function (with pygtk 2.24)
def on_sync_message(self, bus, message):
if message.structure is None:
return
win_id = None
message_name = message.structure.get_name()
if message_name == "prepare-xwindow-id":
if sys.platform == "win32":
win_id = self.movie_window.window.handle
elif sys.platform == "darwin":
print self.window.window.nsview
win_id = self.movie_window.window.nsview
else:
win_id = self.movie_window.window.xid
gtk.gdk.threads_enter()
self.sink.set_xwindow_id(win_id)
gtk.gdk.threads_leave()
the nsview now return the window id correctly BUT i can t play any videos... it was working when i builded gtk, gstreamer.... with x11 but now i rebuilded it all with +no_x11 +quartz and now i just have bus_error
osx crash report :
http://pylonshq.com/pasties/a0d90ebdc8ae993120b6b50dcb075a24
if someone have an idear or know where i can report it...
thanks
>
>> don t know for wxwidget...But now i have a bus error when
>> trying to play a video with osxvideosink... i posted 1 week ago on this
>> list but my post is still pending ...
> Hah, I also get a bus error, I assumed it was because osxvideosink
> needed a window or something.
>
> Anyone?
>
> Thanks
> Antoine
>
>
>>
>> good luck...
>>
>> thanks
>>
>> Antoine Martin a écrit :
>>> On 06/23/2010 06:01 PM, Farkas Levente wrote:
>>>
>>>> On 06/23/2010 12:27 PM, Philippe Normand wrote:
>>>>
>>>>> On Sun, 2010-06-13 at 07:30 -0700, Thomas Loewe wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> as i understand the latest osxvideosink now supports the xoverlay
>>>>>> interface
>>>>>> and i can set the output window via gst_x_overlay_set_xwindow_id().
>>>>>>
>>>>>> My app (based on wxwidgets) is running fine on windows and linux,
>>>>>> but on osx
>>>>>> i dont know how to get the window id to redirect the video to my
>>>>>> own window.
>>>>>>
>>>>>> Is there any example how to do this on osx?
>>>>>>
>>>>>> Thank you,
>>>>>> Thomas
>>>>>>
>>>>> The osxvideosink sends a pointer to a NSView to the application via a
>>>>> message containing a have-ns-view structure, small snippet:
>>>>>
>>>>> if (gst_structure_has_name(message->structure, "have-ns-view")) {
>>>>> videoWindow =(NSView*)
>>>>> g_value_get_pointer(gst_structure_get_value(message->structure,
>>>>> "nsview"));
>>>>>
>>>>> Then you can map the NSView to a NSWindow and show it. The message
>>>>> needs
>>>>> to be handled synchronously by the application.
>>>>>
>>>>> If you want a complete example, Alessandro (twi_ on IRC) told me he has
>>>>> one written in Python :)
>>>>>
>>>> if possible i also like to get that complete example:-)
>>>>
>>> +1
>>>
>>> On Linux and Windows, I simply use:
>>> gst.parse_launch(" .. ! .. ! ..")
>>> Does this mean that it won't work for osxvideosink now?
>>> Will I have to construct the pipeline manually and link the pads, etc
>>> Really? Ouch. :(
>>>
>>> Thanks
>>> Antoine
>>>
>>>
>>>
>>>
>>>> thanks in advance.
>>>> regards.
>>>>
>>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list