\r
void write(host_buffer& target)\r
{\r
+ attach(0);\r
GL(glBindTexture(GL_TEXTURE_2D, id_));\r
target.unmap();\r
target.bind();\r
local_key_ = false;\r
\r
std::swap(local_key_buffer_, layer_key_buffer_);\r
- layer_key_buffer_->bind(4);\r
}\r
\r
// Move waiting items to queue.\r
// Start transfer from device to host.\r
\r
read_buffer_ = ogl_device::create_host_buffer(format_desc_.size, host_buffer::read_only);\r
- draw_buffer_->attach();\r
draw_buffer_->write(*read_buffer_);\r
\r
std::swap(draw_buffer_, write_buffer_);\r
local_key_buffer_->bind(3);\r
draw_buffer_->attach(); \r
local_key_ = false;\r
- } \r
+ } \r
+\r
+ if(layer_key_)\r
+ layer_key_buffer_->bind(4);\r
} \r
\r
// Draw\r
\r
class read_frame : boost::noncopyable\r
{\r
+ read_frame(){}\r
public:\r
read_frame(safe_ptr<const host_buffer>&& image_data, std::vector<short>&& audio_data);\r
\r
static safe_ptr<const empty> frame;\r
return frame;\r
}\r
-\r
-protected:\r
- read_frame(){}\r
-\r
private:\r
struct implementation;\r
std::shared_ptr<implementation> impl_;\r
}\r
int write_frame::tag() const {return impl_->tag_;}\r
const core::pixel_format_desc& write_frame::get_pixel_format_desc() const{return impl_->desc_;}\r
-std::vector<safe_ptr<host_buffer>>& write_frame::get_plane_buffers(){return impl_->buffers_;}\r
+const std::vector<safe_ptr<host_buffer>>& write_frame::get_plane_buffers() const{return impl_->buffers_;}\r
}}
\ No newline at end of file
virtual int tag() const;\r
\r
private:\r
- const core::pixel_format_desc& get_pixel_format_desc() const;\r
- std::vector<safe_ptr<host_buffer>>& get_plane_buffers();\r
-\r
friend class image_mixer;\r
\r
+ const core::pixel_format_desc& get_pixel_format_desc() const;\r
+ const std::vector<safe_ptr<host_buffer>>& get_plane_buffers() const;\r
+\r
struct implementation;\r
std::shared_ptr<implementation> impl_;\r
};\r
: frames_(frames) {}\r
implementation(std::vector<safe_ptr<basic_frame>>&& frames) \r
: frames_(std::move(frames)){}\r
+ implementation(safe_ptr<basic_frame>&& frame) \r
+ { frames_.push_back(std::move(frame));}\r
+ implementation(const safe_ptr<basic_frame>& frame) \r
+ { frames_.push_back(frame);}\r
\r
void accept(const basic_frame& self, frame_visitor& visitor)\r
{\r
};\r
\r
basic_frame::basic_frame() : impl_(new implementation(std::vector<safe_ptr<basic_frame>>())){}\r
-basic_frame::basic_frame(std::vector<safe_ptr<basic_frame>>&& frames) : impl_(new implementation(std::move(frames))){}\r
basic_frame::basic_frame(const basic_frame& other) : impl_(new implementation(*other.impl_)){}\r
-basic_frame::basic_frame(const safe_ptr<basic_frame>& frame)\r
-{\r
- std::vector<safe_ptr<basic_frame>> frames;\r
- frames.push_back(frame);\r
- impl_.reset(new implementation(std::move(frames)));\r
-}\r
-basic_frame::basic_frame(safe_ptr<basic_frame>&& frame)\r
-{\r
- std::vector<safe_ptr<basic_frame>> frames;\r
- frames.push_back(std::move(frame));\r
- impl_.reset(new implementation(std::move(frames)));\r
-}\r
+basic_frame::basic_frame(std::vector<safe_ptr<basic_frame>>&& frames) : impl_(new implementation(frames)){}\r
+basic_frame::basic_frame(const safe_ptr<basic_frame>& frame) : impl_(new implementation(frame)){}\r
+basic_frame::basic_frame(safe_ptr<basic_frame>&& frame) : impl_(new implementation(std::move(frame))){}\r
void basic_frame::swap(basic_frame& other){impl_.swap(other.impl_);}\r
basic_frame& basic_frame::operator=(const basic_frame& other)\r
{\r
#pragma once\r
\r
#include "frame_visitor.h"\r
-#include "../../video_format.h"\r
+\r
+#include <core/video_format.h>\r
\r
#include <common/memory/safe_ptr.h>\r
\r
-#include <boost/noncopyable.hpp>\r
#include <boost/range/iterator_range.hpp>\r
\r
-#include <array>\r
-#include <memory>\r
-#include <vector>\r
-\r
namespace caspar { namespace core {\r
\r
class image_transform;\r
virtual void accept(frame_visitor& visitor);\r
private:\r
struct implementation;\r
- std::shared_ptr<implementation> impl_;\r
+ safe_ptr<implementation> impl_;\r
};\r
\r
inline bool is_concrete_frame(const safe_ptr<basic_frame>& frame)\r
{\r
filename_ = parameters[5];\r
filename_ = filename_.substr(0, filename_.find_last_of(TEXT('.')));\r
+ filename_.append(L".ft");\r
state_ = 0;\r
return;\r
}\r
\r
if(parameters[1].at(0) == 27) //NEPTUNE: Y\<27>\X Stop layer X.\r
state_ = 1;\r
- else if(static_cast<unsigned char>(parameters[1].at(0)) == 254) //NEPTUNE: Y\<254> Clear Canvas. \r
+ else if(static_cast<unsigned char>(parameters[1].at(1)) == 190) //NEPTUNE: Y\<254> Clear Canvas. \r
state_ = 2;\r
- else if(static_cast<unsigned char>(parameters[1].at(0)) == 213) //NEPTUNE: Y\<213><243>\X Play layer X. \r
- state_ = 3;\r
+ else if(static_cast<unsigned char>(parameters[1].at(1)) == 149) //NEPTUNE: Y\<213><243>\X Play layer X. \r
+ state_ = 3; //UPDATE 2011-05-09: These char-codes are aparently not valid after converting to wide-chars\r
+ //the correct sequence is <195><149><195><179> \r
+ \r
}\r
\r
}}}
\ No newline at end of file
{\r
if(!bClockLoaded_) \r
{\r
- get_default_cg_producer(pChannel_)->add(0, TEXT("hawrysklocka/clock"), true, TEXT(""), currentCommand_.GetData());\r
+ get_default_cg_producer(pChannel_)->add(0, TEXT("hawrysklocka/clock.ft"), true, TEXT(""), currentCommand_.GetData());\r
bClockLoaded_ = true;\r
}\r
else \r