Opened 13 years ago

Closed 13 years ago

#1788 closed enhancement (fixed)

H264 tools patch

Reported by: jean-michel.bouffard@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords: h264
Cc: Ticket locked: no

Description

This patch contains a set of tools needed to enable H264 support in MythTV. It contains a minimalist state machine class used to detect H.264 keyframes. A usage example is included in the IP Network Recorder patch.

Attachments (1)

mythtv_crc_h264_r9878.tar.2.gz (7.3 KB) - added by jean-michel.bouffard@… 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by jean-michel.bouffard@…

comment:1 Changed 13 years ago by danielk

Milestone: unknown0.20
Status: newassigned

Very cool.

NALUnitType should be formatted so that the major bits are indented 4 chars instead of 8, and we line things like:

      if (type > UNKNOWN && type < SEI) return true;
      return false;

to be formatted as so:

      if (type > UNKNOWN && type < SEI)
          return true;
      return false;

or better yet:

      return (type > UNKNOWN) && (type < SEI);

But those I could fix. What I'm concerned about is the "throws()" I didn't see you throwing anything, but does this means you are not checking for common error values from the C/C++ libs?

comment:2 Changed 13 years ago by jean-michel.bouffard@…

The throw()'s are only there to formally show that the code doesn't throw any exceptions so it has nothing to do with the error checking of any C/C++ libs. In fact, in the current code there are no used C/C++ libs. It is sometime a standard practice to include the throw statement in every function even if they are empty but they can be removed if not in the coding standards of MythTV.

comment:3 Changed 13 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [9919]) Fixes #1788. Refs #1787. Adds much of the code needed for H.264 (aka MPEG-4 AVC) TS decoding in MythTV.

In particular this adds it to the MythCodecID and other enums, and adds a H.264 keyframe/frame finder to avformatdecoder. You would still need to get a H.264 video into MythTV with a keyframe map for proper playback with skipping (see #1787).

The patch was submitted by Jean Michel Bouffard on behalf of the Queen of Canada and the Canadian Communications Research Centre.

Note: See TracTickets for help on using tickets.