MayaFlux 0.1.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 37 of file ContiguousAccessProcessor.cpp.

38{
39 m_structure = container->get_structure();
41
42 if (m_current_position.empty()) {
43 uint64_t num_channels = m_structure.get_channel_count();
44 m_current_position.assign(num_channels, 0);
45 }
46
47 if (m_output_shape.empty()) {
48 uint64_t num_frames = m_structure.get_samples_count_per_channel();
49 uint64_t num_channels = m_structure.get_channel_count();
50
52 std::min<uint64_t>(1024UL, num_frames),
53 num_channels
54 };
55 }
56
57 if (auto stream = std::dynamic_pointer_cast<StreamContainer>(container)) {
58 m_looping_enabled = stream->is_looping();
59 m_loop_region = stream->get_loop_region();
60
61 auto stream_positions = stream->get_read_position();
62 if (!stream_positions.empty()) {
63 m_current_position = stream_positions;
64 }
65 }
66}
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: