Fix incorrect/missing application of recording settings in camerabin.
Don't set profiles if no settings are specified. Apply all settings before starting a pipeline as the mode can switch without being restarted and incompatible video recording settings can prevent the pipeline starting even in image capture mode. Set audio encoding settings and encoder profiles if they are supplied. Change-Id: I06febf977c2cae306383f9dbaae0f81f531b4757 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
4565cf26af
commit
dda1bb4716
@@ -106,18 +106,19 @@ void CameraBinAudioEncoder::resetActualSettings()
|
||||
GstEncodingProfile *CameraBinAudioEncoder::createProfile()
|
||||
{
|
||||
QString codec = m_actualAudioSettings.codec();
|
||||
QString preset = m_actualAudioSettings.encodingOption(QStringLiteral("preset")).toString();
|
||||
GstCaps *caps;
|
||||
|
||||
if (codec.isEmpty())
|
||||
caps = gst_caps_new_any();
|
||||
return 0;
|
||||
else
|
||||
caps = gst_caps_from_string(codec.toLatin1());
|
||||
|
||||
return (GstEncodingProfile *)gst_encoding_audio_profile_new(
|
||||
caps,
|
||||
NULL, //preset
|
||||
NULL, //restriction
|
||||
0); //presence
|
||||
!preset.isEmpty() ? preset.toLatin1().constData() : NULL, //preset
|
||||
NULL, //restriction
|
||||
0); //presence
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user