[Bug 749729] New: gstsample: add a method to set buffer metadata
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri May 22 06:01:04 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=749729
Bug ID: 749729
Summary: gstsample: add a method to set buffer metadata
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: lists at svrinformatica.it
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 303818
--> https://bugzilla.gnome.org/attachment.cgi?id=303818&action=edit
proof of concept patch
actually if you want to modify a buffer in a gst_sample you have to do
something like this:
GstBuffer *buf = gst_sample_get_buffer(sample);
buf = gst_buffer_make_writable(buf);
....
modify buffer, for example pts or dts
....
GstSample *new_sample =
gst_sample_new(buf,gst_sample_get_caps(sample),NULL,NULL);
gst_sample_unref(sample);
and if the buffer was not originally writable you have to unref the buffer too.
The new sample creation kill my app performance.
Attached is a proof of concept patch, I think would be really useful a way to
modify a buffer contained in a sample without the need to create a new sample,
what do you think about?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list