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

◆ source_frames()

std::shared_ptr< Buffers::TextureBuffer > MayaFlux::Yantra::Vision::VisionWorkflow::source_frames ( const std::shared_ptr< Kakshya::VideoStreamContainer > &  source,
std::string_view  caller 
) const
private

Definition at line 374 of file VisionWorkflow.cpp.

377{
378 if (!source) {
380 "VisionWorkflow::{}: no video stream", caller);
381 return nullptr;
382 }
383
384 const auto io = m_io_manager.lock();
385 if (!io || m_scheduler.expired() || m_event_manager.expired()) {
387 "VisionWorkflow::{}: the engine's managers are gone", caller);
388 return nullptr;
389 }
390
391 std::shared_ptr<Buffers::TextureBuffer> input;
392 if (const auto camera = std::dynamic_pointer_cast<Kakshya::CameraContainer>(source)) {
393 input = io->get_camera_buffer(camera);
394 if (!input)
395 input = io->hook_camera_to_buffer(camera);
396 } else {
397 input = io->get_video_buffer(source);
398 if (!input)
399 input = io->hook_video_container_to_buffer(source);
400 }
401
402 if (!input) {
404 "VisionWorkflow::{}: the video stream could not be hooked to a buffer", caller);
405 return nullptr;
406 }
407
408 return input;
409}
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
Core::GlobalInputConfig input
Definition Config.cpp:42
std::weak_ptr< Vruta::EventManager > m_event_manager
std::weak_ptr< Vruta::TaskScheduler > m_scheduler
std::weak_ptr< IO::IOManager > m_io_manager
@ ComputeMatrix
Compute operations (Yantra - algorithms, matrices, DSP)
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.

References MayaFlux::Journal::ComputeMatrix, input, m_event_manager, m_io_manager, m_scheduler, MF_ERROR, MF_WARN, and MayaFlux::Journal::Yantra.

Referenced by process_to_buffer(), process_to_live_container(), and process_to_stream().

+ Here is the caller graph for this function: