Change stream info to PlaYUVerStream file
This commit is contained in:
1 parent
9906befa92
commit
60b82a0bf0
5 files changed
+71
-67
No files matched your search
@@ -34,6 +34,40 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
QDataStream& operator<<( QDataStream& out, const PlaYUVerStreamInfoVector& array )
|
||||
{
|
||||
PlaYUVerStreamInfo d;
|
||||
out << array.size();
|
||||
for( Int i = 0; i < array.size(); i++ )
|
||||
{
|
||||
d = array.at( i );
|
||||
out << d.m_cFilename << d.m_uiWidth
|
||||
<< d.m_uiHeight
|
||||
<< d.m_iPelFormat
|
||||
<< d.m_uiFrameRate;
|
||||
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream& operator>>( QDataStream& in, PlaYUVerStreamInfoVector& array )
|
||||
{
|
||||
PlaYUVerStreamInfo d;
|
||||
Int array_size;
|
||||
in >> array_size;
|
||||
for( Int i = 0; i < array_size; i++ )
|
||||
{
|
||||
in >> d.m_cFilename;
|
||||
in >> d.m_uiWidth;
|
||||
in >> d.m_uiHeight;
|
||||
in >> d.m_iPelFormat;
|
||||
in >> d.m_uiFrameRate;
|
||||
array.append( d );
|
||||
}
|
||||
return in;
|
||||
}
|
||||
|
||||
|
||||
PlaYUVerStream::PlaYUVerStream()
|
||||
{
|
||||
m_bInit = false;
|
||||
|
||||
@@ -36,6 +36,20 @@ namespace plaYUVer
|
||||
|
||||
class LibAvContextHandle;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QString m_cFilename;
|
||||
UInt m_uiWidth;
|
||||
UInt m_uiHeight;
|
||||
Int m_iPelFormat;
|
||||
UInt m_uiFrameRate;
|
||||
}PlaYUVerStreamInfo;
|
||||
typedef QVector<PlaYUVerStreamInfo> PlaYUVerStreamInfoVector;
|
||||
|
||||
QDataStream& operator<<(QDataStream& out, const PlaYUVerStreamInfoVector& d);
|
||||
QDataStream& operator>>(QDataStream& in, PlaYUVerStreamInfoVector& d);
|
||||
|
||||
|
||||
class PlaYUVerStream
|
||||
{
|
||||
private:
|
||||
@@ -47,6 +61,8 @@ private:
|
||||
Bool m_bLoadAll;
|
||||
Int m_iErrorStatus;
|
||||
|
||||
PlaYUVerStreamInfo m_sStreamInfo;
|
||||
|
||||
LibAvContextHandle* m_cLibAvContext;
|
||||
|
||||
QString m_cFilename;
|
||||
@@ -297,8 +313,15 @@ public:
|
||||
m_uiHeight = new_height;
|
||||
}
|
||||
}
|
||||
PlaYUVerStreamInfo getStreamInfo()
|
||||
{
|
||||
return m_sStreamInfo;
|
||||
}
|
||||
};
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
Q_DECLARE_METATYPE(plaYUVer::PlaYUVerStreamInfo);
|
||||
Q_DECLARE_METATYPE(plaYUVer::PlaYUVerStreamInfoVector);
|
||||
|
||||
#endif // __PLAYUVERSTREAM_H__
|
||||
Reference in new issue
Block a user