Aravis.Stream¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Optional user callback |
||
r/w/co |
Optional user callback data |
||
r/w/co |
Optional destroy notify |
||
r/w/co |
A |
||
r/w |
Emit signals |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Signal that a new buffer is available. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Aravis.Stream(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Aravis.Stream
provides an abstract base class for the implementation of video stream reception threads. The interface between the reception thread and the main thread is done using asynchronous queues, containingAravis.Buffer
objects.- get_emit_signals()¶
-
Check if stream will emit its signals.
New in version 0.2.0.
- get_info_double(id)¶
- Parameters:
id (
int
) – info id- Returns:
the value of the corresponding stream information, as a double.
- Return type:
New in version 0.8.11.
- get_info_double_by_name(name)¶
- Parameters:
name (
str
) – info name- Returns:
the value of the corresponding stream information, as a double.
- Return type:
New in version 0.8.11.
- get_info_name(id)¶
- Parameters:
id (
int
) – info id- Returns:
the name of the corresponding stream information.
- Return type:
New in version 0.8.11.
- get_info_type(id)¶
- Parameters:
id (
int
) – info id- Returns:
the
GObject.GType
of the corresponding stream information, which indicates what API to use to retrieve the information value (Aravis.Stream.get_info_uint64
() orAravis.Stream.get_info_double
()).- Return type:
New in version 0.8.11.
- get_info_uint64(id)¶
- Parameters:
id (
int
) – info id- Returns:
the value of the corresponding stream information, as a 64 bit unsigned integer.
- Return type:
New in version 0.8.11.
- get_info_uint64_by_name(name)¶
- Parameters:
name (
str
) – info name- Returns:
the value of the corresponding stream information, as a 64 bit unsigned integer.
- Return type:
New in version 0.8.11.
- get_n_buffers()¶
- Returns:
- n_input_buffers:
input queue length
- n_output_buffers:
output queue length
- Return type:
An accessor to the stream buffer queue lengths.
New in version 0.2.0.
- get_n_infos()¶
- Returns:
the number of stream informations. These informations contain useful numbers about data transfer quality.
- Return type:
New in version 0.8.11.
- get_statistics()¶
- Returns:
- n_completed_buffers:
number of complete received buffers
- n_failures:
number of reception failures
- n_underruns:
number of input buffer underruns
- Return type:
(n_completed_buffers:
int
, n_failures:int
, n_underruns:int
)
An accessor to the stream statistics.
New in version 0.2.0.
- pop_buffer()¶
- Returns:
- Return type:
Pops a buffer from the output queue of self. The retrieved buffer may contain an invalid image. Caller should check the buffer status before using it. This function blocks until a buffer is available.
This method is thread safe.
New in version 0.2.0.
- push_buffer(buffer)¶
- Parameters:
buffer (
Aravis.Buffer
) – buffer to push
Pushes a
Aravis.Buffer
to the self thread. The self takes ownership of buffer, and will free all the buffers still in its queues when destroyed.This method is thread safe.
New in version 0.2.0.
- set_emit_signals(emit_signals)¶
- Parameters:
emit_signals (
bool
) – the new state
Make self emit signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
New in version 0.2.0.
- start_thread()¶
Start the stream receiving thread. The thread is automatically started when the
Aravis.Stream
object is instantiated, so this function is only useful if the thread was stopped using arv_stream_stop_thread.New in version 0.6.2.
- stop_thread(delete_buffers)¶
- Parameters:
delete_buffers (
bool
) – enable buffer deletion- Returns:
the number of deleted buffers if delete_buffers ==
True
, 0 otherwise.- Return type:
Stop the stream receiving thread, and optionally delete all the
Aravis.Buffer
stored in the stream object queues. Main use of this function is to be able to quickly change an acquisition parameter that changes the payload size, without deleting/recreating the stream object.New in version 0.6.2.
- timeout_pop_buffer(timeout)¶
- Parameters:
timeout (
int
) – timeout, in µs- Returns:
a
Aravis.Buffer
,None
if no buffer is available until the timeout occurs.- Return type:
Pops a buffer from the output queue of self, waiting no more than timeout. The retrieved buffer may contain an invalid image. Caller should check the buffer status before using it.
This method is thread safe.
New in version 0.2.0.
- try_pop_buffer()¶
- Returns:
a
Aravis.Buffer
,None
if no buffer is available.- Return type:
Pops a buffer from the output queue of self. The retrieved buffer may contain an invalid image. Caller should check the buffer status before using it. This is the non blocking version of pop_buffer.
This method is thread safe.
New in version 0.2.0.
- do_new_buffer() virtual¶
- do_start_thread() virtual¶
Start the stream receiving thread. The thread is automatically started when the
Aravis.Stream
object is instantiated, so this function is only useful if the thread was stopped using arv_stream_stop_thread.New in version 0.6.2.
- do_stop_thread() virtual¶
Signal Details¶
- Aravis.Stream.signals.new_buffer(stream)¶
- Signal Name:
new-buffer
- Flags:
- Parameters:
stream (
Aravis.Stream
) – The object which received the signal
Signal that a new buffer is available.
This signal is emited from the stream receive thread and only when the “emit-signals” property is
True
.The new buffer can be retrieved with
Aravis.Stream.pop_buffer
().Note that this signal is only emited when the “emit-signals” property is set to
True
, which it is not by default for performance reasons.New in version 0.2.0.
Property Details¶
- Aravis.Stream.props.callback¶
- Name:
callback
- Type:
- Default Value:
- Flags:
Optional user callback
- Aravis.Stream.props.callback_data¶
- Name:
callback-data
- Type:
- Default Value:
- Flags:
Optional user callback data
- Aravis.Stream.props.destroy_notify¶
- Name:
destroy-notify
- Type:
- Default Value:
- Flags:
Optional destroy notify
- Aravis.Stream.props.device¶
- Name:
device
- Type:
- Default Value:
- Flags:
A
Aravis.Device
parent object