Laurence wrote
I am writing the code to mux video stream and audio stream into a single .avi file. A part of my code
is as follow:
/*element link*/
gst_element_link_many(videotestsrc, queue, NULL);
gst_element_link_many(audiotestsrc, queue, NULL);
gst_element_link_many(queue, avimux, filesink, NULL);
Are you sure all the elements in your code are in the same bin. If not add it.
The above statements are wrong. You cannot use the same "queue" element for both audio and video.
Take separate queues for each type of stream. Or use "multiqueue". Check the return values of gst_element_link_many.
If you are creating a "queue" element, then it will be failing. (multiqueue would succeed).
A better option would be to use pad link (gst_pad_link) when dealing with muxers. Get the
video and audio pads of muxer and link them with the corresponding queues.
Regards,
Sandeep Prakash
http://sandeepprakash.homeip.net