\r
#include <boost/noncopyable.hpp>\r
\r
+#include <agents.h>\r
#include <vector>\r
\r
struct AVFormatContext;\r
\r
namespace core {\r
struct frame_factory;\r
- class write_frame;\r
}\r
\r
namespace ffmpeg {\r
class video_decoder : boost::noncopyable\r
{\r
public:\r
- explicit video_decoder(const safe_ptr<AVFormatContext>& context, const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& filter);\r
- \r
- void push(const std::shared_ptr<AVPacket>& packet);\r
- bool ready() const;\r
- std::vector<std::shared_ptr<AVFrame>> poll();\r
- \r
+\r
+ typedef Concurrency::ISource<bool> token_t;\r
+ typedef Concurrency::ISource<std::shared_ptr<AVPacket>> source_t;\r
+ typedef Concurrency::ITarget<std::shared_ptr<AVFrame>> target_t;\r
+\r
+ explicit video_decoder(token_t& active_token,\r
+ source_t& source,\r
+ target_t& target,\r
+ const safe_ptr<AVFormatContext>& context, \r
+ double fps, \r
+ const std::wstring& filter); \r
+\r
size_t width() const;\r
size_t height() const;\r
\r
int64_t nb_frames() const;\r
+ bool is_progressive() const;\r
\r
double fps() const;\r
private:\r