/*\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: Nicklas P Andersson\r
*/\r
+\r
\r
#include "../StdAfx.h"\r
\r
#include "CIICommandsImpl.h"\r
#include <sstream>\r
#include <algorithm>\r
-#include <core/producer/flash/cg_producer.h>\r
+#include <modules/flash/producer/cg_producer.h>\r
\r
namespace caspar { namespace protocol { namespace cii {\r
\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
//TODO: Need to be checked for validity\r
else if(state_ == 1)\r
- core::flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->add(layer_, filename_, false, TEXT(""), xmlData_);\r
+ flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->add(layer_, filename_, false, TEXT(""), xmlData_);\r
}\r
\r
\r
\r
//TODO: Need to be checked for validity\r
else if(state_ == 1)\r
- core::flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->stop(layer_, 0);\r
+ flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->stop(layer_, 0);\r
else if(state_ == 2)\r
- core::flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->clear();\r
+ pCIIStrategy_->GetChannel()->stage()->clear(flash::cg_producer::DEFAULT_LAYER);\r
else if(state_ == 3)\r
- core::flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->play(layer_);\r
+ flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->play(layer_);\r
}\r
\r
void KeydataCommand::Setup(const std::vector<std::wstring>& parameters) {\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