diff options
author | Andreas Regel <andreas.regel@powarman.de> | 2005-05-15 12:48:00 +0200 |
---|---|---|
committer | Andreas Regel <andreas.regel@powarman.de> | 2005-05-15 12:48:00 +0200 |
commit | 4df61fcc16983f71ca5ab1d539840f7d04b9d48f (patch) | |
tree | 9768dc226dc0205f9f833e9ce6c6bf5eff4600cc /receiver.c | |
parent | f4460a2d3b0123c25b398b3c0168604bae2d15ba (diff) | |
download | vdr-plugin-osdpip-4df61fcc16983f71ca5ab1d539840f7d04b9d48f.tar.gz vdr-plugin-osdpip-4df61fcc16983f71ca5ab1d539840f7d04b9d48f.tar.bz2 |
Release version 0.0.8v0.0.8
- Added Navigation through channel in a way like with ordinary VDR. Use
the Left/Right keys to select channel groups, OK to choose one or the
number keys to directly enter a channel number. All this only works
with enabled info window.
- Extended the info window to contain more information. The amount of
information shown can be chosen through the setup menu. This directly
affects the height of the info window.
- Using the info window to show vdr messages if they occur.
- Changed the manner the moving of the PiP window works. Now move mode
is enabled or disabled by pressing the green button. In move mode,
the cursor keys can be used to move the PiP window.
- Added some more predefined PiP window sizes. You have to reset your
size in setup menu.
- Added support for ffmpeg 0.4.9 (should work with 0.4.8, too)
- Updated finnish translations (thanks to Rolf Ahrenberg)
- Cleaned up, dropped support for vdr versions older than 1.3.8
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 31 |
1 files changed, 13 insertions, 18 deletions
@@ -12,14 +12,12 @@ #include <vdr/remux.h> #include <vdr/ringbuffer.h> -cOsdPipReceiver::cOsdPipReceiver(const cChannel *Channel, +cOsdPipReceiver::cOsdPipReceiver(const cChannel *Channel, cRingBufferFrame *ESBuffer): #if VDRVERSNUM >= 10319 - cReceiver(Channel->Ca(), 0, Channel->Vpid(), Channel->Apids()) -#elif VDRVERSNUM >= 10318 - cReceiver(Channel->Ca(), 0, 2, Channel->Vpid(), Channel->Apid(0)) + cReceiver(Channel->Ca(), 0, Channel->Vpid()) #else - cReceiver(Channel->Ca(), 0, 2, Channel->Vpid(), Channel->Apid1()) + cReceiver(Channel->Ca(), 0, 1, Channel->Vpid()) #endif { m_TSBuffer = new cRingBufferLinear(MEGABYTE(3), TS_SIZE * 2, true); @@ -28,11 +26,9 @@ cOsdPipReceiver::cOsdPipReceiver(const cChannel *Channel, #endif m_ESBuffer = ESBuffer; #if VDRVERSNUM >= 10319 - m_Remux = new cRemux(Channel->Vpid(), Channel->Apids(), 0, 0, true); -#elif VDRVERSNUM >= 10318 - m_Remux = new cRemux(Channel->Vpid(), Channel->Apid(0), 0, 0, 0, true); + m_Remux = new cRemux(Channel->Vpid(), NULL, NULL, NULL, true); #else - m_Remux = new cRemux(Channel->Vpid(), Channel->Apid1(), 0, 0, 0, true); + m_Remux = new cRemux(Channel->Vpid(), 0, 0, 0, 0, true); #endif m_Active = false; } @@ -137,22 +133,21 @@ void cOsdPipReceiver::Action(void) VideoBufferPos = 0; } - int t = 0; - int l = ((p[4] << 8) | p[5]) + 6; - while (t + l <= Result) { - cPESPacket Packet(p + t, l); + int pos = 0; + while (pos + 6 < Result) + { + cPESPacket Packet(p + pos, Result - pos); + if (pos + 6 + Packet.PacketLength() > Result) + break; int PayloadLength = 0; unsigned char * PayloadData = Packet.Payload(PayloadLength); if ((Packet.StreamId() & 0xF0) == 0xE0) { // video packet memcpy(&VideoBuffer[VideoBufferPos], PayloadData, PayloadLength); VideoBufferPos += PayloadLength; } - t += l; - if (t >= Result) - break; - l = ((p[t + 4] << 8) | p[t + 5]) + 6; + pos += Packet.PacketLength() + 6; } - m_Remux->Del(t); + m_Remux->Del(pos); } #endif } |