Change some variable to PlaYUVerStreamHandlerIf and make it friend of PlaYUVerStream

This commit is contained in:
jfmcarreira committed 2016-04-03 23:33:38 +01:00
1 parent 51834ae5a7
commit 55ae2a0e7f
9 files changed
+126 -163

No files matched your search

+16 -4
View File
@@ -26,6 +26,7 @@
#define __PLAYUVERSTREAMHANDLERIF_H__
#include "PlaYUVerDefs.h"
#include "PlaYUVerStream.h"
#include "PlaYUVerFrame.h"
namespace plaYUVer
@@ -43,10 +44,17 @@ namespace plaYUVer
*/
class PlaYUVerStreamHandlerIf
{
friend class PlaYUVerStream;
public:
PlaYUVerStreamHandlerIf()
{
m_bIsInput = true;
m_uiWidth = 0;
m_uiHeight = 0;
m_iPixelFormat = -1;
m_uiBitsPerPixel = 8;
m_iEndianness = -1;
m_dFrameRate = 30;
}
virtual ~PlaYUVerStreamHandlerIf()
{
@@ -60,10 +68,6 @@ public:
virtual Bool read( PlaYUVerFrame* pcFrame ) = 0;
virtual Bool write( PlaYUVerFrame* pcFrame ) = 0;
virtual Void getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBitsPerPel, Int& rEndianness, Double& rFrameRate )
{
return;
}
Void setBytesPerFrame( UInt64 uiNBytes )
{
m_uiNBytesPerFrame = uiNBytes;
@@ -79,6 +83,14 @@ public:
protected:
Bool m_bIsInput;
std::string m_cFilename;
UInt m_uiWidth;
UInt m_uiHeight;
Int m_iPixelFormat;
UInt m_uiBitsPerPixel;
Int m_iEndianness;
Double m_dFrameRate;
Byte* m_pStreamBuffer;
UInt64 m_uiNBytesPerFrame;
std::string m_strFormatName;