1 On Thu, Jan 08, 2004 at 04:10:00PM +0100, Julien MOUTTE wrote:
5 > I'd like to implement bufferpools again in x[v]imagesink asap.. Could
6 > you please point me to a template/doc on how to do that ?
8 > The best for me would be a simple testcase showing how to use the buffer
9 > free methods to replace bufferpools.
12 x[v]imagesink should call gst_pad_set_bufferalloc_function() on
13 their sink pads with a bufferalloc implementation. This bufferalloc
14 function is to allocate buffers that _peers_ will send _to_ that pad.
16 A trivial version of a bufferalloc function, i.e., one that just
17 allocates normal buffers:
20 gst_ximagesink_sink_bufferalloc (GstPad *pad, guint64 offset, guint
25 buffer = gst_buffer_new_and_alloc (size);
26 GST_DATA_FREE_FUNC (data) = gst_ximagesink_buffer_free;
27 GST_BUFFER_POOL_PRIVATE (data) = ximagesink; /* whatever */
33 gst_ximagesink_buffer_free (GstData *data)
35 g_free (GST_BUFFER_DATA (data));
38 The hard part is going through each element, and every time it
39 allocates a buffer using gst_buffer_new_and_alloc () that is then
40 sent to a sink pad, the call should be replaced with
41 gst_pad_alloc_buffer (sinkpad, offset, size).
49 -------------------------------------------------------
50 This SF.net email is sponsored by: Perforce Software.
51 Perforce is the Fast Software Configuration Management System offering
52 advanced branching capabilities and atomic changes on 50+ platforms.
53 Free Eval! http://www.perforce.com/perforce/loadprog.html
54 _______________________________________________
55 gstreamer-devel mailing list
56 gstreamer-devel@lists.sourceforge.net
57 https://lists.sourceforge.net/lists/listinfo/gstreamer-devel