Commit graph

95 commits

Author SHA1 Message Date
Julien Isorce
d63c163335 osxvideosink: check for deprecated constants prior to OSX 10.10
cocoawindow.m:339:5: error: 'NSOpenGLPFAWindow'
is deprecated: first deprecated in OS X 10.9

cocoawindow.m:576:7: error: 'NSOpenGLPFAFullScreen'
is deprecated: first deprecated in OS X 10.6

cocoawindow.m:605:24: error: 'setFullScreen'
is deprecated: first deprecated in OS X 10.7
2015-03-24 23:16:26 +00:00
Sebastian Dröge
81e15d22c0 osxvideosink: Disable hack for NSApp iteration with a special #define
The hack causes deadlocks and other interesting problems and it really
can only be fixed properly inside GLib. We will include a patch for
GLib in our builds for now that handles this, and hopefully at some
point GLib will also merge a proper solution.

A proper solution would first require to refactor the polling in
GMainContext to only provide a single fd, e.g. via epoll/kqueue
or a thread like the one added by our patch. Then this single
fd could be retrieved from the GMainContext and directly integrated
into a NSRunLoop.

https://bugzilla.gnome.org/show_bug.cgi?id=741450
https://bugzilla.gnome.org/show_bug.cgi?id=704374
2015-01-10 15:54:22 +01:00
Wim Taymans
0b881ab2ce osxvideosink: clear rectangle structures before use 2014-12-16 13:25:01 +01:00
Andoni Morales Alastruey
93653ae5f9 osxvideosink: remove legacy code for passing a window handle
"have-ns-view" and the "embed" property was kept in 0.10 for
backwards compatibility but it's no longer used in favor of
the GstVideoOverlay interface

https://bugzilla.gnome.org/show_bug.cgi?id=703753
2014-06-23 20:40:09 +02:00
Sebastian Dröge
7c006edf8d osxvideosink: Set rank to MARGINAL
If available we prefer using glimagesink over osxvideosink. It supports
more formats and in general has more features than osxvideosink.
2014-04-12 22:17:30 +02:00
Matthieu Bouron
7ac0204625 osxvideosink: use the video frame API instead of the video meta API
https://bugzilla.gnome.org/show_bug.cgi?id=726738
2014-04-08 13:56:10 +02:00
Matthieu Bouron
c6dcd3689d osxvideosink: advertize video meta API support
https://bugzilla.gnome.org/show_bug.cgi?id=726737
2014-04-08 13:55:53 +02:00
Thijs Vermeir
e96f0c03ef osxvideo: fix build on Mac OSX Mavericks and put new window in front
GetCurrentProcess/SetFrontProcess/TransformProcessType was deprecated
and now removed in Mac OSX 10.9. orderFrontRegardless is used to make
the video window the most front window.
2014-03-05 20:35:31 +01:00
Edward Hervey
f56effbc81 osxvideo: Fix libtool usage
--tag=CC is needed for static build
2014-02-05 12:46:54 +01:00
Jeremy Huddleston Sequoia
2bc631bcd0 osxvideo: unifdef -DRUN_NS_APP_THREAD 2014-01-02 10:01:54 +01:00
Jeremy Huddleston Sequoia
6fe2115d77 osxvideo: Assume SDK and deployment target are at least Snow Leopard 2014-01-02 10:01:28 +01:00
Sebastian Dröge
5b1c0a4cfd osx: Make OSX version checks more consistent
And especially also consider update versions, e.g. 10.5 with updates
will be 1051 or similar and thus bigger than MAC_OS_X_VERSION_10_5 but
still won't have the API we want to use.
2013-12-31 10:11:24 +01:00
Jeremy Huddleston
3d163680f0 osxvideosink: Fix build on updated OS X Leopard
https://bugzilla.gnome.org/show_bug.cgi?id=721245
2013-12-31 10:11:24 +01:00
Alessandro Decina
fdf8ac40d8 osxvideosink: fix segfault when dealing with padded frames
Fixes crashes with vtdec ! osxvideosink where VideoToolbox outputs padded UYVY
2013-12-08 16:51:00 +01:00
Matthieu Bouron
d57b9628fc osxvideosink: fix missing selector name warnings
The spaces matter in ObjC

https://bugzilla.gnome.org/show_bug.cgi?id=711013
2013-10-28 14:40:16 +00:00
Andoni Morales Alastruey
05f6c094fa osxvideosink: fix segfault releasing the sink
show_frame is deferred to the main thread and can be called
when the sink has been released, so we need to keep an extra ref
on ObjectiveC object helper.

https://bugzilla.gnome.org/show_bug.cgi?id=708501
2013-09-24 09:59:51 +02:00
Andoni Morales Alastruey
fbafca49f8 osxvideosink: warn about the future deprecation of the "embed" property 2013-07-17 13:29:42 +02:00
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
34a5b93637 osxvideosink: default to the main in case we are not setup yet 2013-07-10 17:43:00 +02:00
Andoni Morales Alastruey
0e321b87d4 osxvideosink: close the internal window correctly 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
025f226e60 osxvideosink: fix support in VM's without hardware acceleration 2013-06-18 10:41:37 +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
Andoni Morales Alastruey
baa23d314d osxvideosink: fix segfault accessing osxwindow when not set yet 2013-04-16 14:54:06 +02:00
Sebastian Dröge
b0b0557c48 gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
Todd Agulnick
a30476497f osxvideo: include pthread.h to fix compiler warning
https://bugzilla.gnome.org/show_bug.cgi?id=697303
2013-04-05 09:34:23 +01:00
Alexey Chernov
63235d1054 osxvideosink: Make GstNavigation key input events in osxvideosink compatible with x(v)imagesink ones 2013-01-31 11:44:22 +01:00
Alexey Chernov
a8fe984d65 osxvideosink: Fix crash in osxvideosink with external window output 2013-01-16 11:43:56 +01:00
Alexey Chernov
77fde4b8ba osxvideosink: Make GstGLView propagate input events to its parent view
Fixes bug #691832
2013-01-16 11:38:16 +01:00
Alexey Chernov
d4622c974f osxvideosink: Fix resizing the Cocoa window on receiving new caps
Fixes bug #689732.
2012-12-10 11:45:10 +00: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
Tim-Philipp Müller
b2b3de569a osxvideosink: default to force-aspect-ratio=true 2012-06-29 11:51:30 +01:00
Thiago Santos
44d010277c osxvideo: straightforward port to 0.11 2012-06-05 17:53:58 -03: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
88554404e6 osxvideosink: Put the right flags in the right variable 2012-05-30 13:51:35 +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
Sebastian Dröge
6bd61f861c configure: Add OBJC specific compiler flags
See bug #643939.
2012-05-30 11:28:33 +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
57e43aeb21 osxvideosink: start the loop before calling [gstview haveSuperview]
...as haveSuperview requires the mainloop to be running
2012-05-24 14:36:13 +02:00
Alessandro Decina
dc8de54cce osxvideosink: fix indentation 2012-05-24 14:36:09 +02:00
Alessandro Decina
fdf5fd9f16 osxvideosink: enable running the cocoa main runloop in a thread 2012-05-24 14:36:03 +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
Alessandro Decina
e3cba62b7e osxvideosink: reset app_started to FALSE when shutting down 2012-05-24 14:35:55 +02:00
Alessandro Decina
645b37e80a osxvideosink: rename cocoa runloop helper funcs 2012-05-24 14:35:51 +02:00
Alessandro Decina
7f576b923a osxvideosink: don't create application menus 2012-05-24 14:35:46 +02:00