Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The CMStreaming (C3V Media Streaming API) is a set of streaming APIs for C3V media that depend on GStreamer. It wraps some of the GStreamer functionality in an API way to simplify the development process.

What can CM Streaming API do?

Provide easy-to-use streaming APIs for c3v platforms, helping users quickly develop stream-related applications like this sample.

Why use CM Streaming API?

The GStreamer is a very powerful media framework, but it can be a bit complicated to use. For some commonly used functions, wrapping them in APIs can achieve the effect of reuse, thus reducing redundant code.

For example, if need to get the YUV data from the sensor inside the program. In the GStreamer way, the developer should create elements, link them together, and then start it. The flow will be like this:

image-20240520-064751.png

If now want to get data from another sensor, the developer needs to do the appeal process again. But in the CM Streaming API, the appeal process is packaged as API, users just need to call the API without caring about how it is implemented.

How to use CM Streaming API?

All functions of the CM streaming are included in a library called libcmstreaming.so. The user just needs to include the header files and add the library to the depends to use it.

The general flow of use is as follows:

image-20240520-064906.png

For details, please refer to the API documents and demo.

  • To work properly, it is important to make sure that the dependent library files are present.

  • The GStreamer depends on glib, it uses a lot of glib mechanisms. The code must be running with GMainLoop. Otherwise, the program functionality may be affected.

  • The CM streaming API is based on the GStreamer and designed for C3V, users need to have some basic knowledge of GStreamer and the C3V platform.