GNOME Bugzilla – Bug 165726
[PATCH] New plugin: freeze
Last modified: 2005-04-14 11:36:23 UTC
I needed a solution to make a continous stream from a set of buffers (eg, to create a never-ending stream from a single jpeg), and found no plugins, neither plugin combinations that could do this (identity with its duplicate property came close, but not enough). The result is the freeze plugin, implementing a loop-based element, which pulls buffers from its sink, stores it in a GList, then pushes the current entry out on the srcpad. By default (max-buffers==0), it does not have a limit of buffers. When it reached its limit, no further buffers will be accepted (ie, they'll be discarded). This suits me, and was easier to implement, but can be changed if so need be. All pushed out buffers will have a new timestamp and duration. Since the duration is calculated using the framerate, freeze only works for video for now (however, this can be changed, when needed).
Created attachment 36730 [details] [review] Patch adding the freeze plugin The C source files have a comment block at the end, if applying the patch, please keep those (or at least, the arch-tag line) - that makes my version control system happy.
Created attachment 36751 [details] [review] The updated freeze plugin This is an updated version of the patch, removing the buffer duration recalculation, and thus the requirement that it only works with video buffers. The default max-buffers setting was changed from 0 (unlimited) to 1, for safety's sake.
This is (according to various people) useful for debugging, so let's add it. Gergely, can you please get CVS access?
Created attachment 45246 [details] [review] Latest patch This is the patch I'm going to commit. Changes since the previous one include memory leak fixes and code-reindenting (thanks to gst-indent).