diff options
author | scop <scop> | 2005-03-14 19:56:19 +0000 |
---|---|---|
committer | scop <scop> | 2005-03-14 19:56:19 +0000 |
commit | ad728c25a50a5a4e39155f53ac165038303281f7 (patch) | |
tree | 69dd02017250901c372128da9de843b7c879a842 | |
parent | c925d69e19fd1f4218a235276378dc405605b24f (diff) | |
download | vdr-plugin-dxr3-ad728c25a50a5a4e39155f53ac165038303281f7.tar.gz vdr-plugin-dxr3-ad728c25a50a5a4e39155f53ac165038303281f7.tar.bz2 |
Apply get/setVerticalSize part of Luca Olivetti's Xine scaler patch.
-rw-r--r-- | dxr3demuxdevice.c | 3 | ||||
-rw-r--r-- | dxr3interface.c | 2 | ||||
-rw-r--r-- | dxr3interface.h | 3 | ||||
-rw-r--r-- | dxr3pesframe.c | 2 | ||||
-rw-r--r-- | dxr3pesframe.h | 6 |
5 files changed, 15 insertions, 1 deletions
diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c index 8fc50d2..66c19af 100644 --- a/dxr3demuxdevice.c +++ b/dxr3demuxdevice.c @@ -355,6 +355,7 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) bPlayedFrame = true; // usleep(30000); // otherwise there is problem with audio (driver bug?) m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); + m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize()); m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), m_ReUseFrame); break; @@ -385,6 +386,7 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) else if (m_synchState == DXR3_DEMUX_VIDEO_SYNCHED || m_synchState == DXR3_DEMUX_SYNCHED) { m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); + m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize()); while(!Poll(100)); cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); @@ -410,6 +412,7 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) vPts = pts; m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); + m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize()); cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); diff --git a/dxr3interface.c b/dxr3interface.c index 3a3e793..449abf0 100644 --- a/dxr3interface.c +++ b/dxr3interface.c @@ -101,6 +101,7 @@ cDxr3Interface::cDxr3Interface() m_ExternalReleased = false; m_volume = 255; m_horizontal = 720; + m_vertical = 576; m_audioChannelCount = UNKNOWN_CHANNEL_COUNT; m_audioDataRate = 0; m_audioSampleSize = 0; @@ -815,6 +816,7 @@ void cDxr3Interface::PlayBlackFrame() if (write(m_fdVideo, blackframe, blackframeLength) < 0) Resuscitation(); } m_horizontal = 720; + m_vertical = 576; Unlock(); } diff --git a/dxr3interface.h b/dxr3interface.h index 1714715..4185a6c 100644 --- a/dxr3interface.h +++ b/dxr3interface.h @@ -86,6 +86,8 @@ public: void SetAspectRatio(uint32_t ratio); uint32_t GetHorizontalSize() const { return m_horizontal; } void SetHorizontalSize(uint32_t horizontal) { m_horizontal = horizontal;}; + uint32_t GetVerticalSize() const { return m_vertical; } + void SetVerticalSize(uint32_t vertical) { m_vertical = vertical;}; // play functions void SetPlayMode(); @@ -143,6 +145,7 @@ private: int m_aspectDelayCounter; uint32_t m_aspectRatio; ///< current used aspect ratio uint32_t m_horizontal; ///< horizontal size of current videostream + uint32_t m_vertical; ///< vertical size of current videostream uint32_t m_audioSampleSize; ///< how big is the sample size for the current audiostream uint32_t m_audioMode; uint32_t m_spuMode; diff --git a/dxr3pesframe.c b/dxr3pesframe.c index e1cbb9e..0ee63dc 100644 --- a/dxr3pesframe.c +++ b/dxr3pesframe.c @@ -171,6 +171,7 @@ int cDxr3PesFrame::ExtractVideoData(cDxr3SafeArray<uint8_t> esFrame) throw (cDxr break; } m_staticHorizontalSize = m_horizontalSize = (esFrame[i + 5] & 0xF0) >> 4 | esFrame[i + 4] << 4; + m_staticVerticalSize = m_verticalSize = ((esFrame[i + 5] & 0x0F) << 8) | (esFrame[i + 6]); } } } @@ -245,5 +246,6 @@ bool cDxr3PesFrame::IsPesHeader(cDxr3SafeArray<uint8_t> header) throw (cDxr3Safe // ================================== uint32_t cDxr3PesFrame::m_staticAspectRatio = EM8300_ASPECTRATIO_4_3; uint32_t cDxr3PesFrame::m_staticHorizontalSize = 720; +uint32_t cDxr3PesFrame::m_staticVerticalSize = 576; const uint32_t cDxr3PesFrame::MAX_PES_HEADER_SIZE = 184; diff --git a/dxr3pesframe.h b/dxr3pesframe.h index e032cb9..087fc47 100644 --- a/dxr3pesframe.h +++ b/dxr3pesframe.h @@ -91,7 +91,7 @@ public: public: cDxr3PesFrame() : m_pesDataType(PES_UNKNOWN_DATA), m_bValid(false), m_pPesStart(0), m_pEsStart(0) , m_esLength(0), m_pts(0), m_videoFrameType(UNKNOWN_FRAME), m_aspectRatio(m_staticAspectRatio) - , m_horizontalSize(m_staticHorizontalSize), m_streamId(0), m_pNextStart(0), m_remainingLength(0) + , m_horizontalSize(m_staticHorizontalSize), m_verticalSize(m_staticVerticalSize), m_streamId(0), m_pNextStart(0), m_remainingLength(0) , m_offset(0) {}; virtual ~cDxr3PesFrame() {} @@ -111,6 +111,7 @@ public: eVideoFrameType GetFrameType(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_videoFrameType;}; uint32_t GetAspectRatio(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_aspectRatio;}; uint32_t GetHorizontalSize(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_horizontalSize;}; + uint32_t GetVerticalSize(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_verticalSize;}; uint8_t GetStreamId(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_streamId;}; int GetOffset(void) const { assert(m_bValid); return m_offset;}; @@ -132,6 +133,7 @@ protected: m_videoFrameType = UNKNOWN_FRAME; m_aspectRatio = m_staticAspectRatio; m_horizontalSize = m_staticHorizontalSize; + m_verticalSize = m_staticVerticalSize; m_streamId = 0; m_pNextStart = 0; m_remainingLength = 0; @@ -148,6 +150,7 @@ protected: eVideoFrameType m_videoFrameType; uint32_t m_aspectRatio; uint32_t m_horizontalSize; + uint32_t m_verticalSize; uint8_t m_streamId; const uint8_t* m_pNextStart; @@ -156,6 +159,7 @@ protected: static uint32_t m_staticAspectRatio; static uint32_t m_staticHorizontalSize; + static uint32_t m_staticVerticalSize; protected: static const uint32_t MAX_PES_HEADER_SIZE; |