Add new function into PlaYUVerFrame to support more frame formats e.g.
QImage or cv::Mat
This commit is contained in:
1 parent
27cf3e880b
commit
d8031d4c58
2 files changed
+23
-5
No files matched your search
@@ -453,4 +453,13 @@ Pixel PlaYUVerFrame::getPixelValue(const QPoint &pos, ColorSpace space)
|
||||
return pixel_value;
|
||||
}
|
||||
|
||||
|
||||
// Format conversion
|
||||
|
||||
#ifdef USE_OPENCV
|
||||
cv::Mat PlaYUVerFrame::getCvMat()
|
||||
{
|
||||
return cv::Mat();
|
||||
}
|
||||
#endif
|
||||
} // NAMESPACE
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
#include <cassert>
|
||||
#include <QtCore>
|
||||
|
||||
#include "TypeDef.h"
|
||||
@@ -70,10 +70,15 @@ public:
|
||||
static QStringList supportedPixelFormatList()
|
||||
{
|
||||
QStringList formats;
|
||||
for( Int i = 0; i < NUMBER_FORMATS; i++ )
|
||||
{
|
||||
formats.append( gInputStreamFormatsNames[i] );
|
||||
}
|
||||
formats << "YUV420p"
|
||||
<< "YUV444p"
|
||||
<< "YUV411p"
|
||||
<< "YUV411p"
|
||||
<< "YUV410p"
|
||||
<< "GRAY"
|
||||
<< "RGB8" // RGB 3*8 bits per pixel
|
||||
;
|
||||
assert( formats.size() == NUMBER_FORMATS );
|
||||
return formats;
|
||||
}
|
||||
|
||||
@@ -101,6 +106,10 @@ public:
|
||||
return m_pcRGBPelInterlaced;
|
||||
}
|
||||
|
||||
#ifdef USE_OPENCV
|
||||
cv::Mat getCvMat();
|
||||
#endif
|
||||
|
||||
UInt getWidth()
|
||||
{
|
||||
return m_uiWidth;
|
||||
|
||||
Reference in new issue
Block a user