mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
applemedia: avfvideosrc: enable renegotiation
We can actually renegotiate now, so remove old check which disabled it.
This commit is contained in:
parent
519280204c
commit
b0f5d4f1d5
1 changed files with 3 additions and 17 deletions
|
@ -490,7 +490,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
|
|
||||||
result_gl_caps = gst_caps_simplify (gst_caps_merge (result_gl_caps, result_caps));
|
result_gl_caps = gst_caps_simplify (gst_caps_merge (result_gl_caps, result_caps));
|
||||||
|
|
||||||
GST_INFO_OBJECT (element, "Device returned the following caps %" GST_PTR_FORMAT, result_gl_caps);
|
GST_DEBUG_OBJECT (element, "Device returned the following caps %" GST_PTR_FORMAT, result_gl_caps);
|
||||||
|
|
||||||
return result_gl_caps;
|
return result_gl_caps;
|
||||||
}
|
}
|
||||||
|
@ -683,8 +683,6 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
dispatch_sync (mainQueue, ^{
|
dispatch_sync (mainQueue, ^{
|
||||||
int newformat;
|
int newformat;
|
||||||
|
|
||||||
g_assert (![session isRunning]);
|
|
||||||
|
|
||||||
if (captureScreen) {
|
if (captureScreen) {
|
||||||
#if !HAVE_IOS
|
#if !HAVE_IOS
|
||||||
AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input;
|
AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input;
|
||||||
|
@ -764,6 +762,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
GST_INFO_OBJECT (element, "configured caps %"GST_PTR_FORMAT
|
GST_INFO_OBJECT (element, "configured caps %"GST_PTR_FORMAT
|
||||||
", pushing textures %d", caps, textureCache != NULL);
|
", pushing textures %d", caps, textureCache != NULL);
|
||||||
|
|
||||||
|
if (![session isRunning])
|
||||||
[session startRunning];
|
[session startRunning];
|
||||||
|
|
||||||
/* Unlock device configuration only after session is started so the session
|
/* Unlock device configuration only after session is started so the session
|
||||||
|
@ -1151,11 +1150,9 @@ static gboolean gst_avf_video_src_unlock (GstBaseSrc * basesrc);
|
||||||
static gboolean gst_avf_video_src_unlock_stop (GstBaseSrc * basesrc);
|
static gboolean gst_avf_video_src_unlock_stop (GstBaseSrc * basesrc);
|
||||||
static GstFlowReturn gst_avf_video_src_create (GstPushSrc * pushsrc,
|
static GstFlowReturn gst_avf_video_src_create (GstPushSrc * pushsrc,
|
||||||
GstBuffer ** buf);
|
GstBuffer ** buf);
|
||||||
static gboolean gst_avf_video_src_negotiate (GstBaseSrc * basesrc);
|
|
||||||
static GstCaps * gst_avf_video_src_fixate (GstBaseSrc * bsrc,
|
static GstCaps * gst_avf_video_src_fixate (GstBaseSrc * bsrc,
|
||||||
GstCaps * caps);
|
GstCaps * caps);
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_avf_video_src_class_init (GstAVFVideoSrcClass * klass)
|
gst_avf_video_src_class_init (GstAVFVideoSrcClass * klass)
|
||||||
{
|
{
|
||||||
|
@ -1178,7 +1175,6 @@ gst_avf_video_src_class_init (GstAVFVideoSrcClass * klass)
|
||||||
gstbasesrc_class->unlock = gst_avf_video_src_unlock;
|
gstbasesrc_class->unlock = gst_avf_video_src_unlock;
|
||||||
gstbasesrc_class->unlock_stop = gst_avf_video_src_unlock_stop;
|
gstbasesrc_class->unlock_stop = gst_avf_video_src_unlock_stop;
|
||||||
gstbasesrc_class->fixate = gst_avf_video_src_fixate;
|
gstbasesrc_class->fixate = gst_avf_video_src_fixate;
|
||||||
gstbasesrc_class->negotiate = gst_avf_video_src_negotiate;
|
|
||||||
|
|
||||||
gstpushsrc_class->create = gst_avf_video_src_create;
|
gstpushsrc_class->create = gst_avf_video_src_create;
|
||||||
|
|
||||||
|
@ -1421,16 +1417,6 @@ gst_avf_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gst_avf_video_src_negotiate (GstBaseSrc * basesrc)
|
|
||||||
{
|
|
||||||
/* FIXME: We don't support reconfiguration yet */
|
|
||||||
if (gst_pad_has_current_caps (GST_BASE_SRC_PAD (basesrc)))
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return GST_BASE_SRC_CLASS (parent_class)->negotiate (basesrc);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_avf_video_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
|
gst_avf_video_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
|
|
Loading…
Reference in a new issue