0

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

Community
  • 1
  • 1
user2618142
  • 1,035
  • 2
  • 18
  • 35

1 Answers1

0

Short answer, write the tsdemuxer as a gst element.

Long answer, you can connect as many singnal handlers as you want, but they will be all fired together. Your cbFunction will need to have all the logic what to push next.

ensonic
  • 3,304
  • 20
  • 31