Part of numm View In Hierarchy
Asynchronous looping interface.
This class converts inputs to numpy arrays and outputs from numpy arrays. I/O is done using a set of callbacks.
When video output is being produced, the following key bindings are defined by default:
begin_video_capture
.
profile_all
.
Method | __init__ | This class takes a set of callbacks and, when run is |
Method | set_audio_in | Undocumented |
Method | set_audio_out | Undocumented |
Method | set_video_in | Undocumented |
Method | set_video_out | Undocumented |
Method | set_keyboard_in | Undocumented |
Method | set_mouse_in | Undocumented |
Method | run | Enter the mainloop. |
Method | toggle_fps | Undocumented |
Method | begin_video_capture | Begin capturing video output frames to disk. |
Method | end_video_capture | Complement to begin_video_capture . |
Method | toggle_video_capture | Undocumented |
Method | profile_all | Profile each callback the next time it is called. |
Method | _get_stream_position | Undocumented |
Method | _sync_state | Undocumented |
Method | _got_audio_data | Undocumented |
Method | _need_audio_data | Undocumented |
Method | _got_video_data | Undocumented |
Method | _need_video_data | Undocumented |
Method | _get_actual_audio_sink | Undocumented |
Method | _get_actual_video_sink | Undocumented |
Method | _bus_message | Undocumented |
Method | _fps_timeout | Undocumented |
Method | _terminal_input | Undocumented |
Method | _run_with_terminal_input | Undocumented |
Method | _mouse_event | Undocumented |
Method | _keyboard_event | Undocumented |
Method | _event | Undocumented |
Method | _video_out_event | Undocumented |
Method | _find_next_capture_index | Undocumented |
Inherited from Lockable:
Method | __enter__ | Undocumented |
Method | __exit__ | Undocumented |
run
is called, runs in a
loop, calling them as appropriate.
Audio and video callback take an array which contains data which was input (in the case of the "_in" functions) or to which data to be output should be written (in the case of the "_out" functions).
If video_out
is specified, a window is created for video
output.
The keyboard_in
function takes an event type, and a string
representing the key. The event type is either "key-press" or
"key-release".
The mouse_in
function takes an event type, X and Y
positions, and a button. The event type is "mouse-move" or
"mouse-button-press" or "mouse-button-release".
Parameters | audio_in | Audio input received. |
audio_out | Audio output wanted. | |
video_in | Video input received. | |
video_out | Video output wanted. | |
keyboard_in | Keyboard input received. | |
mouse_in | Mouse input received. | |
exit_on_window_close | Whether the run
method should return when the output window (if any) is closed.
| |
(type: Boolean. ) | ||
video_src | The GStreamer element to use as a source for video input. | |
(type: String. ) | ||
video_sink | The GStreamer element to use as a source for video input. | |
(type: String. ) |