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

Changed all occurrences of MPEG4 to H264 (pointed out by Sren Moch)

This commit is contained in:
Klaus Schmidinger 2012-11-25 14:21:15 +01:00
parent 21186ced97
commit 75aee155ea
4 changed files with 25 additions and 23 deletions

View File

@ -2958,7 +2958,7 @@ Oliver Schinagl <oliver@schinagl.nl>
for a patch that was used to implement the setup options "OSD/Color key [0123]" for a patch that was used to implement the setup options "OSD/Color key [0123]"
Andrey Pridvorov <ua0lnj@bk.ru> Andrey Pridvorov <ua0lnj@bk.ru>
for reporting a problem with detecting frames in MPEG 4 video, and pointing towards for reporting a problem with detecting frames in H.264 video, and pointing towards
a better way of doing it a better way of doing it
Jens Vogel <jens.vogel@akjv.de> Jens Vogel <jens.vogel@akjv.de>
@ -2972,6 +2972,7 @@ S
for fixing sorting folders before recordings in case of UTF-8 for fixing sorting folders before recordings in case of UTF-8
for reporting that cCuttingThread::GetPendingPackets() should get only non-video for reporting that cCuttingThread::GetPendingPackets() should get only non-video
packets packets
for pointing out that the name H264 should be used instead of MPEG4
Peter Münster <pmlists@free.fr> Peter Münster <pmlists@free.fr>
for fixing 'make install' to not overwrite existing configuration files for fixing 'make install' to not overwrite existing configuration files

View File

@ -7245,7 +7245,7 @@ Video Disk Recorder Revision History
- Decreased the ring buffer put/get trigger sizes from 1/3 to 1/10. - Decreased the ring buffer put/get trigger sizes from 1/3 to 1/10.
- The script given to VDR with the '-r' option is now also called whenever a - The script given to VDR with the '-r' option is now also called whenever a
recording is deleted (thanks to Alexander Wenzel). recording is deleted (thanks to Alexander Wenzel).
- Improved detecting frames in MPEG 4 video (reported by Andrey Pridvorov). - Improved detecting frames in H.264 video (reported by Andrey Pridvorov).
- cPatPmtParser::ParsePmt() now also recognizes stream type 0x81 as "AC3", so that - cPatPmtParser::ParsePmt() now also recognizes stream type 0x81 as "AC3", so that
recordings that have been converted from the old PES format to TS can be played recordings that have been converted from the old PES format to TS can be played
(suggested by Jens Vogel). (suggested by Jens Vogel).
@ -7305,7 +7305,7 @@ Video Disk Recorder Revision History
Sundararaj Reel). Sundararaj Reel).
- Fixed handling timers in case an event is modified and "phased out" while the timer - Fixed handling timers in case an event is modified and "phased out" while the timer
is recording. is recording.
- Improved frame detection by parsing just far enough into the MPEG-4 NAL units to get - Improved frame detection by parsing just far enough into the H.264 NAL units to get
the necessary information about frames and slices. the necessary information about frames and slices.
- The initial syncing of the frame detector is now done immediately after the first - The initial syncing of the frame detector is now done immediately after the first
complete GOP has been seen. This makes recordings and especially pausing live video complete GOP has been seen. This makes recordings and especially pausing live video
@ -7348,3 +7348,4 @@ Video Disk Recorder Revision History
- Updated the Macedonian OSD texts (thanks to Dimitar Petrovski). - Updated the Macedonian OSD texts (thanks to Dimitar Petrovski).
- Fixed getting only non-video packets in cCuttingThread::GetPendingPackets() (reported - Fixed getting only non-video packets in cCuttingThread::GetPendingPackets() (reported
by Sören Moch). by Sören Moch).
- Changed all occurrences of MPEG4 to H264 (pointed out by Sören Moch).

