diff --git a/ChangeLog b/ChangeLog index eb1de60..405949d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ User johns Date: + Add compile time configurable trickspeed packets dump. Fix bug #1410: wrong spelled AC-3 and E-AC-3. Add compile time selectable h264 trickspeed workaround. Use ffmpeg new names AVCodecID, AV_CODEC_... . diff --git a/Makefile b/Makefile index 5a9af40..03a86be 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ CONFIG += -DUSE_PIP # PIP support #CONFIG += -DUSE_TS_VIDEO # build new ts video parser #CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets #CONFIG += -DH264_EOS_TRICKSPEED # insert seq end packets for trickspeed +#CONDIF += -DDUMP_TRICKSPEED # dump trickspeed packets CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder. #CONFIG += -DUSE_SOFTLIMIT # (tobe removed) limit the buffer fill diff --git a/softhddev.c b/softhddev.c index 964674a..e3787bd 100644 --- a/softhddev.c +++ b/softhddev.c @@ -22,6 +22,7 @@ #define noUSE_SOFTLIMIT ///< add soft buffer limits to Play.. #define noUSE_PIP ///< include PIP support + new API +#define DUMP_TRICKSPEED ///< dump raw trickspeed packets #include #include @@ -2224,6 +2225,24 @@ int PlayVideo3(VideoStream * stream, const uint8_t * data, int size) && check[1] == 0x09 && !check[3] && !check[4]) { // old PES HDTV recording z == 2 -> stronger check! if (stream->CodecID == AV_CODEC_ID_H264) { +#ifdef DUMP_TRICKSPEED + if (stream->TrickSpeed) { + char buf[1024]; + int fd; + static int FrameCounter; + + snprintf(buf, sizeof(buf), "frame_%06d_%08d.raw", getpid(), + FrameCounter++); + if ((fd = + open(buf, O_WRONLY | O_CLOEXEC | O_CREAT | O_TRUNC, + 0666)) >= 0) { + if (write(fd, data + 9 + n, size - 9 - n)) { + // this construct is to remove the annoying warning + } + close(fd); + } + } +#endif #ifdef H264_EOS_TRICKSPEED // this should improve ffwd+frew, but produce crash in ffmpeg // with some streams