]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2:
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 1 Jun 2011 08:46:04 +0000 (08:46 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 1 Jun 2011 08:46:04 +0000 (08:46 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@833 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/consumer/frame_consumer_device.cpp
core/mixer/frame_mixer_device.cpp
core/mixer/read_frame.cpp
core/mixer/read_frame.h
core/video_channel_context.h
shell/server.cpp

index 4ef53f26467a230e7cb7e962c29a99d647fee62b..8357d1c199ee7e828a89b451828f9d55c8642eb8 100644 (file)
@@ -121,7 +121,6 @@ public:
                frame_timer_.restart();\r
                                                \r
                buffer_.push_back(std::make_pair(frame, get_key_frame(frame)));\r
-\r
                if(!buffer_.full())\r
                        return;\r
        \r
@@ -130,8 +129,7 @@ public:
                        if(consumer->get_video_format_desc() != channel_.format_desc)\r
                                consumer->initialize(channel_.format_desc);\r
 \r
-                       auto tmp = (consumer->buffer_depth()-buffer_depth().first);\r
-                       auto pair = buffer_[tmp];\r
+                       auto pair = buffer_[consumer->buffer_depth()-buffer_depth().first];\r
                        auto frame = consumer->key_only() ? pair.second : pair.first;\r
 \r
                        if(static_cast<size_t>(frame->image_data().size()) == consumer->get_video_format_desc().size)\r
@@ -167,7 +165,7 @@ private:
                        auto key_data = channel_.ogl.create_host_buffer(frame->image_data().size(), host_buffer::write_only);                           \r
                        fast_memsfhl(key_data->data(), frame->image_data().begin(), frame->image_data().size(), 0x0F0F0F0F, 0x0B0B0B0B, 0x07070707, 0x03030303);\r
                        std::vector<int16_t> audio_data(frame->audio_data().begin(), frame->audio_data().end());\r
-                       return make_safe<read_frame>(std::move(key_data), std::move(audio_data), frame->number());\r
+                       return make_safe<read_frame>(std::move(key_data), std::move(audio_data));\r
                }\r
                \r
                return read_frame::empty();\r
index ef8dc40daa14138c72b97aeef71575ca71c7b73e..300356d535728395c3ea727e3e35264f0475a19d 100644 (file)
@@ -95,9 +95,7 @@ struct frame_mixer_device::implementation : boost::noncopyable
 \r
        audio_mixer     audio_mixer_;\r
        image_mixer image_mixer_;\r
-\r
-       int frame_number_;\r
-               \r
+       \r
        typedef std::unordered_map<int, tweened_transform<core::image_transform>> image_transforms;\r
        typedef std::unordered_map<int, tweened_transform<core::audio_transform>> audio_transforms;\r
 \r
@@ -111,7 +109,6 @@ public:
                : channel_(video_channel)\r
                , diag_(diagnostics::create_graph(narrow(print())))\r
                , image_mixer_(channel_)\r
-               , frame_number_(0)\r
        {\r
                diag_->add_guide("frame-time", 0.5f);   \r
                diag_->set_color("frame-time", diagnostics::color(1.0f, 0.0f, 0.0f));\r
@@ -132,7 +129,7 @@ public:
                diag_->update_value("tick-time", tick_timer_.elapsed()*channel_.format_desc.fps*0.5);\r
                tick_timer_.restart();\r
 \r
-               return make_safe<read_frame>(std::move(image), std::move(audio), frame_number_++);\r
+               return make_safe<read_frame>(std::move(image), std::move(audio));\r
        }\r
                        \r
        safe_ptr<core::write_frame> create_frame(void* tag, const core::pixel_format_desc& desc)\r
index e4dc63f5dc9bc9707626943eab952dba85647d4a..ba93b77bb094651c694b5fa91aac57562bd3c0b5 100644 (file)
@@ -29,13 +29,11 @@ struct read_frame::implementation : boost::noncopyable
 {\r
        safe_ptr<host_buffer> image_data_;\r
        std::vector<int16_t> audio_data_;\r
-       int number_;\r
 \r
 public:\r
-       implementation(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data, int number\r
+       implementation(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data) \r
                : image_data_(std::move(image_data))\r
-               , audio_data_(std::move(audio_data))\r
-               , number_(number){}     \r
+               , audio_data_(std::move(audio_data)){}  \r
 \r
        const boost::iterator_range<const uint8_t*> image_data()\r
        {\r
@@ -48,11 +46,10 @@ public:
        }\r
 };\r
 \r
-read_frame::read_frame(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data, int number\r
-       : impl_(new implementation(std::move(image_data), std::move(audio_data), number)){}\r
+read_frame::read_frame(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data) \r
+       : impl_(new implementation(std::move(image_data), std::move(audio_data))){}\r
 \r
 const boost::iterator_range<const uint8_t*> read_frame::image_data() const{return impl_->image_data();}\r
 const boost::iterator_range<const int16_t*> read_frame::audio_data() const{return impl_->audio_data();}\r
-int read_frame::number() const{return impl_->number_;}\r
 \r
 }}
\ No newline at end of file
index f8393e8c20a5587ddc5dc671e8a00b3e614a6d8d..f8231bc0635d01f19d294f93345aa99d6ac5e877 100644 (file)
@@ -37,13 +37,11 @@ class read_frame : boost::noncopyable
 {\r
        read_frame(){}\r
 public:\r
-       read_frame(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data, int frame_number);\r
+       read_frame(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data);\r
 \r
        virtual const boost::iterator_range<const uint8_t*> image_data() const;\r
        virtual const boost::iterator_range<const int16_t*> audio_data() const;\r
                \r
-       virtual int number() const;\r
-\r
        static safe_ptr<const read_frame> empty()\r
        {\r
                struct empty : public read_frame\r
index 6cfaaeb06c30c3fdcc4716f9cf8f9e4c04a2be68..9b8bf24dc22f9f47df6df88df3aa11cb969c6a6a 100644 (file)
@@ -22,6 +22,7 @@ struct video_channel_context
                , ogl(ogl)\r
        {\r
                execution.set_priority_class(above_normal_priority_class);\r
+               destruction.set_priority_class(below_normal_priority_class);\r
        }\r
 \r
        const int                       index;\r
index 37f1ff3a5dc47a33370a10019dde3b4315148710..19ba252fdf01c7d67c85a7ac51e1e3616894397d 100644 (file)
@@ -92,7 +92,7 @@ struct server::implementation : boost::noncopyable
                using boost::property_tree::ptree;\r
                BOOST_FOREACH(auto& xml_channel, pt.get_child("configuration.channels"))\r
                {               \r
-                       auto format_desc = video_format_desc::get(widen(xml_channel.second.get("videomode", "PAL")));           \r
+                       auto format_desc = video_format_desc::get(widen(xml_channel.second.get("video-mode", "PAL")));          \r
                        if(format_desc.format == video_format::invalid)\r
                                BOOST_THROW_EXCEPTION(caspar_exception() << msg_info("Invalid video-mode."));\r
                        \r