:right-sidebar: True BaseParseFrame =================================================================== .. currentmodule:: gi.repository.GstBase .. class:: BaseParseFrame(*args, **kwargs) :no-contents-entry: :Constructors: :: BaseParseFrame() new(buffer:Gst.Buffer, flags:GstBase.BaseParseFrameFlags, overhead:int) -> GstBase.BaseParseFrame Constructors ------------ .. rst-class:: interim-class .. class:: BaseParseFrame :no-index: .. classmethod:: new(buffer: ~gi.repository.Gst.Buffer, flags: ~gi.repository.GstBase.BaseParseFrameFlags, overhead: int) -> ~gi.repository.GstBase.BaseParseFrame Allocates a new :obj:`~gi.repository.GstBase.BaseParseFrame`. This function is mainly for bindings, elements written in C should usually allocate the frame on the stack and then use :func:`~gi.repository.GstBase.BaseParseFrame.init` to initialise it. :param buffer: a :obj:`~gi.repository.Gst.Buffer` :param flags: the flags :param overhead: number of bytes in this frame which should be counted as metadata overhead, ie. not used to calculate the average bitrate. Set to -1 to mark the entire frame as metadata. If in doubt, set to 0. Methods ------- .. rst-class:: interim-class .. class:: BaseParseFrame :no-index: .. method:: free() -> None Frees the provided ``frame``. .. method:: init() -> None Sets a :obj:`~gi.repository.GstBase.BaseParseFrame` to initial state. Currently this means all public fields are zero-ed and a private flag is set to make sure :func:`~gi.repository.GstBase.BaseParseFrame.free` only frees the contents but not the actual frame. Use this function to initialise a :obj:`~gi.repository.GstBase.BaseParseFrame` allocated on the stack. Fields ------ .. rst-class:: interim-class .. class:: BaseParseFrame :no-index: .. attribute:: buffer Input data to be parsed for frames. .. attribute:: flags A combination of input and output :obj:`~gi.repository.GstBase.BaseParseFrameFlags` that convey additional context to subclass or allow subclass to tune subsequent :obj:`~gi.repository.GstBase.BaseParse` actions. .. attribute:: offset Media specific offset of input frame Note that a converter may have a different one on the frame's buffer. .. attribute:: out_buffer Output data. .. attribute:: overhead Subclass can set this to indicates the metadata overhead for the given frame, which is then used to enable more accurate bitrate computations. If this is -1, it is assumed that this frame should be skipped in bitrate calculation. .. attribute:: size