Main Page | Class Hierarchy | Class List | Directories | Class Members

MntMPEG1GopHdr Class Reference

The MpegGopHdr structure contains all the parameters contained in the GOP header of a mpeg stream. More...

#include <mnt_mpeg1_gop.h>

List of all members.

Public Member Functions

int parse (BitParser *bp)
 Assuming that the bp position is at the beginning of a MPEG GOP header, parse the bitstream using BitParser bp and initilize the GOP header hdr.
int find (BitParser *bp)
 Advance the BitParser bp to the beginning of a GOP header (by finding GOP_START_CODE in the bitstream it is attached to).
int dump (BitParser *inbp, BitParser *outbp)
 Assuming the BitParser inbp is pointing to the beginning of a GOP header in the bitstream, dump the header from the input bitstream to the output bitstream attached to BitParser outbp.
int skip (BitParser *bp)
 Assuming that bp is pointing to the begining of a GOP header in the bitstream, skip the header and move bp to point to the beginning of the picture header immediately following the GOP header.
int encode (BitParser *bp)

Public Attributes

char closed_gop_
 If closed_gop = 1, then this GOP is encoded without vectors pointing to pictures in previous GOP.
char broken_link_
 if broken_link = 1, then the first B-frame that follows the first I-frame in this GOP cannot be decoded because the other frame used for prediction is not available.
time codes
These fields correspond the the fields defined in the IEC standard 461 ("time and control codes for video tape recorders"). The code refers to the first picture in the group of pictures that has a temporal_reference of zero.

The drop_frame_flag is 1 only if the pic rate is 29.97Hz. If drop_frame_flag = 0 then pictures are counted assuming rounding to the nearest integral number of pictures per second. If If drop_frame_flag = 1 then picture numbers 0 and 1 at the start of every minute except minutes 0, 10, 20, 30, 40, 50 are ommitted from the count.

char drop_frame_flag_
char time_code_hours_
char time_code_minutes_
char time_code_seconds_
char time_code_pictures_


Detailed Description

The MpegGopHdr structure contains all the parameters contained in the GOP header of a mpeg stream.


Member Function Documentation

int MntMPEG1GopHdr::dump BitParser inbp,
BitParser outbp
 

Assuming the BitParser inbp is pointing to the beginning of a GOP header in the bitstream, dump the header from the input bitstream to the output bitstream attached to BitParser outbp.

After dumping, the current bit position is at the beginning of picture header.

Returns:
Return the number of bytes dumped, or return DVM_MPEG_INVALID_START_CODE if inbp is not pointing to a GOP header.

int MntMPEG1GopHdr::find BitParser bp  ) 
 

Advance the BitParser bp to the beginning of a GOP header (by finding GOP_START_CODE in the bitstream it is attached to).

Returns:
Return the number of bytes skipped during the find, or return DVM_MPEG_NOT_FOUND if it cannot find any header.

int MntMPEG1GopHdr::parse BitParser bp  ) 
 

Assuming that the bp position is at the beginning of a MPEG GOP header, parse the bitstream using BitParser bp and initilize the GOP header hdr.

After parsing, bp current bit position is at the beginning of next picture header.

Returns:
Return the number of bytes parsed, or DVM_MPEG_INVALID_START_CODE if inbp is not pointing to a GOP header.

int MntMPEG1GopHdr::skip BitParser bp  ) 
 

Assuming that bp is pointing to the begining of a GOP header in the bitstream, skip the header and move bp to point to the beginning of the picture header immediately following the GOP header.

Returns:
Return the number of bytes skipped, or return DVM_MPEG_INVALID_START_CODE if bp is not pointing to a GOP header.
Note:
This has the same functionality as MpegPicHdrFind, but is more efficient since we assume we are at the beginning of a GOP header and know exactly how many bytes to skip to get to the next MpegPicHdr in the bitstream .


Member Data Documentation

char MntMPEG1GopHdr::broken_link_
 

if broken_link = 1, then the first B-frame that follows the first I-frame in this GOP cannot be decoded because the other frame used for prediction is not available.

This can be used to avoid decoding pictures that cannot be correctly decoded due to editing.

char MntMPEG1GopHdr::closed_gop_
 

If closed_gop = 1, then this GOP is encoded without vectors pointing to pictures in previous GOP.

Closed_gop = 0 otherwise.


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 12:37:12 2005 for mnt by  doxygen 1.4.4