|
gstlal 1.13.0
|
Public Member Functions | |
| None | __init__ (self, Optional[str] name=None, Optional[GLib.MainLoop] mainloop=None, Optional[Gst.Pipeline] pipeline=None, Optional["StreamHandler"] handler=None, Optional["SourceElem"] source=None, Union[MappingType[str, Gst.Element], Gst.Element, None] head=None) |
| None | start (self) |
| "Stream" | from_datasource (cls, datasource.DataSourceInfo data_source_info, Union[str, Iterable[str]] ifos, Optional[str] name=None, bool verbose=False, bool state_vector=False, bool dq_vector=False, bool idq_series=False) |
| None | connect (self, *args, **kwargs) |
| None | bufsink (self, Callable[[Buffer], None] func, Optional[Gst.Caps] caps=None) |
| None | add_callback (self, Gst.MessageType msg_type, *args) |
| None | set_state (self, Gst.State state) |
| Gst.Element | get_element_by_name (self, str name) |
| None | post_message (self, None msg_name, Optional[int] timestamp=None) |
| "Stream" | __getitem__ (self, str key) |
| None | __setitem__ (self, str key, "Stream" value) |
| Iterable[str] | keys (self) |
| Iterable["Stream"] | values (self) |
| Iterable[Tuple[str, "Stream"]] | items (self) |
| "Stream" | clear (self) |
Public Attributes | |
| name = name if name else str(uuid.uuid1()) | |
| mainloop = mainloop if mainloop else GLib.MainLoop() | |
| pipeline = pipeline if pipeline else Gst.Pipeline(self.name) | |
| Setup a signal handler to intercept SIGINT in order to write the pipeline graph at ctrl+C before cleanly shutting down. | |
| handler = handler if handler else StreamHandler(self.mainloop, self.pipeline) | |
| head = head | |
| source = source if source else None | |
Protected Member Functions | |
| None | _seek_gps (self) |
| _pull_buffer (cls, Gst.Element elem, Optional[Gst.Caps] caps=None) | |
| None | _load_caps_buffer_map (cls) |
Static Protected Member Functions | |
| Gst.FlowReturn | _preroll_handler (Gst.Element elem) |
Protected Attributes | |
| _appsync = pipeparts.AppSync(appsink_new_buffer=sample_handler) | |
| _preroll_handler | |
Static Protected Attributes | |
| bool | _gst_init = False |
| bool | _has_elements = False |
| _caps_buffer_map = None | |
| None python.stream.Stream.__init__ | ( | self, | |
| Optional[str] | name = None, | ||
| Optional[GLib.MainLoop] | mainloop = None, | ||
| Optional[Gst.Pipeline] | pipeline = None, | ||
| Optional["StreamHandler"] | handler = None, | ||
| Optional["SourceElem"] | source = None, | ||
| Union[MappingType[str, Gst.Element], Gst.Element, None] | head = None ) |
Create a Stream that can be used to build a GStreamer-based pipeline.
Args:
name:
str, a name for the GStreamer pipeline (optional).
If not set, generates a unique name.
mainloop:
GLib.MainLoop, the GLib event loop to drive the GStreamer pipeline.
If not set, one will be created.
pipeline:
Gst.Pipeline, the GStreamer pipeline object that contains the pipeline graph.
If not set, one will be created.
handler:
StreamHandler, a handler which registers callbacks upon new bus messages and
stops the event loop upon EOS. If not set, one will be created.
source:
SourceElem, an object that stores source information as well as state/DQ vector
elements. If not set, one will be created.
head:
Union[MappingType[str, Gst.Element], Gst.Element], a pointer to the current
element in the pipeline. If not set, the Stream will not have any elements
attached to the pipeline upon instantiation.
| "Stream" python.stream.Stream.__getitem__ | ( | self, | |
| str | key ) |
| None python.stream.Stream.__setitem__ | ( | self, | |
| str | key, | ||
| "Stream" | value ) |
|
protected |
|
staticprotected |
|
protected |
|
protected |
| None python.stream.Stream.add_callback | ( | self, | |
| Gst.MessageType | msg_type, | ||
| * | args ) |
| None python.stream.Stream.bufsink | ( | self, | |
| Callable[[Buffer], None] | func, | ||
| Optional[Gst.Caps] | caps = None ) |
Terminate this stream with an appsink element and process new buffers with a callback.
Args:
func:
Callable[[Buffer], None], a callback that gets invoked when a new buffer is available
caps:
Gst.Caps, how to interpret the contents of the raw buffers.
If not set, defaults to raw audio buffers (audio/x-raw).
| "Stream" python.stream.Stream.clear | ( | self | ) |
| None python.stream.Stream.connect | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
| "Stream" python.stream.Stream.from_datasource | ( | cls, | |
| datasource.DataSourceInfo | data_source_info, | ||
| Union[str, Iterable[str]] | ifos, | ||
| Optional[str] | name = None, | ||
| bool | verbose = False, | ||
| bool | state_vector = False, | ||
| bool | dq_vector = False, | ||
| bool | idq_series = False ) |
Construct a Stream from a datasource.DataSourceInfo object.
Args:
data_source_info:
DataSourceInfo, the object to construct this stream with.
ifos:
Union[str, Iterable[str]], the detectors read timeseries data for.
name:
str, a name for the GStreamer pipeline (optional).
If not set, generates a unique name.
verbose:
bool, default False, whether to display logging/progress information.
state_vector:
bool, default False, whether to attach state vector information to this Stream
dq_vector:
bool, default False, whether to attach data quality vector information to this Stream
idq_series:
bool, default False, whether to fetch idq data information with this Stream
Returns:
Stream, the newly created stream.
| Gst.Element python.stream.Stream.get_element_by_name | ( | self, | |
| str | name ) |
| Iterable[Tuple[str, "Stream"]] python.stream.Stream.items | ( | self | ) |
| None python.stream.Stream.post_message | ( | self, | |
| None | msg_name, | ||
| Optional[int] | timestamp = None ) |
| None python.stream.Stream.set_state | ( | self, | |
| Gst.State | state ) |
| None python.stream.Stream.start | ( | self | ) |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
| python.stream.Stream.handler = handler if handler else StreamHandler(self.mainloop, self.pipeline) |
| python.stream.Stream.mainloop = mainloop if mainloop else GLib.MainLoop() |
| python.stream.Stream.name = name if name else str(uuid.uuid1()) |
| python.stream.Stream.pipeline = pipeline if pipeline else Gst.Pipeline(self.name) |