Functions

gst_h264_bit_writer_aud

GstH264BitWriterResult
gst_h264_bit_writer_aud (guint8 primary_pic_type,
                         gboolean start_code,
                         guint8 * data,
                         guint * size)

Generating the according h264 bit stream of an aud.

Parameters:

primary_pic_type

indicate the possible slice types list just as the H264 spec defines

start_code

whether adding the nal start code

data

the bit stream generated by the aud

size

the size in bytes of the input and output

Since : 1.22


gst_h264_bit_writer_convert_to_nal

GstH264BitWriterResult
gst_h264_bit_writer_convert_to_nal (guint nal_prefix_size,
                                    gboolean packetized,
                                    gboolean has_startcode,
                                    gboolean add_trailings,
                                    const guint8 * raw_data,
                                    gsize raw_size,
                                    guint8 * nal_data,
                                    guint * nal_size)

Converting a bit stream into a real nal packet. If the bit stream already has a start code, it will be replaced by the new one specified by the nal_prefix_size and packetized. It is assured that the output aligns to the byte and the all the emulations are inserted.

Parameters:

nal_prefix_size

the size in bytes for the prefix of a nal, may be 2, 3 or 4

packetized

whether to write the bit stream in packetized format, which does not have the start code but has a nal_prefix_size bytes' size prepending to the real nal data

has_startcode

whether the input already has a start code

add_trailings

whether to add rbsp trailing bits to make the output aligned to byte

raw_data

the input bit stream

raw_size

the size in bits of the input bit stream

nal_data

the output bit stream converted to a real nal

nal_size

the size in bytes of the output

Since : 1.22


gst_h264_bit_writer_pps

GstH264BitWriterResult
gst_h264_bit_writer_pps (const GstH264PPS * pps,
                         gboolean start_code,
                         guint8 * data,
                         guint * size)

Generating the according h264 bit stream by providing the pps.

Parameters:

pps

the pps of GstH264PPS to write

start_code

whether adding the nal start code

data

the bit stream generated by the pps

size

the size in bytes of the input and output

Since : 1.22


gst_h264_bit_writer_sei

GstH264BitWriterResult
gst_h264_bit_writer_sei (GArray * sei_messages,
                         gboolean start_code,
                         guint8 * data,
                         guint * size)

Generating the according h264 bit stream by providing sei messages.

Parameters:

sei_messages

An array of GstH264SEIMessage to write

start_code

whether adding the nal start code

data

the bit stream generated by the sei messages

size

the size in bytes of the input and output

Since : 1.22


gst_h264_bit_writer_slice_hdr

GstH264BitWriterResult
gst_h264_bit_writer_slice_hdr (const GstH264SliceHdr * slice,
                               gboolean start_code,
                               GstH264NalUnitType nal_type,
                               gboolean is_ref,
                               guint8 * data,
                               guint * size,
                               guint * trail_bits_num)

Generating the according h264 bit stream by providing the slice header.

Parameters:

slice

the slice header of GstH264SliceHdr to write

start_code

whether adding the nal start code

nal_type

the slice's nal type of GstH264NalUnitType

is_ref

whether the slice is a reference

data

the bit stream generated by the slice header

size

the size in bytes of the input and output

trail_bits_num

the trail bits number which is not byte aligned.

Since : 1.22


gst_h264_bit_writer_sps

GstH264BitWriterResult
gst_h264_bit_writer_sps (const GstH264SPS * sps,
                         gboolean start_code,
                         guint8 * data,
                         guint * size)

Generating the according h264 bit stream by providing the sps.

Parameters:

sps

the sps of GstH264SPS to write

start_code

whether adding the nal start code

data

the bit stream generated by the sps

size

the size in bytes of the input and output

Since : 1.22


Enumerations

GstH264BitWriterResult

typedef enum
{
  GST_H264_BIT_WRITER_OK,
  GST_H264_BIT_WRITER_INVALID_DATA,
  GST_H264_BIT_WRITER_NO_MORE_SPACE,
  GST_H264_BIT_WRITER_ERROR
} GstH264BitWriterResult;

The result of writing H264 data into bit stream.

Members

GST_H264_BIT_WRITER_OK (0) –

The writing succeeded

GST_H264_BIT_WRITER_INVALID_DATA (1) –

The input data to write is invalid

GST_H264_BIT_WRITER_NO_MORE_SPACE (2) –

The output does not have enough size

GST_H264_BIT_WRITER_ERROR (3) –

An general error occurred when writing

Since : 1.22


The results of the search are