CM APP Source

The cmAppSource is a generic source component. It supports data input in any format that the GStreamer supports and it can be linked to any other component. Sometimes, the input data is not from the device, in this case, users can push data to cmAppSource and link to others to do the process.


API Instructions

create/destroy

gpointer cm_app_source_create(); void cm_app_source_destroy(gpointer hd);

start/stop

void cm_app_source_start(gpointer hd); void cm_app_source_stop(gpointer hd);

parameters

/* @caps_str0 the input data format, Gstreamer caps string, such as "video/x-raw,format=NV12,...*/ void cm_app_source_set_caps_str0(gpointer hd, const gchar* caps_str0); /* @return the actual format, for the link use*/ const char* cm_app_source_get_caps_str(gpointer hd);

data


Demo

APP Source to Mp4 Record

Structure

Link it to the Mp4 record and push YUV to it.

image-20240521-033103.png

Main codes

Test result

image-20240521-033155.png

The mp4 file can be displayed on the PC tool PotPlayer. The screen will be green because the input data is fake.

Â