]> git.sesse.net Git - casparcg/blobdiff - core/producer/frame/basic_frame.cpp
2.0.2: Updated file info headers.
[casparcg] / core / producer / frame / basic_frame.cpp
index cd3c1212da03bb51ef106cfaaca572d143ca77c7..8a3b2327864d86288e55ca5e644d57220ca63f3f 100644 (file)
@@ -1,22 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\r
 *\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
 *\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
 *\r
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+\r
 #include "../../stdafx.h"\r
 \r
 #include "basic_frame.h"\r
@@ -57,15 +59,6 @@ public:
                        frame->accept(visitor);\r
                visitor.end();\r
        }       \r
-\r
-       std::wstring print() const\r
-       {\r
-               std::wstring str = L"\tbasic_frame[\n";\r
-               BOOST_FOREACH(auto& frame, frames_)\r
-                       str += frame->print() + L"\n";\r
-               str += L"\n]";\r
-               return str;\r
-       }\r
 };\r
        \r
 basic_frame::basic_frame() : impl_(new implementation(std::vector<safe_ptr<basic_frame>>())){}\r
@@ -91,8 +84,6 @@ void basic_frame::swap(basic_frame& other){impl_.swap(other.impl_);}
 \r
 const frame_transform& basic_frame::get_frame_transform() const { return impl_->frame_transform_;}\r
 frame_transform& basic_frame::get_frame_transform() { return impl_->frame_transform_;}\r
-\r
-std::wstring basic_frame::print() const{return impl_->print();}\r
 void basic_frame::accept(frame_visitor& visitor){impl_->accept(*this, visitor);}\r
 \r
 safe_ptr<basic_frame> basic_frame::interlace(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2, field_mode::type mode)\r
@@ -122,7 +113,7 @@ safe_ptr<basic_frame> basic_frame::interlace(const safe_ptr<basic_frame>& frame1
        std::vector<safe_ptr<basic_frame>> frames;\r
        frames.push_back(my_frame1);\r
        frames.push_back(my_frame2);\r
-       return basic_frame(std::move(frames));\r
+       return make_safe<basic_frame>(std::move(frames));\r
 }\r
 \r
 safe_ptr<basic_frame> basic_frame::combine(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2)\r
@@ -136,7 +127,7 @@ safe_ptr<basic_frame> basic_frame::combine(const safe_ptr<basic_frame>& frame1,
        std::vector<safe_ptr<basic_frame>> frames;\r
        frames.push_back(frame1);\r
        frames.push_back(frame2);\r
-       return basic_frame(std::move(frames));\r
+       return make_safe<basic_frame>(std::move(frames));\r
 }\r
 \r
 safe_ptr<basic_frame> basic_frame::fill_and_key(const safe_ptr<basic_frame>& fill, const safe_ptr<basic_frame>& key)\r
@@ -151,14 +142,14 @@ safe_ptr<basic_frame> basic_frame::fill_and_key(const safe_ptr<basic_frame>& fil
        key->get_frame_transform().is_key = true;\r
        frames.push_back(key);\r
        frames.push_back(fill);\r
-       return basic_frame(std::move(frames));\r
+       return make_safe<basic_frame>(std::move(frames));\r
 }\r
 \r
 safe_ptr<basic_frame> disable_audio(const safe_ptr<basic_frame>& frame)\r
 {\r
        basic_frame frame2 = frame;\r
        frame2.get_frame_transform().volume = 0.0;\r
-       return std::move(frame2);\r
+       return make_safe<basic_frame>(std::move(frame2));\r
 }\r
        \r
 }}
\ No newline at end of file