Camerabin camera service: configure default video settings
encodebin doesn't like the encoding profile with ANY container caps, if container and codecs are not specified try to find a commonly used supported combination Change-Id: Icbde042bd17d9682112fb8bbb8f0d506f6ddebe1 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
b6a8c713bc
commit
864ab3a39a
@@ -79,24 +79,40 @@ void CameraBinContainer::setContainerFormat(const QString &format)
|
||||
{
|
||||
if (m_format != format) {
|
||||
m_format = format;
|
||||
m_actualFormat = format;
|
||||
emit settingsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QString CameraBinContainer::actualContainerFormat() const
|
||||
{
|
||||
return m_actualFormat;
|
||||
}
|
||||
|
||||
void CameraBinContainer::setActualContainerFormat(const QString &containerFormat)
|
||||
{
|
||||
m_actualFormat = containerFormat;
|
||||
}
|
||||
|
||||
void CameraBinContainer::resetActualContainerFormat()
|
||||
{
|
||||
m_actualFormat = m_format;
|
||||
}
|
||||
|
||||
GstEncodingContainerProfile *CameraBinContainer::createProfile()
|
||||
{
|
||||
GstCaps *caps;
|
||||
|
||||
if (m_format.isEmpty()) {
|
||||
if (m_actualFormat.isEmpty()) {
|
||||
caps = gst_caps_new_any();
|
||||
} else {
|
||||
QString format = m_format;
|
||||
QString format = m_actualFormat;
|
||||
QStringList supportedFormats = m_supportedContainers.supportedCodecs();
|
||||
|
||||
//if format is not in the list of supported gstreamer mime types,
|
||||
//try to find the mime type with matching extension
|
||||
if (!supportedFormats.contains(format)) {
|
||||
QString extension = suggestedFileExtension(m_format);
|
||||
QString extension = suggestedFileExtension(m_actualFormat);
|
||||
foreach (const QString &formatCandidate, supportedFormats) {
|
||||
if (suggestedFileExtension(formatCandidate) == extension) {
|
||||
format = formatCandidate;
|
||||
|
||||
Reference in New Issue
Block a user