How to read/write data within application from/to pipelines via appsink and appsrc

jmz jmzheng at gmail.com
Fri Oct 19 09:42:42 UTC 2018


Hi,

I want to develop two pipelines "datasrc and datasink" as libraries:
The datasrc pipeline is used to get data from some media source, for
example, "rtspsrc ! ... ! appsink"
The datasink pipeline is used to write data to some audio or video sink, for
example, "appsrc ! ... ! sink"

Using the two libraries, my application can get media data, process the
data, and show the processed data in audio or video output, as shown below.

main()
{
  MyData *data;

  start_datasrc();  // create pipeline, run main loop
  start_datasink();   // create pipeline, run main loop

  for (;;) {
    read_datasrc(data);  // get data from appsink of datasrc

    // process data

    write_datasink(data);  // write data to appsrc of datasink
  }

}

The datasrc and datasink pipelines have run their own main loops. How to get
data from the appsink of datasrc pipeline within the context of my
application?
In particular, how to implement read_datasrc() and write_datasink()?

On the other hand, read_datasrc() may not read data from datasrc pipeline
quickly enough. How can the datasrc pipeline drop data to avoid the
appsink's buffer becoming full?

Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list