diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2010-04-22 19:34:43 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2010-04-22 19:34:43 +0200 |
commit | 5651440bbd974dbcbcce11c2acefdf8595f02481 (patch) | |
tree | 857dd5c5dff4d4b00993495f358e103dddacff63 /dxr3device.c | |
parent | d558dffe36b57614ee161bc688a4438b68b4a352 (diff) | |
download | vdr-plugin-dxr3-5651440bbd974dbcbcce11c2acefdf8595f02481.tar.gz vdr-plugin-dxr3-5651440bbd974dbcbcce11c2acefdf8595f02481.tar.bz2 |
apply aspect ratio changes
This commit is a little hacky, but it works for me (tm).
Diffstat (limited to 'dxr3device.c')
-rw-r--r-- | dxr3device.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dxr3device.c b/dxr3device.c index 528b8ff..a22dfea 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -42,7 +42,7 @@ static const char *DEV_DXR3_CONT = ""; static const int SILENT_AUDIO_SIZE = 16384; -cDxr3Device::cDxr3Device() : spuDecoder(NULL), pluginOn(true), vPts(0), scrSet(false), playCount(0) +cDxr3Device::cDxr3Device() : spuDecoder(NULL), pluginOn(true), vPts(0), scrSet(false), playCount(0), aspectRatio(EM8300_ASPECTRATIO_4_3) { silentAudio = new uchar[SILENT_AUDIO_SIZE]; @@ -586,6 +586,17 @@ void cDxr3Device::playVideoFrame(cDxr3PesFrame *frame, uint32_t pts) CHECK(ioctl(fdVideo, EM8300_IOCTL_VIDEO_SETPTS, &val)); } + // apply aspect ratio + if (aspectRatio != ratio) { + if (ratio == EM8300_ASPECTRATIO_16_9) + SetVideoFormat(true); + else + SetVideoFormat(false); + + aspectRatio = ratio; + } + + // write video data const uint8_t *data = frame->payload(); uint32_t len = frame->payloadSize(); |