Add support for old PES HDTV recording.

This commit is contained in:
Johns 2013-01-01 12:09:54 +01:00
parent 33b14be516
commit b1beb49798
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,11 @@
User johns
Date:
Add support for old PES HDTV recording.
Disable trickspeed hack, to prevent ffmpeg crash.
Makes X11 server arguments configurable.
Add german translation.
User FireFly User FireFly
Date: Sun Nov 18 21:15:50 CET 2012 Date: Sun Nov 18 21:15:50 CET 2012

View File

@ -1,7 +1,7 @@
/// ///
/// @file softhddev.c @brief A software HD device plugin for VDR. /// @file softhddev.c @brief A software HD device plugin for VDR.
/// ///
/// Copyright (c) 2011, 2012 by Johns. All Rights Reserved. /// Copyright (c) 2011, 2013 by Johns. All Rights Reserved.
/// ///
/// Contributor(s): /// Contributor(s):
/// ///
@ -1821,9 +1821,10 @@ int PlayVideo(const uint8_t * data, int size)
++z; ++z;
} }
// H264 NAL AUD Access Unit Delimiter 0x00 0x00 0x00 0x01 0x09 // H264 NAL AUD Access Unit Delimiter (0x00) 0x00 0x00 0x01 0x09
if ((data[6] & 0xC0) == 0x80 && z > 2 && check[0] == 0x01 if ((data[6] & 0xC0) == 0x80 && z >= 2 && check[0] == 0x01
&& check[1] == 0x09) { && check[1] == 0x09) {
// old PES HDTV recording z == 2
if (VideoCodecID == CODEC_ID_H264) { if (VideoCodecID == CODEC_ID_H264) {
#if 0 #if 0
// this should improve ffwd+frew, but produce crash in ffmpeg // this should improve ffwd+frew, but produce crash in ffmpeg
@ -1847,13 +1848,12 @@ int PlayVideo(const uint8_t * data, int size)
Debug(3, "video: h264 detected\n"); Debug(3, "video: h264 detected\n");
VideoCodecID = CODEC_ID_H264; VideoCodecID = CODEC_ID_H264;
} }
// SKIP PES header // SKIP PES header (ffmpeg supports short start code)
VideoEnqueue(pts, check - 3, l + 3); VideoEnqueue(pts, check - 2, l + 2);
return size; return size;
} }
// PES start code 0x00 0x00 0x01 // PES start code 0x00 0x00 0x01
if (z > 1 && check[0] == 0x01) { if (z > 1 && check[0] == 0x01) {
// FIXME: old PES HDTV recording
if (VideoCodecID == CODEC_ID_MPEG2VIDEO) { if (VideoCodecID == CODEC_ID_MPEG2VIDEO) {
VideoNextPacket(CODEC_ID_MPEG2VIDEO); VideoNextPacket(CODEC_ID_MPEG2VIDEO);
} else { } else {