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
@@ -338,7 +338,7 @@ void CameraBinSession::setupCaptureResolution()
|
||||
}
|
||||
|
||||
if (m_captureMode == QCamera::CaptureVideo) {
|
||||
QSize resolution = m_videoEncodeControl->videoSettings().resolution();
|
||||
QSize resolution = m_videoEncodeControl->actualVideoSettings().resolution();
|
||||
//qreal framerate = m_videoEncodeControl->videoSettings().frameRate();
|
||||
|
||||
if (resolution.isEmpty()) {
|
||||
@@ -644,12 +644,16 @@ void CameraBinSession::setState(QCamera::State newState)
|
||||
GstState pending = GST_STATE_NULL;
|
||||
gst_element_get_state(m_camerabin, &binState, &pending, 0);
|
||||
|
||||
setupCaptureResolution();
|
||||
if (captureMode() == QCamera::CaptureVideo)
|
||||
if (captureMode() == QCamera::CaptureVideo) {
|
||||
m_recorderControl->applySettings();
|
||||
|
||||
g_object_set (G_OBJECT(m_camerabin),
|
||||
"video-profile",
|
||||
m_recorderControl->videoProfile(),
|
||||
NULL);
|
||||
}
|
||||
|
||||
setupCaptureResolution();
|
||||
|
||||
gst_element_set_state(m_camerabin, GST_STATE_PLAYING);
|
||||
}
|
||||
@@ -947,7 +951,7 @@ void CameraBinSession::recordVideo()
|
||||
m_recordingActive = true;
|
||||
m_actualSink = m_sink;
|
||||
if (m_actualSink.isEmpty()) {
|
||||
QString ext = m_mediaContainerControl->suggestedFileExtension(m_mediaContainerControl->containerFormat());
|
||||
QString ext = m_mediaContainerControl->suggestedFileExtension(m_mediaContainerControl->actualContainerFormat());
|
||||
m_actualSink = QUrl::fromLocalFile(generateFileName("clip_", defaultDir(QCamera::CaptureVideo), ext));
|
||||
} else if (!m_actualSink.isLocalFile()) {
|
||||
m_actualSink = QUrl::fromLocalFile(m_actualSink.toEncoded());
|
||||
|
||||
Reference in New Issue
Block a user