]> git.sesse.net Git - casparcg/commitdiff
2.0.2: frame_consumer: Removed uneccessary get_video_format_desc.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 21 Nov 2011 18:24:23 +0000 (18:24 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 21 Nov 2011 18:24:23 +0000 (18:24 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.2@1617 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/consumer/frame_consumer.h
modules/bluefish/consumer/bluefish_consumer.cpp
modules/decklink/consumer/decklink_consumer.cpp
modules/oal/consumer/oal_consumer.cpp
modules/ogl/consumer/ogl_consumer.cpp

index ecb39c08de9039dd6032b4392a8db868ffa42aed..e1880102f2c080eed12d953418ed9e6bd0615f28 100644 (file)
@@ -42,7 +42,6 @@ struct frame_consumer : boost::noncopyable
        virtual void initialize(const video_format_desc& format_desc) = 0;\r
        virtual std::wstring print() const = 0;\r
        virtual bool has_synchronization_clock() const {return true;}\r
-       virtual const core::video_format_desc& get_video_format_desc() const = 0; // nothrow\r
        virtual size_t buffer_depth() const = 0;\r
 \r
        static const safe_ptr<frame_consumer>& empty()\r
@@ -54,7 +53,6 @@ struct frame_consumer : boost::noncopyable
                        virtual void initialize(const video_format_desc&){}\r
                        virtual std::wstring print() const {return L"empty";}\r
                        virtual bool has_synchronization_clock() const {return false;}\r
-                       virtual const core::video_format_desc& get_video_format_desc() const{return format_desc;}; // nothrow\r
                        virtual size_t buffer_depth() const {return 0;};\r
                };\r
                static safe_ptr<frame_consumer> consumer = make_safe<empty_frame_consumer>();\r
index 49040a344fbf73546cb2d6e55b00c4590d8e7589..2594339460b4acad0fd1bdd6dca2177585e73358 100644 (file)
@@ -175,11 +175,6 @@ public:
                CASPAR_LOG(info) << print() << L" Shutting down.";      \r
        }\r
        \r
-       const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return format_desc_;\r
-       }\r
-\r
        void enable_video_output()\r
        {\r
                if(!BLUE_PASS(set_card_property(blue_, VIDEO_BLACKGENERATOR, 0)))\r
@@ -300,7 +295,6 @@ struct bluefish_consumer_proxy : public core::frame_consumer
        const size_t                                            device_index_;\r
        const bool                                                      embedded_audio_;\r
        const bool                                                      key_only_;\r
-       core::video_format_desc                         format_desc_;\r
 public:\r
 \r
        bluefish_consumer_proxy(size_t device_index, bool embedded_audio, bool key_only)\r
@@ -312,7 +306,6 @@ public:
        \r
        virtual void initialize(const core::video_format_desc& format_desc)\r
        {\r
-               format_desc_ = format_desc;\r
                consumer_.reset(new bluefish_consumer(format_desc, device_index_, embedded_audio_, key_only_));\r
        }\r
        \r
@@ -321,18 +314,10 @@ public:
                consumer_->send(frame);\r
                return true;\r
        }\r
-\r
-       virtual const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return consumer_->get_video_format_desc();\r
-       }\r
-       \r
+               \r
        virtual std::wstring print() const\r
        {\r
-               if(consumer_)\r
-                       consumer_->print();\r
-\r
-               return L"bluefish [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+               return consumer_ ? consumer_->print() : L"bluefish_consumer";\r
        }\r
 \r
        size_t buffer_depth() const\r
index dccb5c5073e212c27e7f0f1017dd1e0ad733bcb3..bed73e8a9111206b29edb5d9a9463cafd8e1bb47 100644 (file)
@@ -224,11 +224,6 @@ public:
                }\r
        }\r
                        \r
-       const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return format_desc_;\r
-       }\r
-\r
        void set_latency(bool low_latency)\r
        {               \r
                if(!low_latency)\r
@@ -424,7 +419,6 @@ struct decklink_consumer_proxy : public core::frame_consumer
 {\r
        const configuration                             config_;\r
        com_context<decklink_consumer>  context_;\r
-       core::video_format_desc                 format_desc_;\r
 public:\r
 \r
        decklink_consumer_proxy(const configuration& config)\r
@@ -442,8 +436,7 @@ public:
        \r
        virtual void initialize(const core::video_format_desc& format_desc)\r
        {\r
-               format_desc_ = format_desc;\r
-               context_.reset([&]{return new decklink_consumer(config_, format_desc_);});              \r
+               context_.reset([&]{return new decklink_consumer(config_, format_desc);});               \r
                                \r
                CASPAR_LOG(info) << print() << L" Successfully Initialized.";   \r
        }\r
@@ -457,12 +450,7 @@ public:
        virtual std::wstring print() const\r
        {\r
                return context_ ? context_->print() : L"decklink_consumer";\r
-       }\r
-                       \r
-       virtual const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return format_desc_;\r
-       }\r
+       }                       \r
 \r
        virtual size_t buffer_depth() const\r
        {\r
index 139a7586a9a2df92991a015790f6db1fd1e3de45..3acd140f21e17f48a561c332b09127b5f273717b 100644 (file)
@@ -51,11 +51,9 @@ struct oal_consumer : public core::frame_consumer,  public sf::SoundStream
        tbb::atomic<bool>                                                                       is_running_;\r
 \r
        core::video_format_desc                                                         format_desc_;\r
-       int                                                                                                     preroll_count_;\r
 public:\r
        oal_consumer() \r
                : container_(16)\r
-               , preroll_count_(0)\r
        {\r
                graph_->add_guide("tick-time", 0.5);\r
                graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f));   \r
@@ -114,12 +112,7 @@ public:
        {\r
                return L"oal[" + format_desc_.name + L"]";\r
        }\r
-\r
-       virtual const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return format_desc_;\r
-       }\r
-\r
+       \r
        virtual size_t buffer_depth() const\r
        {\r
                return 2;\r
index 9b667ee66d82f54fc689aada3461a4c47f23bf88..fd1f4ac14f80bf448355b8728d20557e6c2d7613 100644 (file)
@@ -265,11 +265,6 @@ public:
                }\r
        }\r
        \r
-       const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return format_desc_;\r
-       }\r
-\r
        safe_ptr<AVFrame> get_av_frame()\r
        {               \r
                safe_ptr<AVFrame> av_frame(avcodec_alloc_frame(), av_free);     \r
@@ -452,12 +447,7 @@ public:
        {\r
                return false;\r
        }\r
-\r
-       virtual const core::video_format_desc& get_video_format_desc() const\r
-       {\r
-               return consumer_->get_video_format_desc();\r
-       }\r
-\r
+       \r
        virtual size_t buffer_depth() const\r
        {\r
                return 1;\r