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

◆ operator|() [8/8]

template<typename T >
requires std::is_base_of_v<Kakshya::VideoStreamContainer, T>
std::shared_ptr< T > MayaFlux::operator| ( std::shared_ptr< T >  obj,
const CreationContext &  ctx 
)

Hook a video or camera container to a buffer in the Graphics domain.

Returns the same container, with its real type. A video file loaded with VideoReadOptions::EXTRACT_AUDIO also has its audio hooked, so one pipe registers both. Reach the buffers with get_associated_buffer and get_associated_buffers. A container that is already hooked is not hooked again.

auto camera = vega.read_camera() | Graphics;
auto picture = get_associated_buffer(camera);
std::shared_ptr< Kakshya::CameraContainer > read_camera(const IO::CameraConfig &config)
Open a camera device as a live source container.
Definition Creator.cpp:196
Creator vega
Global Creator instance.
Definition Creator.cpp:28
std::shared_ptr< Buffers::VideoContainerBuffer > get_associated_buffer(const std::shared_ptr< Kakshya::VideoStreamContainer > &container)
The buffer a video or camera container was hooked to.
Definition Depot.cpp:151
static constexpr DomainSpec Graphics
Domain constant for Graphics domain.
Definition Creator.hpp:444

Definition at line 419 of file Creator.hpp.

420{
421 if (ctx.domain)
422 register_container(obj, ctx.domain.value());
423 return obj;
424}
void register_container(const std::shared_ptr< Kakshya::SoundFileContainer > &container, const Domain &domain)
Definition Creator.cpp:107
std::optional< Domain > domain
Definition Creator.hpp:28

References MayaFlux::CreationContext::domain, and register_container().

+ Here is the call graph for this function: