GNOME Bugzilla – Bug 161033
[PATCH] seek support and various fixes against multifilesrc
Last modified: 2005-02-08 21:46:46 UTC
+ added seek support + added query position + added a lot of fixes + don't send whole file as a single GstBuffer but it breaks it in smaller chunks - maybe i've broken "send new media event" feature.. if someone can test it ;)
Created attachment 34735 [details] [review] patch against multifilesrc.c and multifilesrc.h
confirming bug, adding PATCH keyword
The stated purpose of multifilesrc is to send files as single buffers.
The feature of multifilesrc to send files as single buffers should be removed in 0.10 and instead relevant parsing functions for formats that cannot accept anything but one buffer is one frame, should be implemented.
I'm not applying this patch for 0.8.8. The patch is technically correct, but it possibly breaks existing applications. Also, before going down this road, the purpose of multifilesrc should be discussed. Especially, if we want it to become a multi-variant of filesrc, we should make it a subclass. Zaheer has a good point, but it's unclear why we wouldn't just use filesrc for that. Downside is that file list management moves to the application. However, Dave's comment is correct too, the implied purpose of multifilesrc is for JPEG-to-MPEG or so, and that breaks with this patch. Therefore, not for 0.8.8, possibly not for 0.8.x at all.
What about applying to this to a copy of multifilesrc and making it a new separate plugin then? If it does something usefull, but maybe not within the context of multifilesrc current usecases?
You don't understand the objection, I think. We don't *want* multifilesrc or any related element to be used like this. We're not a playlist manager. multifilesrc is a hack for multiple images to video stream generation. To use multiple files, implement file management in your application and set one file at a time in filesrc. if filesrc eos'es, set it to READY, set a new file and set it to PLAYING again. If you don't want to forward the event, add a probe to eat the EOS event.
General agreement among maintainer seems to be that multifilesrc is not intended for this. For this purpose, people can simply use filesrc and set a new location. Multifilesrc is not intended for that. Therefore, patch rejected. We're interested in knowing why bug-starter didn't use filesrc in the first place and are willing to fix possible bugs preventing this.
Sorry for not answering but i had lost this bug :/ I'm not using it as playlist managment but to open/seek in "splitted" multimedia files. I've some multipart/x-mixed-replace video splitted in a lot of little files and i want to open them (and seek in them) as a single video. Can i do it with filesrc?
No. That is a really weird purpose, you know that? It's not weird that we don't provide elements to do that out of the box, I wouldn't expect it... Can you maintain a private copy of filesrc or multifilesrc to do that in your application?
No problem! I'm already doing it :) btw, will this patch be accepted if i add a property (default=true) to mantain the old behavior of sending whole file as single buffer?
Imo, no, at least not now. It's really out-of-scope for gst-plugins. We definately have to clean up gst-plugins and split it up before adding stuff that's this far out-of-scope... that doesn't mean the code is not good, it just means it's not the right place/time.