MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ store_metadata()

void ContiguousAccessProcessor::store_metadata ( const std::shared_ptr< SignalSourceContainer > &  container)
private

Store dimension and layout metadata from the container.

Parameters
containerThe SignalSourceContainer to query.

Definition at line 42 of file ContiguousAccessProcessor.cpp.

43{
44 m_structure = container->get_structure();
46
47 if (m_current_position.empty()) {
48 uint64_t num_channels = m_structure.get_channel_count();
49 m_current_position.assign(num_channels, 0);
50 }
51
52 if (m_output_shape.empty()) {
53 uint64_t num_frames = m_structure.get_samples_count_per_channel();
54 uint64_t num_channels = m_structure.get_channel_count();
55
57 std::min<uint64_t>(1024UL, num_frames),
58 num_channels
59 };
60 }
61
62 if (auto stream = std::dynamic_pointer_cast<StreamContainer>(container)) {
63 m_looping_enabled = stream->is_looping();
64 m_loop_region = stream->get_loop_region();
65
66 auto stream_positions = stream->get_read_position();
67 if (!stream_positions.empty()) {
68 m_current_position = stream_positions;
69 }
70 }
71}
static uint64_t get_channel_count(const std::vector< DataDimension > &dimensions)
Extract channel count from dimensions.
static uint64_t get_samples_count_per_channel(const std::vector< DataDimension > &dimensions)
Get samples per channel (time dimension only).
static uint64_t get_total_elements(const std::vector< DataDimension > &dimensions)
Get total elements across all dimensions.

References MayaFlux::Kakshya::ContainerDataStructure::get_channel_count(), MayaFlux::Kakshya::ContainerDataStructure::get_samples_count_per_channel(), MayaFlux::Kakshya::ContainerDataStructure::get_total_elements(), m_current_position, m_loop_region, m_looping_enabled, m_output_shape, m_structure, and m_total_elements.

Referenced by on_attach(), and set_output_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: