mpeg4parser

mpeg4parser

Functions

Types and Values

Includes

#include <gst/codecparsers/gstmpeg4parser.h>

Description

Functions

gst_mpeg4_parse ()

GstMpeg4ParseResult
gst_mpeg4_parse (GstMpeg4Packet *packet,
                 gboolean skip_user_data,
                 GstMpeg4VideoObjectPlane *vop,
                 const guint8 *data,
                 guint offset,
                 gsize size);

gst_mpeg4_parse_video_object_plane ()

GstMpeg4ParseResult
gst_mpeg4_parse_video_object_plane (GstMpeg4VideoObjectPlane *vop,
                                    GstMpeg4SpriteTrajectory *sprite_trajectory,
                                    GstMpeg4VideoObjectLayer *vol,
                                    const guint8 *data,
                                    gsize size);

gst_mpeg4_parse_group_of_vop ()

GstMpeg4ParseResult
gst_mpeg4_parse_group_of_vop (GstMpeg4GroupOfVOP *gov,
                              const guint8 *data,
                              gsize size);

gst_mpeg4_parse_video_object_layer ()

GstMpeg4ParseResult
gst_mpeg4_parse_video_object_layer (GstMpeg4VideoObjectLayer *vol,
                                    GstMpeg4VisualObject *vo,
                                    const guint8 *data,
                                    gsize size);

gst_mpeg4_parse_visual_object ()

GstMpeg4ParseResult
gst_mpeg4_parse_visual_object (GstMpeg4VisualObject *vo,
                               GstMpeg4VideoSignalType *signal_type,
                               const guint8 *data,
                               gsize size);

gst_mpeg4_parse_visual_object_sequence ()

GstMpeg4ParseResult
gst_mpeg4_parse_visual_object_sequence
                               (GstMpeg4VisualObjectSequence *vos,
                                const guint8 *data,
                                gsize size);

gst_mpeg4_parse_video_packet_header ()

GstMpeg4ParseResult
gst_mpeg4_parse_video_packet_header (GstMpeg4VideoPacketHdr *videopackethdr,
                                     GstMpeg4VideoObjectLayer *vol,
                                     GstMpeg4VideoObjectPlane *vop,
                                     GstMpeg4SpriteTrajectory *sprite_trajectory,
                                     const guint8 *data,
                                     gsize size);

Types and Values

enum GstMpeg4StartCode

Members

GST_MPEG4_VIDEO_OBJ_FIRST

   

GST_MPEG4_VIDEO_OBJ_LAST

   

GST_MPEG4_VIDEO_LAYER_FIRST

   

GST_MPEG4_VIDEO_LAYER_LAST

   

GST_MPEG4_VISUAL_OBJ_SEQ_START

   

GST_MPEG4_VISUAL_OBJ_SEQ_END

   

GST_MPEG4_USER_DATA

   

GST_MPEG4_GROUP_OF_VOP

   

GST_MPEG4_VIDEO_SESSION_ERR

   

GST_MPEG4_VISUAL_OBJ

   

GST_MPEG4_VIDEO_OBJ_PLANE

   

GST_MPEG4_FBA

   

GST_MPEG4_FBA_PLAN

   

GST_MPEG4_MESH

   

GST_MPEG4_MESH_PLAN

   

GST_MPEG4_STILL_TEXTURE_OBJ

   

GST_MPEG4_TEXTURE_SPATIAL

   

GST_MPEG4_TEXTURE_SNR_LAYER

   

GST_MPEG4_TEXTURE_TILE

   

GST_MPEG4_SHAPE_LAYER

   

GST_MPEG4_STUFFING

   

GST_MPEG4_SYSTEM_FIRST

   

GST_MPEG4_SYSTEM_LAST

   

GST_MPEG4_RESYNC

   

enum GstMpeg4VisualObjectType

Members

GST_MPEG4_VIDEO_ID

   

GST_MPEG4_STILL_TEXTURE_ID

   

GST_MPEG4_STILL_MESH_ID

   

GST_MPEG4_STILL_FBA_ID

   

GST_MPEG4_STILL_3D_MESH_ID

   

enum GstMpeg4AspectRatioInfo

Members

GST_MPEG4_SQUARE

   

GST_MPEG4_625_TYPE_4_3

   

GST_MPEG4_525_TYPE_4_3

   

GST_MPEG4_625_TYPE_16_9

   

GST_MPEG4_525_TYPE_16_9

   

GST_MPEG4_EXTENDED_PAR

   

enum GstMpeg4ParseResult

Members

GST_MPEG4_PARSER_OK

   

GST_MPEG4_PARSER_BROKEN_DATA

   

GST_MPEG4_PARSER_NO_PACKET

   

GST_MPEG4_PARSER_NO_PACKET_END

   

GST_MPEG4_PARSER_ERROR

   

enum GstMpeg4VideoObjectCodingType

Members

GST_MPEG4_I_VOP

   

GST_MPEG4_P_VOP

   

GST_MPEG4_B_VOP

   

GST_MPEG4_S_VOP

   

enum GstMpeg4ChromaFormat

Members

GST_MPEG4_CHROMA_4_2_0

   

enum GstMpeg4VideoObjectLayerShape

Members

GST_MPEG4_RECTANGULAR

   

GST_MPEG4_BINARY

   

GST_MPEG4_BINARY_ONLY

   

GST_MPEG4_GRAYSCALE

   

enum GstMpeg4SpriteEnable

Members

GST_MPEG4_SPRITE_UNUSED

   

GST_MPEG4_SPRITE_STATIC

   

GST_MPEG4_SPRITE_GMG

   

enum GstMpeg4Profile

Members

GST_MPEG4_PROFILE_CORE

   

GST_MPEG4_PROFILE_MAIN

   

GST_MPEG4_PROFILE_N_BIT

   

GST_MPEG4_PROFILE_SIMPLE

   

GST_MPEG4_PROFILE_HYBRID

   

GST_MPEG4_PROFILE_RESERVED

   

GST_MPEG4_PROFILE_SIMPLE_FBA

   

GST_MPEG4_PROFILE_CORE_STUDIO

   

GST_MPEG4_PROFILE_SIMPLE_STUDIO

   

GST_MPEG4_PROFILE_CORE_SCALABLE

   

GST_MPEG4_PROFILE_ADVANCED_CORE

   

GST_MPEG4_PROFILE_ADVANCED_SIMPLE

   

GST_MPEG4_PROFILE_SIMPLE_SCALABLE

   

GST_MPEG4_PROFILE_SCALABLE_TEXTURE

   

GST_MPEG4_PROFILE_SIMPLE_FACE_ANIMATION

   

GST_MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE

   

GST_MPEG4_PROFILE_ADVANCED_REALTIME_SIMPLE

   

GST_MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE

   

GST_MPEG4_PROFILE_FINE_GRANULARITY_SCALABLE

   

GST_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY

   

enum GstMpeg4Level

Members

GST_MPEG4_LEVEL0

   

GST_MPEG4_LEVEL1

   

GST_MPEG4_LEVEL2

   

GST_MPEG4_LEVEL3

   

GST_MPEG4_LEVEL3b

   

GST_MPEG4_LEVEL4

   

GST_MPEG4_LEVEL5

   

GST_MPEG4_LEVEL_RESERVED

   

struct GstMpeg4VisualObjectSequence

struct GstMpeg4VisualObjectSequence {
  guint8 profile_and_level_indication;

  /* Computed according to:
   * Table G.1 — FLC table for profile_and_level_indication */
  GstMpeg4Level level;
  GstMpeg4Profile profile;
};

struct GstMpeg4VisualObject

struct GstMpeg4VisualObject {
  guint8 is_identifier;
  /* If is_identifier */
  guint8 verid;
  guint8 priority;

  GstMpeg4VisualObjectType type;
};

struct GstMpeg4VideoSignalType

struct GstMpeg4VideoSignalType {
  guint8 type;

  guint8 format;
  guint8 range;
  guint8 color_description;
  guint8 color_primaries;
  guint8 transfer_characteristics;
  guint8 matrix_coefficients;
};

struct GstMpeg4VideoPlaneShortHdr

struct GstMpeg4VideoPlaneShortHdr {
  guint8 temporal_reference;
  guint8 split_screen_indicator;
  guint8 document_camera_indicator;
  guint8 full_picture_freeze_release;
  guint8 source_format;
  guint8 picture_coding_type;
  guint8 vop_quant;
  guint8 pei;
  guint8 psupp;

  /*  Gob layer specific fields */
  guint8 gob_header_empty;
  guint8 gob_number;
  guint8 gob_frame_id;
  guint8 quant_scale;

  /* Computed
   * If all the values are set to 0, then it is reserved
   * Table 6-25 -- Parameters Defined by source_format Field
   */
  guint16 vop_width;
  guint16 vop_height;
  guint16 num_macroblocks_in_gob;
  guint8 num_gobs_in_vop;

  /* The size in bits */
  guint size;
};

struct GstMpeg4VideoObjectLayer

struct GstMpeg4VideoObjectLayer {
  guint8 random_accessible_vol;
  guint8 video_object_type_indication;

  guint8 is_object_layer_identifier;
  /* if is_object_layer_identifier */
  guint8 verid;
  guint8 priority;

  GstMpeg4AspectRatioInfo aspect_ratio_info;
  guint8 par_width;
  guint8 par_height;

