apply encoding settings when we load camera

If we do not apply those then setting camerabin to READY will fail on SailfishOS because
our camera source does not produce standard YUV data and the default constructed camerabin
encoding profile will not work. This will lead to a situation where camera will never work
This commit is contained in:
Mohammed Sameer
2015-05-29 01:47:54 +03:00
committed by Martin Jones
parent c895f17f7b
commit 9a1e40c211

View File

@@ -764,6 +764,19 @@ void CameraBinSession::load()
return; return;
} }
m_recorderControl->applySettings();
GstEncodingContainerProfile *profile = m_recorderControl->videoProfile();
g_object_set (G_OBJECT(m_camerabin),
"video-profile",
profile,
NULL);
gst_encoding_profile_unref(profile);
setAudioCaptureCaps();
setupCaptureResolution();
gst_element_set_state(m_camerabin, GST_STATE_READY); gst_element_set_state(m_camerabin, GST_STATE_READY);
} }