Now always using stream id 0xE0 for the video stream

This commit is contained in:
Klaus Schmidinger 2005-08-28 21:49:34 +02:00
parent b28336340d
commit f418ef02f8
3 changed files with 12 additions and 8 deletions

View File

@ -978,6 +978,8 @@ Reinhard Nissl <rnissl@gmx.de>
for fixing cDvbSpuBitmap::putPixel()
for implementing cAudioRepacker in remux.c
for modifying handling of audio packets for radio channels in remux.c
for suggesting to always use stream id 0xE0 for the video stream, to avoid problems
with post processing tools that choke on different ids
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the

View File

@ -3754,3 +3754,5 @@ Video Disk Recorder Revision History
this one).
- Fixed appending sequence end code in cDvbPlayer::Goto() (thanks to Reinhard Nissl).
- Fixed syncing in cRepacker (thanks to Reinhard Nissl).
- Now always using stream id 0xE0 for the video stream, to avoid problems with
post processing tools that choke on different ids (suggested by Reinhard Nissl).

16
remux.c
View File

@ -11,7 +11,7 @@
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
*
* $Id: remux.c 1.44 2005/08/28 21:24:34 kls Exp $
* $Id: remux.c 1.45 2005/08/28 21:44:51 kls Exp $
*/
#include "remux.h"
@ -1265,7 +1265,7 @@ private:
int count;
uint8_t *buf;
uint8_t cid;
uint8_t audioCid;
uint8_t rewriteCid;
uint8_t subStreamId;
int plength;
uint8_t plen[2];
@ -1289,7 +1289,7 @@ private:
void write_ipack(const uint8_t *Data, int Count);
void instant_repack(const uint8_t *Buf, int Count);
public:
cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid = 0x00, uint8_t SubStreamId = 0x00, cRepacker *Repacker = NULL);
cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t RewriteCid = 0x00, uint8_t SubStreamId = 0x00, cRepacker *Repacker = NULL);
~cTS2PES();
int Pid(void) { return pid; }
void ts_to_pes(const uint8_t *Buf); // don't need count (=188)
@ -1298,12 +1298,12 @@ public:
uint8_t cTS2PES::headr[] = { 0x00, 0x00, 0x01 };
cTS2PES::cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid, uint8_t SubStreamId, cRepacker *Repacker)
cTS2PES::cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t RewriteCid, uint8_t SubStreamId, cRepacker *Repacker)
{
pid = Pid;
resultBuffer = ResultBuffer;
size = Size;
audioCid = AudioCid;
rewriteCid = RewriteCid;
subStreamId = SubStreamId;
repacker = Repacker;
if (repacker) {
@ -1365,7 +1365,7 @@ void cTS2PES::send_ipack(void)
{
if (count <= ((mpeg == 2) ? 9 : 7)) // skip empty packets
return;
buf[3] = (AUDIO_STREAM_S <= cid && cid <= AUDIO_STREAM_E && audioCid) ? audioCid : cid;
buf[3] = rewriteCid ? rewriteCid : cid;
buf[4] = (uint8_t)(((count - 6) & 0xFF00) >> 8);
buf[5] = (uint8_t)((count - 6) & 0x00FF);
store(buf, count);
@ -1681,9 +1681,9 @@ cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, b
if (VPid)
#define TEST_cVideoRepacker
#ifdef TEST_cVideoRepacker
ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS, 0x00, 0x00, new cVideoRepacker);
ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS, 0xE0, 0x00, new cVideoRepacker);
#else
ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS);
ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS, 0xE0);
#endif
if (APids) {
int n = 0;