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

◆ choose_video()

MAYAFLUX_API std::pair< std::shared_ptr< Kakshya::VideoFileContainer >, std::shared_ptr< Kakshya::SoundFileContainer > > MayaFlux::choose_video ( const IO::VideoLoadConfig &  config)

Present a native open-file dialog filtered to video formats and load the chosen file via IOManager::load_video(path, config).

Returns IO::VideoLoadResult: the video container, then its audio. With VideoReadOptions::EXTRACT_AUDIO in config.video_options the audio track is decoded and returned; otherwise, or for a file with no audio track, the audio is nullptr.

Blocks until the user confirms or cancels. Both are nullptr on cancellation, backend error, or if Portal::System is not initialized.

Parameters
configLoad options forwarded to IOManager::load_video.

Definition at line 217 of file Depot.cpp.

218{
219 if (!require_portal("choose_video"))
220 return {};
221
222 return Portal::System::Dialog::open_file<IO::VideoLoadResult>(
223 [config](const fs::path& p) { return get_io_manager()->load_video(p.string(), config); },
224 [](Core::SystemDialogError) { },
225 k_video_filters);
226}

References get_io_manager().

+ Here is the call graph for this function: