X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Finput%2Finput.h;h=28dd7f480322f7fca42382113abb7d7d5827f896;hb=726897adbf881d3b75f171fff24f2b917ba5f05a;hp=5f843b9d11770c8973a151cf7a695c6baa52dd2b;hpb=cd1a44a41dd64c05de067ba728c285f001b66bf3;p=casparcg diff --git a/modules/ffmpeg/producer/input/input.h b/modules/ffmpeg/producer/input/input.h index 5f843b9d1..28dd7f480 100644 --- a/modules/ffmpeg/producer/input/input.h +++ b/modules/ffmpeg/producer/input/input.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2011 Sveriges Television AB +* Copyright 2013 Sveriges Television AB http://casparcg.com/ * * This file is part of CasparCG (www.casparcg.com). * @@ -21,13 +21,17 @@ #pragma once +#include "../util/util.h" + #include #include #include #include +#include #include +#include struct AVFormatContext; struct AVPacket; @@ -45,36 +49,27 @@ namespace ffmpeg { class input : boost::noncopyable { public: - explicit input( - const spl::shared_ptr& graph, - const std::wstring& filename, - bool loop, uint32_t start, - uint32_t length, - bool thumbnail_mode); - - int num_audio_streams() const; - int get_actual_audio_stream_index(int audio_stream_index) const; - - bool try_pop_video(std::shared_ptr& packet); - bool try_pop_audio(std::shared_ptr& packet, int audio_stream_index); - - void loop(bool value); - bool loop() const; + explicit input(const spl::shared_ptr& graph, const std::wstring& filename, FFMPEG_Resource resource_type, bool loop, uint32_t start, uint32_t length, bool thumbnail_mode, const ffmpeg_options& vid_params); - void start(uint32_t value); - uint32_t start() const; + bool try_pop(std::shared_ptr& packet); + bool eof() const; - void length(uint32_t value); - uint32_t length() const; + void start(uint32_t value); + uint32_t start() const; + void length(uint32_t value); + uint32_t length() const; + void loop(bool value); + bool loop() const; - bool eof() const; + int num_audio_streams() const; + boost::rational framerate() const; - void seek(uint32_t target); + std::future seek(uint32_t target); - AVFormatContext& context(); + spl::shared_ptr context(); private: - struct impl; - std::shared_ptr impl_; + struct implementation; + std::shared_ptr impl_; };