diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-04-19 00:34:23 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-04-19 00:34:23 +0200 |
commit | e84bdab30df96e732a770d3651b4249e49630c33 (patch) | |
tree | 5dfe46bf2005bc9b76d4ea7ef4fbd995b9b718ab | |
parent | a5d92cf8058c96081fbc419ac40d4383414e5dc3 (diff) | |
download | vdr-plugin-dxr3-e84bdab30df96e732a770d3651b4249e49630c33.tar.gz vdr-plugin-dxr3-e84bdab30df96e732a770d3651b4249e49630c33.tar.bz2 |
get rid of m_staticVerticalSize and m_staticHorizontalSize in pes frame
-rw-r--r-- | dxr3demuxdevice.c | 1 | ||||
-rw-r--r-- | dxr3interface.h | 22 | ||||
-rw-r--r-- | dxr3pesframe.c | 4 | ||||
-rw-r--r-- | dxr3pesframe.h | 10 |
4 files changed, 14 insertions, 23 deletions
diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c index 8a2e310..ebee612 100644 --- a/dxr3demuxdevice.c +++ b/dxr3demuxdevice.c @@ -492,7 +492,6 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) int cDxr3DemuxDevice::DemuxAudioPes(const uint8_t* buf, int length) { static int syncCounter = 0; - int origLength = length; m_demuxMode = DXR3_DEMUX_AUDIO_ONLY_MODE; m_aBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); diff --git a/dxr3interface.h b/dxr3interface.h index a147a6c..fc5560a 100644 --- a/dxr3interface.h +++ b/dxr3interface.h @@ -104,21 +104,19 @@ public: // set/get functions uint32_t GetAspectRatio() const; void SetAspectRatio(uint32_t ratio); - uint32_t GetHorizontalSize() const - { - return m_horizontal; - } - void SetHorizontalSize(uint32_t horizontal) - { - m_horizontal = horizontal; - }; - uint32_t GetVerticalSize() const + uint32_t GetHorizontalSize() const { return m_horizontal; } + uint32_t GetVerticalSize() const { return m_vertical; } + + void SetHorizontalSize(uint32_t value) { - return m_vertical; + if (value > 0) + m_horizontal = value; } - void SetVerticalSize(uint32_t vertical) + + void SetVerticalSize(uint32_t value) { - m_vertical = vertical; + if (value > 0) + m_vertical = value; }; // play functions diff --git a/dxr3pesframe.c b/dxr3pesframe.c index 0edfe41..9c0346a 100644 --- a/dxr3pesframe.c +++ b/dxr3pesframe.c @@ -107,8 +107,6 @@ bool cDxr3PesFrame::parse(const uint8_t *pes, uint32_t length) break; } - m_staticHorizontalSize = m_horizontalSize; - m_staticVerticalSize = m_verticalSize; m_staticAspectRatio = m_aspectRatio; } } @@ -119,8 +117,6 @@ bool cDxr3PesFrame::parse(const uint8_t *pes, uint32_t length) // ================================== uint32_t cDxr3PesFrame::m_staticAspectRatio = EM8300_ASPECTRATIO_4_3; -uint32_t cDxr3PesFrame::m_staticHorizontalSize = 720; -uint32_t cDxr3PesFrame::m_staticVerticalSize = 576; // Local variables: // mode: c++ diff --git a/dxr3pesframe.h b/dxr3pesframe.h index 4528dbb..3a8cdf9 100644 --- a/dxr3pesframe.h +++ b/dxr3pesframe.h @@ -58,8 +58,8 @@ public: m_pts(0), m_videoFrameType(UNKNOWN_FRAME), m_aspectRatio(m_staticAspectRatio), - m_horizontalSize(m_staticHorizontalSize), - m_verticalSize(m_staticVerticalSize), + m_horizontalSize(0), + m_verticalSize(0), m_offset(0) {}; virtual ~cDxr3PesFrame() {} @@ -130,8 +130,8 @@ protected: m_pts = 0; m_videoFrameType = UNKNOWN_FRAME; m_aspectRatio = m_staticAspectRatio; - m_horizontalSize = m_staticHorizontalSize; - m_verticalSize = m_staticVerticalSize; + m_horizontalSize = 0; + m_verticalSize = 0; m_offset = 0; } @@ -149,8 +149,6 @@ protected: int m_offset; static uint32_t m_staticAspectRatio; - static uint32_t m_staticHorizontalSize; - static uint32_t m_staticVerticalSize; protected: static const uint32_t MAX_PES_HEADER_SIZE; |