Commit graph

30 commits

Author SHA1 Message Date
Andoni Morales Alastruey
d57ef52cad osxvideosink: defer the window handle setup to the main thread 2013-07-10 17:43:00 +02:00
Andoni Morales Alastruey
213fa3af0d osxvideosink: only create the NS app thread for Cocoa once
The helper thread for Cocoa, in case no NS run loop is running,
should be started only once and shared across all the instances
running
2013-07-10 17:42:59 +02:00
Andoni Morales Alastruey
bb980775f8 osxvideosink: fix setting window handle after transition
The destroyed flag was not reset properly and it's also not needed
as we can check osxwindow != NULL
2013-05-02 14:03:43 +02:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Martin Ertsaas
7fcbf88ced osxvideosink: Make osxvideosink use the non-deprecated threading api from glib.
https://bugzilla.gnome.org/show_bug.cgi?id=682446
2012-08-22 11:09:55 +01:00
Andoni Morales Alastruey
6b7f165190 osxvideosink: add a better detection for the main run loop 2012-08-06 10:59:09 +02:00
Josep Torra
bb8cdf4cc5 osxvideosink: Really fix the build on 10.5
The API that we use to run the Cocoa loop in another
thread does not exist in 10.5 or earlier.
2012-05-31 10:26:27 +02:00
Alessandro Decina
f20cdcd36b osxvideosink: fix race in starting the runloop thread
Block gst_osx_video_sink_run_cocoa_loop until the loop thread has started and
finished initializing NSApp. Fixes occasional warnings/crashes due to two
threads going inside NSApp before finishLaunching had completed.
2012-05-31 10:26:10 +02:00
Josep Torra
76b7998e4f osxvideosink: Fix last commit to actually work
MAC_OS_X_VERSION_10_6 is obviously not defined on 10.5.
2012-05-30 16:03:55 +02:00
Sebastian Dröge
efab9e6aa3 osxvideosink: NSWindowDelegate is available in all OSX versions newer than 10.6 2012-05-30 12:43:37 +02:00
Josep Torra
c106a3653b osxvideosink: Fix build with older OSX versions 2012-05-30 12:40:57 +02:00
Andoni Morales Alastruey
5b3d3b0885 osxvideosink: make sure all selectors are performed on the same thread
When we are using a dedicated thread to run the main run loop we
must make sure that all selectors are performed on this same thread.
For instance if performSelectorOnMainThread is called from the real
main thread, it will not go through the message queue and will be
executed from the real main thread. By forcing the target thread,
we ensure that all functions will be called either from the real
main thread when the main run loop is running or from our thread
spinning the main loop.
2012-05-25 11:07:35 +02:00
Alessandro Decina
718837d914 osxvideosink: add code to optionally run the cocoa main runloop in a separate thread
Add a little hack to run the cocoa main runloop from a separate thread _when_
the main runloop is not being run (which means that the app doesn't use cocoa).
Runloops are thread specific, so the hack boils down to getting the runloop for
the main thread and setting it as the runloop for our dedicated thread.
2012-05-24 14:35:59 +02:00
Andoni Morales Alastruey
a3cf0ab5f5 osxvideosink: reset the embed property for backward compatilibity 2012-05-24 14:35:42 +02:00
Andoni Morales Alastruey
fd19abf9ee osxvideosink: add force-aspect-ratio property 2012-05-24 14:35:32 +02:00
Andoni Morales Alastruey
9b8bfe9b9e osxvideosink: start internal window if no view is provided 2012-05-24 14:35:27 +02:00
Andoni Morales Alastruey
088bc6b056 osvideosink: create, destroy, resize and draw from the main thread 2012-05-24 14:35:16 +02:00
Alessandro Decina
5f9f71b38e osxvideosink: implement the xoverlay interface. Fixes #618349. 2010-05-11 19:58:00 +02:00
Michael Smith
b9ca852b51 osxvideosink: remove non-embedded mode and fix memory management.
Remove non-embedded mode. Embed mode becomes default and only mode.
embed property is retained for binary compatibility.
Added autorelease pools around all objc functions that might be called
from a non-main thread.
2009-02-05 15:53:04 -08:00
Michael Smith
e6075940b1 sys/osxvideo/osxvideosink.*: Handle video window resizing more correctly, avoiding crashes when embedding the window ...
Original commit message from CVS:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Handle video window resizing more correctly, avoiding crashes when
embedding the window and resizing it.
2008-11-20 23:59:07 +00:00
Andy Wingo
f7edc0c690 sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
Original commit message from CVS:
2008-03-18  Andy Wingo  <wingo@pobox.com>

* sys/osxvideo/osxvideosink.m
(gst_osx_video_sink_osxwindow_destroy)
(gst_osx_video_sink_osxwindow_new): Actually set a lock on the
task, whoopdee.
(cocoa_event_loop): Pacify the taymans by upping the usleepage to
2 ms.
2008-03-18 15:03:06 +00:00
Andy Wingo
a6267f383e sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
Original commit message from CVS:
2008-03-18  Andy Wingo  <wingo@pobox.com>

* sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
(gst_osx_video_sink_osxwindow_new, cocoa_event_loop):
* sys/osxvideo/osxvideosink.h (struct _GstOSXVideoSink): If we
need to run an event loop, do so in a task instead of assuming
that there will be a GMainLoop. Fixes #523134.
2008-03-18 11:50:08 +00:00
Stefan Kost
567ec26deb Revert previous change caused by a file that got stuck on an old revision.
Original commit message from CVS:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* sys/osxvideo/osxvideosink.h:
Revert previous change caused by a file that got stuck on an old
revision.
2008-01-15 16:04:44 +00:00
Stefan Kost
04c899f757 Managed to resolve most unused declarations. Filed a bug for one left.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* sys/osxaudio/gstosxaudiosink.h:
* sys/osxvideo/osxvideosink.h:
Managed to resolve most unused declarations. Filed a bug for one left.
2008-01-15 15:22:41 +00:00
Edward Hervey
0389794224 sys/osxvideo/osxvideosink.*: Remove the event-loop-in-separate-thread modifications, because MacOSX is $#@(*%$# ! For...
Original commit message from CVS:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Remove the event-loop-in-separate-thread modifications, because MacOSX
is $#@(*%$# ! For those wondering, the event handling needs to be done
in the main thread after all..
2007-05-17 10:59:00 +00:00
Edward Hervey
284c7f0ff9 sys/osxvideo/osxvideosink.*: Fix a stupid #if vs #ifdef bug. Should use the proper colorspace now.
Original commit message from CVS:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Fix a stupid #if vs #ifdef bug. Should use the proper colorspace now.
Use a separate thread/task for the cocoa event_loop, else it wouldn't
stop.
2007-05-17 09:41:48 +00:00
Edward Hervey
c209a3f894 sys/osxvideo/: Fix leaks when running a NSApp.
Original commit message from CVS:
* sys/osxvideo/cocoawindow.h:
* sys/osxvideo/cocoawindow.m:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Fix leaks when running a NSApp.
Accept any kind of resolutions.
Works in fullscreen. Can maximize.
Only thing left before being able to move this to -good is documentation
and embedded window support.
2007-03-14 16:30:19 +00:00
Christian Schaller
b9820ee991 update copyright statements
Original commit message from CVS:
update copyright statements
2007-02-27 12:02:03 +00:00
Edward Hervey
a471de34bf sys/osxvideo/: Disable the cocoa event loop since it's a huge memory leak. Should only matter if the sink isn't used ...
Original commit message from CVS:
* sys/osxvideo/cocoawindow.h:
* sys/osxvideo/cocoawindow.m:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Disable the cocoa event loop since it's a huge memory leak. Should only
matter if the sink isn't used within an NSApp (which has already got
a coca event loop).
Remove all unused code.
2007-02-27 11:30:19 +00:00
Edward Hervey
5d004d2c32 configure.ac: Check for an Objective C compiler
Original commit message from CVS:
* configure.ac:
Check for an Objective C compiler
* sys/Makefile.am:
* sys/osxvideo/Makefile.am:
* sys/osxvideo/cocoawindow.h:
* sys/osxvideo/cocoawindow.m:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Port of osxvideo plugin to 0.10. Do NOT consider 100% stable !
Fixes #402470
2007-01-30 17:19:33 +00:00