4
pat.c
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: pat.c 2.18 2012/04/15 09:54:53 kls Exp $ * $Id: pat.c 2.19 2012/11/25 14:12:21 kls Exp $
*/ */
#include "pat.h" #include "pat.h"
@ -352,7 +352,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
switch (stream.getStreamType()) { switch (stream.getStreamType()) {
case 1: // STREAMTYPE_11172_VIDEO case 1: // STREAMTYPE_11172_VIDEO
case 2: // STREAMTYPE_13818_VIDEO case 2: // STREAMTYPE_13818_VIDEO
case 0x1B: // MPEG4 case 0x1B: // H.264
Vpid = esPid; Vpid = esPid;
Ppid = pmt.getPCRPid(); Ppid = pmt.getPCRPid();
Vtype = stream.getStreamType(); Vtype = stream.getStreamType();

36
remux.c
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.72 2012/11/19 10:23:42 kls Exp $ * $Id: remux.c 2.73 2012/11/25 14:16:11 kls Exp $
*/ */
#include "remux.h" #include "remux.h"
@ -676,7 +676,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
switch (stream.getStreamType()) { switch (stream.getStreamType()) {
case 0x01: // STREAMTYPE_11172_VIDEO case 0x01: // STREAMTYPE_11172_VIDEO
case 0x02: // STREAMTYPE_13818_VIDEO case 0x02: // STREAMTYPE_13818_VIDEO
case 0x1B: // MPEG4 case 0x1B: // H.264
vpid = stream.getPid(); vpid = stream.getPid();
vtype = stream.getStreamType(); vtype = stream.getStreamType();
ppid = Pmt.getPCRPid(); ppid = Pmt.getPCRPid();
@ -1110,9 +1110,9 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
return tsPayload.Used(); return tsPayload.Used();
} }
// --- cMpeg4Parser ---------------------------------------------------------- // --- cH264Parser -----------------------------------------------------------
class cMpeg4Parser : public cFrameParser { class cH264Parser : public cFrameParser {
private: private:
enum eNalUnitType { enum eNalUnitType {
nutCodedSliceNonIdr = 1, nutCodedSliceNonIdr = 1,
@ -1144,14 +1144,14 @@ private:
void ParseSequenceParameterSet(void); void ParseSequenceParameterSet(void);
void ParseSliceHeader(void); void ParseSliceHeader(void);
public: public:
cMpeg4Parser(void); cH264Parser(void);
///< Sets up a new MPEG-4 parser. ///< Sets up a new H.264 parser.
///< This class parses only the data absolutely necessary to determine the ///< This class parses only the data absolutely necessary to determine the
///< frame borders and field count of the given H264 material. ///< frame borders and field count of the given H264 material.
virtual int Parse(const uchar *Data, int Length, int Pid); virtual int Parse(const uchar *Data, int Length, int Pid);
}; };
cMpeg4Parser::cMpeg4Parser(void) cH264Parser::cH264Parser(void)
{ {
byte = 0; byte = 0;
bit = -1; bit = -1;
@ -1164,7 +1164,7 @@ cMpeg4Parser::cMpeg4Parser(void)
gotSequenceParameterSet = false; gotSequenceParameterSet = false;
} }
uchar cMpeg4Parser::GetByte(bool Raw) uchar cH264Parser::GetByte(bool Raw)
{ {
uchar b = tsPayload.GetByte(); uchar b = tsPayload.GetByte();
if (!Raw) { if (!Raw) {
@ -1183,7 +1183,7 @@ uchar cMpeg4Parser::GetByte(bool Raw)
return b; return b;
} }
uchar cMpeg4Parser::GetBit(void) uchar cH264Parser::GetBit(void)
{ {
if (bit < 0) { if (bit < 0) {
byte = GetByte(); byte = GetByte();
@ -1192,7 +1192,7 @@ uchar cMpeg4Parser::GetBit(void)
return (byte & (1 << bit--)) ? 1 : 0; return (byte & (1 << bit--)) ? 1 : 0;
} }
uint32_t cMpeg4Parser::GetBits(int Bits) uint32_t cH264Parser::GetBits(int Bits)
{ {
uint32_t b = 0; uint32_t b = 0;
while (Bits--) while (Bits--)
@ -1200,7 +1200,7 @@ uint32_t cMpeg4Parser::GetBits(int Bits)
return b; return b;
} }
uint32_t cMpeg4Parser::GetGolombUe(void) uint32_t cH264Parser::GetGolombUe(void)
{ {
int z = -1; int z = -1;
for (int b = 0; !b; z++) for (int b = 0; !b; z++)
@ -1208,7 +1208,7 @@ uint32_t cMpeg4Parser::GetGolombUe(void)
return (1 << z) - 1 + GetBits(z); return (1 << z) - 1 + GetBits(z);
} }
int32_t cMpeg4Parser::GetGolombSe(void) int32_t cH264Parser::GetGolombSe(void)
{ {
uint32_t v = GetGolombUe(); uint32_t v = GetGolombUe();
if (v) { if (v) {
@ -1220,7 +1220,7 @@ int32_t cMpeg4Parser::GetGolombSe(void)
return v; return v;
} }
int cMpeg4Parser::Parse(const uchar *Data, int Length, int Pid) int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
{ {
newFrame = independentFrame = false; newFrame = independentFrame = false;
tsPayload.Setup(const_cast<uchar *>(Data), Length, Pid); tsPayload.Setup(const_cast<uchar *>(Data), Length, Pid);
@ -1260,14 +1260,14 @@ int cMpeg4Parser::Parse(const uchar *Data, int Length, int Pid)
return tsPayload.Used(); return tsPayload.Used();
} }
void cMpeg4Parser::ParseAccessUnitDelimiter(void) void cH264Parser::ParseAccessUnitDelimiter(void)
{ {
if (debug && gotSequenceParameterSet) if (debug && gotSequenceParameterSet)
dbgframes("A"); dbgframes("A");
GetByte(); // primary_pic_type GetByte(); // primary_pic_type
} }
void cMpeg4Parser::ParseSequenceParameterSet(void) void cH264Parser::ParseSequenceParameterSet(void)
{ {
uchar profile_idc = GetByte(); // profile_idc uchar profile_idc = GetByte(); // profile_idc
GetByte(); // constraint_set[0-5]_flags, reserved_zero_2bits GetByte(); // constraint_set[0-5]_flags, reserved_zero_2bits
@ -1319,7 +1319,7 @@ void cMpeg4Parser::ParseSequenceParameterSet(void)
} }
} }
void cMpeg4Parser::ParseSliceHeader(void) void cH264Parser::ParseSliceHeader(void)
{ {
newFrame = true; newFrame = true;
GetGolombUe(); // first_mb_in_slice GetGolombUe(); // first_mb_in_slice
@ -1369,13 +1369,13 @@ void cFrameDetector::SetPid(int Pid, int Type)
{ {
pid = Pid; pid = Pid;
type = Type; type = Type;
isVideo = type == 0x01 || type == 0x02 || type == 0x1B; // MPEG 1, 2 or 4 isVideo = type == 0x01 || type == 0x02 || type == 0x1B; // MPEG 1, 2 or H.264
delete parser; delete parser;
parser = NULL; parser = NULL;
if (type == 0x01 || type == 0x02) if (type == 0x01 || type == 0x02)
parser = new cMpeg2Parser; parser = new cMpeg2Parser;
else if (type == 0x1B) else if (type == 0x1B)
parser = new cMpeg4Parser; parser = new cH264Parser;
else if (type == 0x04 || type == 0x06) // MPEG audio or AC3 audio else if (type == 0x04 || type == 0x06) // MPEG audio or AC3 audio
parser = new cAudioParser; parser = new cAudioParser;
else if (type != 0) else if (type != 0)