134 [[nodiscard]] std::shared_ptr<Kakshya::VideoFileContainer> load_video(
const std::string& filepath);
153 const std::string& filepath,
LoadConfig config);
168 [[nodiscard]] std::shared_ptr<Buffers::VideoContainerBuffer>
169 hook_video_container_to_buffer(
170 const std::shared_ptr<Kakshya::VideoFileContainer>& container);
181 [[nodiscard]] std::shared_ptr<Buffers::VideoContainerBuffer>
183 const std::shared_ptr<Kakshya::VideoFileContainer>& container)
const;
200 [[nodiscard]] std::shared_ptr<Kakshya::SoundFileContainer> load_audio(
const std::string& filepath,
LoadConfig config = {});
215 [[nodiscard]] std::shared_ptr<Kakshya::DynamicSoundStream> load_audio_bounded(
216 const std::string& filepath,
217 uint64_t max_frames = 0,
218 bool truncate =
false);
237 [[nodiscard]] std::shared_ptr<SoundFileWriter>
238 create_writer(
const std::string& filepath,
240 uint32_t sample_rate = 48000,
241 AVCodecID codec_id = AV_CODEC_ID_NONE);
254 void write(
const std::shared_ptr<Kakshya::SoundStreamContainer>& container,
255 const std::string& filepath,
256 AVCodecID codec_id = AV_CODEC_ID_NONE);
272 [[nodiscard]] uint32_t capture_output(
const std::string& filepath,
273 AVCodecID codec_id = AV_CODEC_ID_NONE);
283 void stop_capture(uint32_t capture_id);
298 [[nodiscard]] std::vector<std::shared_ptr<Buffers::SoundContainerBuffer>>
299 hook_audio_container_to_buffers(
300 const std::shared_ptr<Kakshya::SoundFileContainer>& container);
311 [[nodiscard]] std::vector<std::shared_ptr<Buffers::SoundContainerBuffer>>
313 const std::shared_ptr<Kakshya::SoundFileContainer>& container)
const;
320 [[nodiscard]] std::shared_ptr<Kakshya::SoundFileContainer>
321 get_extracted_audio(
const std::shared_ptr<Kakshya::VideoFileContainer>& container)
const;
344 [[nodiscard]] std::shared_ptr<Kakshya::CameraContainer>
361 [[nodiscard]] std::shared_ptr<Buffers::VideoContainerBuffer>
362 hook_camera_to_buffer(
const std::shared_ptr<Kakshya::CameraContainer>& container);
371 [[nodiscard]] std::shared_ptr<Buffers::VideoContainerBuffer>
372 get_camera_buffer(
const std::shared_ptr<Kakshya::CameraContainer>& container)
const;
390 [[nodiscard]] uint64_t register_video_reader(std::shared_ptr<VideoFileReader> reader);
401 void release_video_reader(uint64_t reader_id);
422 [[nodiscard]] std::shared_ptr<VideoFileWriter>
423 create_writer(
const std::string& filepath,
427 AVPixelFormat src_pixel_format,
428 AVCodecID codec_id = AV_CODEC_ID_NONE);
445 [[nodiscard]] uint32_t capture_window(
446 const std::shared_ptr<Core::Window>& window,
447 const std::string& filepath,
449 AVCodecID codec_id = AV_CODEC_ID_NONE);
459 void stop_capture(
const std::shared_ptr<Core::Window>& window);
464 [[nodiscard]] std::vector<uint32_t> get_video_capture_ids()
const;
469 [[nodiscard]] std::vector<std::shared_ptr<VideoFileWriter>> get_video_writers()
const;
485 [[nodiscard]] std::shared_ptr<Buffers::TextureBuffer>
486 load_image(
const std::string& filepath);
507 [[nodiscard]] std::vector<std::shared_ptr<Buffers::MeshBuffer>>
509 const std::string& filepath,
523 [[nodiscard]] std::shared_ptr<Nodes::Network::MeshNetwork>
525 const std::string& filepath,
551 const std::shared_ptr<Core::VKImage>&
image,
552 const std::string& filepath,
556 const std::shared_ptr<Buffers::TextureBuffer>& buffer,
557 const std::string& filepath,
561 const std::shared_ptr<Buffers::TextBuffer>& buffer,
562 const std::string& filepath,
563 const IO::ImageWriteOptions& options = {});
574 const std::string& filepath,
575 const IO::ImageWriteOptions& options = {});
583 void wait_for_pending_saves();
592 [[nodiscard]] std::vector<uint64_t> get_video_reader_ids()
const;
597 [[nodiscard]] std::shared_ptr<VideoFileReader> get_video_reader(uint64_t
id)
const;
602 [[nodiscard]] std::vector<uint64_t> get_camera_reader_ids()
const;
607 [[nodiscard]] std::shared_ptr<CameraReader> get_camera_reader(uint64_t
id)
const;
612 [[nodiscard]] std::vector<std::shared_ptr<SoundFileReader>>
get_audio_readers()
const {
return m_audio_readers; };
617 [[nodiscard]] std::vector<std::shared_ptr<ImageReader>>
get_image_readers()
const {
return m_image_readers; };
622 [[nodiscard]] std::vector<std::shared_ptr<ModelReader>>
get_model_readers()
const {
return m_model_readers; };
627 [[nodiscard]] std::vector<uint32_t> get_audio_capture_ids()
const;
632 [[nodiscard]] std::vector<std::shared_ptr<SoundFileWriter>>
get_sound_writers()
const {
return m_writers; };
642 void dispatch_decode_request(uint64_t reader_id);
648 void dispatch_frame_request(uint64_t reader_id);
650 void configure_frame_processor(
651 const std::shared_ptr<Kakshya::VideoFileContainer>& container);
653 void configure_audio_processor(
654 const std::shared_ptr<Kakshya::SoundFileContainer>& container);
659 std::shared_ptr<Kakshya::AudioOutputContainer>
container;
661 uint32_t observer_id {};
671 uint32_t capture_id {};
676 std::atomic<uint32_t> m_next_video_capture_id { 1 };
682 std::atomic<uint64_t> m_next_reader_id { 1 };
694 std::vector<std::shared_ptr<SoundFileWriter>>
m_writers;
703 std::shared_ptr<Kakshya::VideoFileContainer>,
704 std::shared_ptr<Buffers::VideoContainerBuffer>>
708 std::shared_ptr<Kakshya::CameraContainer>,
709 std::shared_ptr<Buffers::VideoContainerBuffer>>
713 std::shared_ptr<Kakshya::VideoFileContainer>,
714 std::shared_ptr<Kakshya::SoundFileContainer>>
718 std::shared_ptr<Kakshya::SoundFileContainer>,
719 std::vector<std::shared_ptr<Buffers::SoundContainerBuffer>>>