Have got a buffer where both the Audio Elementary stream data and Video Elementary stream data resides. I am using appsrc
in push-mode
. Now I want to use g_signal_connect()
at two different position to configure the same appsrc for need-data
signals.
Lets say file1 takes care of Audio stream and file2 takes care of Video stream
file1.c
g_signal_connect((GstAppSrc *) getAppSrc(), "need-data",G_CALLBACK(cbFunction(1)),NULL);
file2.c
g_signal_connect((GstAppSrc *) getAppSrc(), "need-data",G_CALLBACK(cbFunction(2)),NULL);
Q1. Is is possible/ sensible ? I mean won't the callbacks get confused which one of the need-data signal to call when appsrc needs data ?
References:
1 basic-tutorial-8 short cutting the pipeline on gstreamer.
2 Amarghosh blog on appsrc and his question