mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
avfvideosrc: use a dedicated queue for AVFoundation calls
Replace the main queue with a dedicated queue for AVFoundation calls so the execution on this queue won't block if the main queue is not running.
This commit is contained in:
parent
5d612768a4
commit
7f807270fa
1 changed files with 4 additions and 2 deletions
|
@ -151,9 +151,10 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||
|
||||
deviceIndex = DEFAULT_DEVICE_INDEX;
|
||||
|
||||
mainQueue = dispatch_get_main_queue ();
|
||||
mainQueue =
|
||||
dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc.main", NULL);
|
||||
workerQueue =
|
||||
dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc", NULL);
|
||||
dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc.output", NULL);
|
||||
|
||||
gst_base_src_set_live (baseSrc, TRUE);
|
||||
gst_base_src_set_format (baseSrc, GST_FORMAT_TIME);
|
||||
|
@ -164,6 +165,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||
|
||||
- (void)finalize
|
||||
{
|
||||
dispatch_release (mainQueue);
|
||||
mainQueue = NULL;
|
||||
dispatch_release (workerQueue);
|
||||
workerQueue = NULL;
|
||||
|
|
Loading…
Reference in a new issue