-spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<frame_factory>&, const video_format_desc& format_desc, const std::vector<std::wstring>& params);
-spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<frame_factory>&, const video_format_desc& format_desc, const std::wstring& params);
+struct frame_producer_dependencies
+{
+ spl::shared_ptr<core::frame_factory> frame_factory;
+ std::vector<spl::shared_ptr<video_channel>> channels;
+ video_format_desc format_desc;
+ spl::shared_ptr<const frame_producer_registry> producer_registry;
+
+ frame_producer_dependencies(
+ const spl::shared_ptr<core::frame_factory>& frame_factory,
+ const std::vector<spl::shared_ptr<video_channel>>& channels,
+ const video_format_desc& format_desc,
+ const spl::shared_ptr<const frame_producer_registry> producer_registry);
+};
+
+typedef std::function<spl::shared_ptr<core::frame_producer>(const frame_producer_dependencies&, const std::vector<std::wstring>&)> producer_factory_t;
+typedef std::function<draw_frame (const frame_producer_dependencies&, const std::wstring&)> thumbnail_producer_t;
+
+class frame_producer_registry : boost::noncopyable
+{
+public:
+ frame_producer_registry(spl::shared_ptr<help_repository> help_repo);
+ void register_producer_factory(std::wstring name, const producer_factory_t& factory, const help_item_describer& describer); // Not thread-safe.
+ void register_thumbnail_producer(const thumbnail_producer_t& thumbnail_producer); // Not thread-safe.
+ spl::shared_ptr<core::frame_producer> create_producer(const frame_producer_dependencies&, const std::vector<std::wstring>& params) const;
+ spl::shared_ptr<core::frame_producer> create_producer(const frame_producer_dependencies&, const std::wstring& params) const;
+ draw_frame create_thumbnail(const frame_producer_dependencies&, const std::wstring& media_file) const;
+private:
+ struct impl;
+ spl::shared_ptr<impl> impl_;
+};