GNOME Bugzilla – Bug 795144
gstsample: new API
Last modified: 2018-04-13 21:55:57 UTC
See commit message
Created attachment 370759 [details] [review] gstsample: new API gst_sample_set_buffer gst_sample_is_writable gst_sample_make_writable This commit makes it possible to reuse a sample object and avoid unnecessary memory allocations, for example in appsink. In addition, writability is now required to set the buffer list.
Comment on attachment 370759 [details] [review] gstsample: new API This is not enough. You potentially also need to change the caps, segment, etc. when you change the buffer :) This also needs some new API
Created attachment 370815 [details] [review] gstsample: new API gst_sample_set_buffer gst_sample_set_caps gst_sample_set_segment gst_sample_set_info gst_sample_is_writable gst_sample_make_writable This commit makes it possible to reuse a sample object and avoid unnecessary memory allocations, for example in appsink. In addition, writability is now required to set the buffer list.
Review of attachment 370815 [details] [review]: ::: gst/gstsample.c @@ +312,3 @@ + gst_segment_copy_into (segment, &sample->segment); + else + gst_segment_init (&sample->segment, GST_FORMAT_TIME); Why TIME and not UNDEFINED?
(In reply to Sebastian Dröge (slomo) from comment #4) > Why TIME and not UNDEFINED? For consistency with gst_sample_new :)
(In reply to Mathieu Duponchelle from comment #5) > (In reply to Sebastian Dröge (slomo) from comment #4) > > > Why TIME and not UNDEFINED? > > For consistency with gst_sample_new :) I don't like that but ok :) Go for it then and add a FIXME 2.0 comment there for switching to UNDEFINED
Attachment 370815 [details] pushed as ed5d888 - gstsample: new API