  guint8 control_parameters;
  /* if control_parameters */
  GstMpeg4ChromaFormat chroma_format;
  guint8 low_delay;
  guint8 vbv_parameters;
  /* if vbv_parameters */
  guint16 first_half_bitrate;
  guint16 latter_half_bitrate;
  guint16 first_half_vbv_buffer_size;
  guint16 latter_half_vbv_buffer_size;
  guint16 first_half_vbv_occupancy;
  guint16 latter_half_vbv_occupancy;

  /* Computed values */
  guint32 bit_rate;
  guint32 vbv_buffer_size;

  GstMpeg4VideoObjectLayerShape shape;
  /* if shape == GST_MPEG4_GRAYSCALE && verid =! 1 */
  guint8 shape_extension;

  guint16 vop_time_increment_resolution;
  guint8 vop_time_increment_bits;
  guint8 fixed_vop_rate;
  /* if fixed_vop_rate */
  guint16 fixed_vop_time_increment;

  guint16 width;
  guint16 height;
  guint8 interlaced;
  guint8 obmc_disable;

  GstMpeg4SpriteEnable sprite_enable;
  /* if vol->sprite_enable == SPRITE_GMG or SPRITE_STATIC*/
  /* if vol->sprite_enable != GST_MPEG4_SPRITE_GMG */
  guint16 sprite_width;
  guint16 sprite_height;
  guint16 sprite_left_coordinate;
  guint16 sprite_top_coordinate;

  guint8 no_of_sprite_warping_points;
  guint8 sprite_warping_accuracy;
  guint8 sprite_brightness_change;
  /* if vol->sprite_enable != GST_MPEG4_SPRITE_GMG */
  guint8 low_latency_sprite_enable;

  /* if shape != GST_MPEG4_RECTANGULAR */
  guint8 sadct_disable;

  guint8 not_8_bit;

  /* if no_8_bit */
  guint8 quant_precision;
  guint8 bits_per_pixel;

  /* if shape == GRAYSCALE */
  guint8 no_gray_quant_update;
  guint8 composition_method;
  guint8 linear_composition;

  guint8 quant_type;
  /* if quant_type */
  guint8 load_intra_quant_mat;
  guint8 intra_quant_mat[64];
  guint8 load_non_intra_quant_mat;
  guint8 non_intra_quant_mat[64];

  guint8 quarter_sample;
  guint8 complexity_estimation_disable;
  guint8 resync_marker_disable;
  guint8 data_partitioned;
  guint8 reversible_vlc;
  guint8 newpred_enable;
  guint8 reduced_resolution_vop_enable;
  guint8 scalability;
  guint8 enhancement_type;

  GstMpeg4VideoPlaneShortHdr short_hdr;
};

struct GstMpeg4SpriteTrajectory

struct GstMpeg4SpriteTrajectory {
  guint16 vop_ref_points[63]; /* Defined as "du" in 6.2.5.4 */
  guint16 sprite_ref_points[63]; /* Defined as "dv" in 6.2.5.4 */
};

struct GstMpeg4GroupOfVOP

struct GstMpeg4GroupOfVOP {
  guint8 hours;
  guint8 minutes;
  guint8 seconds;

  guint8 closed;
  guint8 broken_link;
};

struct GstMpeg4VideoObjectPlane

struct GstMpeg4VideoObjectPlane {
  GstMpeg4VideoObjectCodingType coding_type;

  guint8  modulo_time_base;
  guint16 time_increment;

  guint8  coded;
  /* if newpred_enable */
  guint16 id;
  guint8  id_for_prediction_indication;
  guint16 id_for_prediction;

  guint16 width;
  guint16 height;
  guint16 horizontal_mc_spatial_ref;
  guint16 vertical_mc_spatial_ref;

  guint8  rounding_type;
  /*if vol->shape != GST_MPEG4_RECTANGULAR */
  guint8  background_composition;
  guint8  change_conv_ratio_disable;
  guint8  constant_alpha;
  guint8  constant_alpha_value;
  guint8  reduced_resolution;

  guint8  intra_dc_vlc_thr;


  guint8  top_field_first;
  guint8  alternate_vertical_scan_flag;

  guint16 quant;

  guint8  fcode_forward;
  guint8  fcode_backward;

  guint8  shape_coding_type;
  guint8  load_backward_shape;
  guint8  ref_select_code;

  /* Computed macroblock informations */
  guint16 mb_height;
  guint16 mb_width;
  guint mb_num;

  /* The size of the header */
  guint    size;
};

struct GstMpeg4Packet

struct GstMpeg4Packet {
  const guint8     *data;
  guint             offset;
  gsize             size;
  guint             marker_size;

  GstMpeg4StartCode type;
};

struct GstMpeg4VideoPacketHdr

struct GstMpeg4VideoPacketHdr {
  guint8  header_extension_code;
  guint16 macroblock_number;
  guint16 quant_scale;
  guint   size;
};