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
@ -151,9 +151,10 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||||||
|
|
||||||
deviceIndex = DEFAULT_DEVICE_INDEX;
|
deviceIndex = DEFAULT_DEVICE_INDEX;
|
||||||
|
|
||||||
mainQueue = dispatch_get_main_queue ();
|
mainQueue =
|
||||||
|
dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc.main", NULL);
|
||||||
workerQueue =
|
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_live (baseSrc, TRUE);
|
||||||
gst_base_src_set_format (baseSrc, GST_FORMAT_TIME);
|
gst_base_src_set_format (baseSrc, GST_FORMAT_TIME);
|
||||||
@ -164,6 +165,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||||||
|
|
||||||
- (void)finalize
|
- (void)finalize
|
||||||
{
|
{
|
||||||
|
dispatch_release (mainQueue);
|
||||||
mainQueue = NULL;
|
mainQueue = NULL;
|
||||||
dispatch_release (workerQueue);
|
dispatch_release (workerQueue);
|
||||||
workerQueue = NULL;
|
workerQueue = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user