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
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
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
\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
: 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
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
{\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
}\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
{\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
, 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
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