1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added MPEG 1 handling to remux.c

This commit is contained in:
Klaus Schmidinger 2009-05-10 14:32:03 +02:00
parent 7e4aed4927
commit aae1aa5271
3 changed files with 6 additions and 2 deletions

View File

@ -2398,6 +2398,7 @@ Sundararaj Reel <sundararaj.reel@googlemail.com>
Ales Jurik <ajurik@quick.cz> Ales Jurik <ajurik@quick.cz>
for reporting broken SI data on Czech/Slovak channels after changing the default for reporting broken SI data on Czech/Slovak channels after changing the default
character set to ISO-8859-9 character set to ISO-8859-9
for adding MPEG 1 handling to remux.c
Magnus Andersson <svankan@bahnhof.se> Magnus Andersson <svankan@bahnhof.se>
for translating OSD texts to the Swedish language for translating OSD texts to the Swedish language

View File

@ -6093,3 +6093,4 @@ Video Disk Recorder Revision History
systems with no real primary replay device (reported by Martin Neuditschko). systems with no real primary replay device (reported by Martin Neuditschko).
- Added a note to cTsToPes::GetPes() about having to call it repeatedly, once - Added a note to cTsToPes::GetPes() about having to call it repeatedly, once
it has returned a non-NULL value. it has returned a non-NULL value.
- Added MPEG 1 handling to remux.c (thanks to Ales Jurik).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.c 2.20 2009/05/03 14:43:25 kls Exp $ * $Id: remux.c 2.21 2009/05/10 14:30:00 kls Exp $
*/ */
#include "remux.h" #include "remux.h"
@ -481,6 +481,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) { for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) {
dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid()); dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid());
switch (stream.getStreamType()) { switch (stream.getStreamType()) {
case 0x01: // STREAMTYPE_11172_VIDEO
case 0x02: // STREAMTYPE_13818_VIDEO case 0x02: // STREAMTYPE_13818_VIDEO
case 0x1B: // MPEG4 case 0x1B: // MPEG4
vpid = stream.getPid(); vpid = stream.getPid();
@ -702,7 +703,7 @@ cFrameDetector::cFrameDetector(int Pid, int Type)
newFrame = independentFrame = false; newFrame = independentFrame = false;
numPtsValues = 0; numPtsValues = 0;
numIFrames = 0; numIFrames = 0;
isVideo = type == 0x02 || type == 0x1B; // MPEG 2 or MPEG 4 isVideo = type == 0x01 || type == 0x02 || type == 0x1B; // MPEG 1, 2 or 4
frameDuration = 0; frameDuration = 0;
framesInPayloadUnit = framesPerPayloadUnit = 0; framesInPayloadUnit = framesPerPayloadUnit = 0;
payloadUnitOfFrame = 0; payloadUnitOfFrame = 0;
@ -795,6 +796,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
scanner <<= 8; scanner <<= 8;
scanner |= Data[i]; scanner |= Data[i];
switch (type) { switch (type) {
case 0x01: // MPEG 1 video
case 0x02: // MPEG 2 video case 0x02: // MPEG 2 video
if (scanner == 0x00000100) { // Picture Start Code if (scanner == 0x00000100) { // Picture Start Code
if (synced && Processed) if (synced && Processed)