Last 2 writes to cutom source element(thoretically similar to file src) doesn't reflect in output

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Last 2 writes to cutom source element(thoretically similar to file src) doesn't reflect in output

appu
Hi All,

I am a newbie in Gstreamer and, I am in need of developing a custom Gstreamer plugin(similar to file src). Final aim is to develop a gstreamer source elelment plugin, which read data from various hardware
peripherals and feed the input to the down stream.

For achieving the above, I started developing from the 'gst-template-master' and fitted a 'task' for pulling the data by reading from a file. I know, there is 'FileSrc' derived from 'BaseSrc', but I would like my design, this way. In a 'while loop', I read the data from file until read returns zero and wrote to the downstream pipeline using "gst_pad_push (filter->srcpad, buf);" each time it was read. Then I wrote application to connect my element with "filesink" and tested.

The input file is copied to an output file in multiple reads, except the last two reads. I don't understand why this happens. Could anybody please advice me how this can be solved, or any clue?

Thanks in advance
Appu