I'm rewriting the filesink to overwrite the file bytes. The plugin gets to the end of file but I want to send EOS in the plugin instead of my main program.
example
gst-launch-1.0 -e rtspsrc protocols=4 location=[SOURCE] name=source ! rtph264depay name=vdepay ! h264parse ! avimux name=mux ! overwritefilesink location=[FILENAME] name=EOfSinkName source. ! rtpmp4gdepay name=adepay ! aacparse ! mux.
int main()
{
//to EOS
GstElement* source = gst_bin_get_by_name(GST_BIN(_videoD.srcPipeline),"EOfSinkName");
gst_bus_post(_videoD.bus,gst_message_new_eos(GST_OBJECT(source)));
}
Above is and example of how to do that through the main program. I want to use the overwritefilesink plugin to send the eos through the pipeline.
Is that even Possible?
gstoverwritefilesink.cppgstoverwritefilesink.hwhen I use the ctrl+c in windows it works to end of the file but if I let the program handle up to the max of the file can't seem to make it end of file. The -e makes a difference in the file but is there anyway to make it work without it with my plugin.
If i view the video file I can fast forward and backwards in the file if i use the ctrl+c. If i let the plugin not to write the file anymore it get to the end will stop but when I view the file i can't seem to go forward and backwards in the video.
------------------------------
Gstreamer 1.16.2
------------------------------
Windows