mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
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.
This commit is contained in:
parent
a6267f383e
commit
f7edc0c690
3 changed files with 23 additions and 1 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
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 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-17 Tim-Philipp Müller <tim at centricular dot net>
|
2008-03-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: William M. Brack <wbrack at mmm com hk>
|
Patch by: William M. Brack <wbrack at mmm com hk>
|
||||||
|
|
|
@ -77,6 +77,7 @@ struct _GstOSXVideoSink {
|
||||||
gint fps_d;
|
gint fps_d;
|
||||||
|
|
||||||
GstTask *event_task;
|
GstTask *event_task;
|
||||||
|
GStaticRecMutex event_task_lock;
|
||||||
|
|
||||||
/* Unused */
|
/* Unused */
|
||||||
gint pixel_width, pixel_height;
|
gint pixel_width, pixel_height;
|
||||||
|
|
|
@ -125,7 +125,7 @@ cocoa_event_loop (GstOSXVideoSink * vsink)
|
||||||
untilDate:[NSDate distantPast]
|
untilDate:[NSDate distantPast]
|
||||||
inMode:NSDefaultRunLoopMode dequeue:YES ];
|
inMode:NSDefaultRunLoopMode dequeue:YES ];
|
||||||
if ( event == nil ) {
|
if ( event == nil ) {
|
||||||
g_usleep (100);
|
g_usleep (2000);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
switch ([event type]) {
|
switch ([event type]) {
|
||||||
|
@ -280,8 +280,10 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
[NSApp setDelegate:[[GstAppDelegate alloc] init]];
|
[NSApp setDelegate:[[GstAppDelegate alloc] init]];
|
||||||
|
|
||||||
[NSApp setRunning];
|
[NSApp setRunning];
|
||||||
|
g_static_rec_mutex_init (&osxvideosink->event_task_lock);
|
||||||
osxvideosink->event_task = gst_task_create ((GstTaskFunction)cocoa_event_loop,
|
osxvideosink->event_task = gst_task_create ((GstTaskFunction)cocoa_event_loop,
|
||||||
osxvideosink);
|
osxvideosink);
|
||||||
|
gst_task_set_lock (osxvideosink->event_task, &osxvideosink->event_task_lock);
|
||||||
gst_task_start (osxvideosink->event_task);
|
gst_task_start (osxvideosink->event_task);
|
||||||
} else {
|
} else {
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
|
@ -327,6 +329,7 @@ gst_osx_video_sink_osxwindow_destroy (GstOSXVideoSink * osxvideosink,
|
||||||
gst_task_join (osxvideosink->event_task);
|
gst_task_join (osxvideosink->event_task);
|
||||||
gst_object_unref (osxvideosink->event_task);
|
gst_object_unref (osxvideosink->event_task);
|
||||||
osxvideosink->event_task = NULL;
|
osxvideosink->event_task = NULL;
|
||||||
|
g_static_rec_mutex_free (&osxvideosink->event_task_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (osxwindow);
|
g_free (osxwindow);
|
||||||
|
|
Loading…
Reference in a new issue