From: ronag Date: Wed, 1 Jun 2011 08:46:04 +0000 (+0000) Subject: 2.0.0.2: X-Git-Tag: 2.0.1~476 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=78d792990549440910cc9c9bfb2af288fd9ced53;p=casparcg 2.0.0.2: git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@833 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- diff --git a/core/consumer/frame_consumer_device.cpp b/core/consumer/frame_consumer_device.cpp index 4ef53f264..8357d1c19 100644 --- a/core/consumer/frame_consumer_device.cpp +++ b/core/consumer/frame_consumer_device.cpp @@ -121,7 +121,6 @@ public: frame_timer_.restart(); buffer_.push_back(std::make_pair(frame, get_key_frame(frame))); - if(!buffer_.full()) return; @@ -130,8 +129,7 @@ public: if(consumer->get_video_format_desc() != channel_.format_desc) consumer->initialize(channel_.format_desc); - auto tmp = (consumer->buffer_depth()-buffer_depth().first); - auto pair = buffer_[tmp]; + auto pair = buffer_[consumer->buffer_depth()-buffer_depth().first]; auto frame = consumer->key_only() ? pair.second : pair.first; if(static_cast(frame->image_data().size()) == consumer->get_video_format_desc().size) @@ -167,7 +165,7 @@ private: auto key_data = channel_.ogl.create_host_buffer(frame->image_data().size(), host_buffer::write_only); fast_memsfhl(key_data->data(), frame->image_data().begin(), frame->image_data().size(), 0x0F0F0F0F, 0x0B0B0B0B, 0x07070707, 0x03030303); std::vector audio_data(frame->audio_data().begin(), frame->audio_data().end()); - return make_safe(std::move(key_data), std::move(audio_data), frame->number()); + return make_safe(std::move(key_data), std::move(audio_data)); } return read_frame::empty(); diff --git a/core/mixer/frame_mixer_device.cpp b/core/mixer/frame_mixer_device.cpp index ef8dc40da..300356d53 100644 --- a/core/mixer/frame_mixer_device.cpp +++ b/core/mixer/frame_mixer_device.cpp @@ -95,9 +95,7 @@ struct frame_mixer_device::implementation : boost::noncopyable audio_mixer audio_mixer_; image_mixer image_mixer_; - - int frame_number_; - + typedef std::unordered_map> image_transforms; typedef std::unordered_map> audio_transforms; @@ -111,7 +109,6 @@ public: : channel_(video_channel) , diag_(diagnostics::create_graph(narrow(print()))) , image_mixer_(channel_) - , frame_number_(0) { diag_->add_guide("frame-time", 0.5f); diag_->set_color("frame-time", diagnostics::color(1.0f, 0.0f, 0.0f)); @@ -132,7 +129,7 @@ public: diag_->update_value("tick-time", tick_timer_.elapsed()*channel_.format_desc.fps*0.5); tick_timer_.restart(); - return make_safe(std::move(image), std::move(audio), frame_number_++); + return make_safe(std::move(image), std::move(audio)); } safe_ptr create_frame(void* tag, const core::pixel_format_desc& desc) diff --git a/core/mixer/read_frame.cpp b/core/mixer/read_frame.cpp index e4dc63f5d..ba93b77bb 100644 --- a/core/mixer/read_frame.cpp +++ b/core/mixer/read_frame.cpp @@ -29,13 +29,11 @@ struct read_frame::implementation : boost::noncopyable { safe_ptr image_data_; std::vector audio_data_; - int number_; public: - implementation(safe_ptr&& image_data, std::vector&& audio_data, int number) + implementation(safe_ptr&& image_data, std::vector&& audio_data) : image_data_(std::move(image_data)) - , audio_data_(std::move(audio_data)) - , number_(number){} + , audio_data_(std::move(audio_data)){} const boost::iterator_range image_data() { @@ -48,11 +46,10 @@ public: } }; -read_frame::read_frame(safe_ptr&& image_data, std::vector&& audio_data, int number) - : impl_(new implementation(std::move(image_data), std::move(audio_data), number)){} +read_frame::read_frame(safe_ptr&& image_data, std::vector&& audio_data) + : impl_(new implementation(std::move(image_data), std::move(audio_data))){} const boost::iterator_range read_frame::image_data() const{return impl_->image_data();} const boost::iterator_range read_frame::audio_data() const{return impl_->audio_data();} -int read_frame::number() const{return impl_->number_;} }} \ No newline at end of file diff --git a/core/mixer/read_frame.h b/core/mixer/read_frame.h index f8393e8c2..f8231bc06 100644 --- a/core/mixer/read_frame.h +++ b/core/mixer/read_frame.h @@ -37,13 +37,11 @@ class read_frame : boost::noncopyable { read_frame(){} public: - read_frame(safe_ptr&& image_data, std::vector&& audio_data, int frame_number); + read_frame(safe_ptr&& image_data, std::vector&& audio_data); virtual const boost::iterator_range image_data() const; virtual const boost::iterator_range audio_data() const; - virtual int number() const; - static safe_ptr empty() { struct empty : public read_frame diff --git a/core/video_channel_context.h b/core/video_channel_context.h index 6cfaaeb06..9b8bf24dc 100644 --- a/core/video_channel_context.h +++ b/core/video_channel_context.h @@ -22,6 +22,7 @@ struct video_channel_context , ogl(ogl) { execution.set_priority_class(above_normal_priority_class); + destruction.set_priority_class(below_normal_priority_class); } const int index; diff --git a/shell/server.cpp b/shell/server.cpp index 37f1ff3a5..19ba252fd 100644 --- a/shell/server.cpp +++ b/shell/server.cpp @@ -92,7 +92,7 @@ struct server::implementation : boost::noncopyable using boost::property_tree::ptree; BOOST_FOREACH(auto& xml_channel, pt.get_child("configuration.channels")) { - auto format_desc = video_format_desc::get(widen(xml_channel.second.get("videomode", "PAL"))); + auto format_desc = video_format_desc::get(widen(xml_channel.second.get("video-mode", "PAL"))); if(format_desc.format == video_format::invalid) BOOST_THROW_EXCEPTION(caspar_exception() << msg_info("Invalid video-mode."));