]> git.sesse.net Git - casparcg/blobdiff - core/channel.h
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / core / channel.h
index 2e89bc6bcbcfba119ac363b2c59a86d319bf26d0..0605fde8ebbc47c22dc68b160279894f41781dcf 100644 (file)
@@ -1,43 +1,41 @@
 #pragma once\r
 \r
-#include "producer/frame_producer_device.h"\r
 #include "consumer/frame_consumer_device.h"\r
-#include "processor/frame_processor_device.h"\r
+#include "mixer/frame_mixer_device.h"\r
+#include "producer/frame_producer_device.h"\r
 \r
-#include <boost/noncopyable.hpp>\r
+#include <common/memory/safe_ptr.h>\r
 \r
-#include <memory>\r
+#include <boost/noncopyable.hpp>\r
+#include <boost/thread/future.hpp>\r
 \r
 namespace caspar { namespace core {\r
 \r
 ////////////////////////////////////////////////////////////////////////////////////////////////////\r
 /// \class     channel\r
 ///\r
-/// \brief     Channel. \r
+/// \brief\r
 ///            \r
 ///                |**********| <-   empty frame   <- |***********| <-   frame format  <- |**********|\r
-/// CONTROLLER ->  | PRODUCER |                       | PROCESSOR |                       | CONSUMER |  -> DISPLAY DEVICE\r
-///                |**********| -> rendered frames -> |***********| -> processed frame -> |**********|\r
+///   PROTOCOL ->  | PRODUCER |                       |   MIXER          |                       | CONSUMER |  -> DISPLAY DEVICE\r
+///                |**********| -> rendered frames -> |***********| -> formatted frame -> |**********|\r
 ///   \r
 ////////////////////////////////////////////////////////////////////////////////////////////////////\r
 class channel : boost::noncopyable\r
 {\r
 public:\r
-       channel(const frame_producer_device_ptr& producer_device, const frame_processor_device_ptr& processor_device, const frame_consumer_device_ptr& consumer_device);\r
-       \r
-       void load(int render_layer, const frame_producer_ptr& producer, load_option::type option = load_option::none);\r
-       void pause(int render_layer);\r
-       void play(int render_layer);\r
-       void stop(int render_layer);\r
-       void clear(int render_layer);\r
-       void clear();   \r
-       frame_producer_ptr active(int render_layer) const;\r
-       frame_producer_ptr background(int render_layer) const;\r
-       const video_format_desc get_video_format_desc() const;\r
+       explicit channel(const video_format_desc& format_desc);\r
+       channel(channel&& other);\r
+\r
+       frame_producer_device& producer();\r
+       frame_mixer_device& mixer();\r
+       frame_consumer_device& consumer();\r
+\r
+       const video_format_desc& get_video_format_desc() const;\r
+\r
 private:\r
        struct implementation;\r
-       std::shared_ptr<implementation> impl_;\r
+       safe_ptr<implementation> impl_;\r
 };\r
-typedef std::shared_ptr<channel> channel_ptr;\r
 \r
 }}
\ No newline at end of file