Commit c924cdc8 authored by Val Doroshchuk's avatar Val Doroshchuk

argb

parent 02361a35
......@@ -53,7 +53,9 @@
void AppSrc::imageReady()
{
m_frame = m_grabResult->image();
auto img = m_grabResult->image();
img.reinterpretAsFormat(QImage::Format_ARGB32);
m_frame = img;
m_grabResult.reset();
}
......
......@@ -67,14 +67,10 @@ private:
bool QGstreamerAppSrcPrivate::restart(QVideoFrame &frame)
{
QList<QVideoFrame::PixelFormat> cc;
auto format = frame.pixelFormat();
if (format == QVideoFrame::Format_ARGB32_Premultiplied)
format = QVideoFrame::Format_RGB32;
cc << format;
cc << frame.pixelFormat();
GstCaps *caps = QGstUtils::capsForFormats(cc);
if (gst_caps_is_empty(caps)) {
qWarning() << "Could not create caps for" << format;
qWarning() << "Could not create caps for" << frame.pixelFormat();
gst_caps_unref(caps);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment