Commit f7edc0c6 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo

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.
parent a6267f38
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>
Patch by: William M. Brack <wbrack at mmm com hk>
......
......@@ -77,6 +77,7 @@ struct _GstOSXVideoSink {
gint fps_d;
GstTask *event_task;
GStaticRecMutex event_task_lock;
/* Unused */
gint pixel_width, pixel_height;
......
......@@ -125,7 +125,7 @@ cocoa_event_loop (GstOSXVideoSink * vsink)
untilDate:[NSDate distantPast]
inMode:NSDefaultRunLoopMode dequeue:YES ];
if ( event == nil ) {
g_usleep (100);
g_usleep (2000);
break;
} else {
switch ([event type]) {
......@@ -280,8 +280,10 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
[NSApp setDelegate:[[GstAppDelegate alloc] init]];
[NSApp setRunning];
g_static_rec_mutex_init (&osxvideosink->event_task_lock);
osxvideosink->event_task = gst_task_create ((GstTaskFunction)cocoa_event_loop,
osxvideosink);
gst_task_set_lock (osxvideosink->event_task, &osxvideosink->event_task_lock);
gst_task_start (osxvideosink->event_task);
} else {
GstStructure *s;
......@@ -327,6 +329,7 @@ gst_osx_video_sink_osxwindow_destroy (GstOSXVideoSink * osxvideosink,
gst_task_join (osxvideosink->event_task);
gst_object_unref (osxvideosink->event_task);
osxvideosink->event_task = NULL;
g_static_rec_mutex_free (&osxvideosink->event_task_lock);
}
g_free (osxwindow);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment