|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Kakshya::VideoStreamContainer::setup_ring | ( | uint64_t | total_frames, |
| uint32_t | ring_capacity, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | channels, | ||
| double | frame_rate, | ||
| uint32_t | refill_threshold, | ||
| uint64_t | reader_id = 0 |
||
| ) |
Allocate m_data[0] as a ring of ring_capacity frames.
Switches the container from flat mode to ring mode. m_data[0] is resized to ring_capacity x frame_byte_size. m_num_frames is set to total_frames so processors see the full temporal extent. Pixel data is indexed by frame_index % ring_capacity.
| total_frames | Total frames in the source (file, stream, etc). |
| ring_capacity | Number of frame slots (must be power of 2). |
| width | Frame width in pixels. |
| height | Frame height in pixels. |
| channels | Colour channels per pixel. |
| frame_rate | Frame rate in fps. |
| refill_threshold | Frames of look-ahead below which refill callback fires. |
| reader_id | The current class ID registered at the stream/file-read source |
Definition at line 79 of file VideoStreamContainer.cpp.
References get_frame_byte_size(), MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Kakshya::IDLE, MayaFlux::Registry::BackendRegistry::instance(), m_cache_head, m_channels, m_data, m_data_mutex, m_frame_rate, m_height, m_io_reader_id, m_io_service, m_num_frames, m_ready_queue, m_refill_threshold, m_ring_capacity, m_slot_frame, m_total_source_frames, m_width, setup_dimensions(), and update_processing_state().
Here is the call graph for this function: