python_plugin_templateο
Attributesο
Classesο
Generic enumeration. |
|
A Python based gstreamer plugin template. Enables the user to: |
Module Contentsο
- python_plugin_template.SIMAAI_META_STR = 'GstSimaMeta'ο
- python_plugin_template.PLUGIN_CPU_TYPE = 'APU'ο
- class python_plugin_template.MetaStruct(buffer_name, stream_id, timestamp, frame_id)ο
- buffer_nameο
- stream_idο
- timestampο
- frame_idο
- class python_plugin_template.SimaaiPythonBuffer(metadata: MetaStruct, map: gi.repository.Gst.MapInfo)ο
- metadataο
- dataο
- sizeο
- class python_plugin_template.ValueTypeο
Generic enumeration.
Derive from this class to define new enumerations.
- INT64 = 0ο
- UINT64 = 0ο
- STRING = 0ο
- DOUBLE = 0ο
- class python_plugin_template.AggregatorTemplate(plugin_name, out_size)ο
A Python based gstreamer plugin template. Enables the user to: - Accept incoming buffers from dynamic pads - Define any custom plugin runtime logic User has to only override the run() function
- transmitο
- silentο
- configο
- plugin_nameο
- dynamic_pads = []ο
- src_caps_set = Falseο
- timestamp = 0ο
- frame_id = 0ο
- is_pcie = Falseο
- in_pcie_buf_id = 0ο
- stream_id = 'unknown-stream'ο
- buffer_name = 'default'ο
- plugin_id = 'python-agg-template'ο
- t0 = Noneο
- t1 = Noneο
- out_sizeο
- request_new_pad(templ, direction=None, name=None)ο
Handle dynamic pad requests. Pads are created when a new input stream is added dynamically.
- do_start()ο
Handle start even for the aggregator.
- finish_buffer(buffer)ο
Finalizes and pushes the buffer downstream.
- do_set_property(property_id, value)ο
- do_get_property(property_id)ο
- extract_metadata(buffer: gi.repository.Gst.Buffer) None ο
Input: buffer Gst.Buffer: Input buffer from which metadata will be extracted.
- insert_metadata(buffer: gi.repository.Gst.Buffer) None ο
Input: buffer Gst.Buffer: Buffer to be inserted with custom metadata
- do_aggregate(timeout)ο
Called when buffers are queued on all sinkpads. Calls the run() function defined by the user
- abstract run(input_buffers: List[gi.repository.Gst.Buffer], output_buffer: gi.repository.Gst.Buffer) None ο
Input: input_buffers: List[Gst.Buffer] List of input buffers, source from each pad. output_buffer: Gst.Buffer Output buffer that needs to be overwritten.
Implement your logic within this function. Process the input buffers, and modify the output buffer.