CM H264 Decode

The cmH264Decode is used to decode the video/h264 data to video/x-raw(YUV) data by the gstvideo4linux2 library. It uses a hardware decode on C3V.


API Instructions

create/destroy

gpointer cm_h264_decode_create(); void cm_h264_decode_destroy(gpointer hd);

start/stop

void cm_h264_decode_start(gpointer hd); void cm_h264_decode_stop(gpointer hd);

parameters

The h264 decoder parameters:

/* @caps_str0 Decode input format, "video/h264,..." */ void cm_h264_decode_set_caps_str0(gpointer hd, const gchar* caps_str0);

Get the h264 media info with caps string format.

data

Others


Demo

H264 Decode Demo

Structure

Get YUV data from the sensor and encode it to H264, then decode it to YUV.

image-20240520-070915.png

Main codes

For more details please refer to the demo file.

Test result

h264encdec-20240520-085436.png

The YUV data can be saved to the file and display on the PC by the tools.

Â