X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fflash%2Fproducer%2Fcg_producer.cpp;h=85cd830f23e3c3db93287232c7863267e748325d;hb=f9c8da6344aad1f2623f64b122f650e997763262;hp=c920db2e92f173782f186d952ff0247cda073221;hpb=623472e30864f882aa703c04ca916148d33a77cd;p=casparcg diff --git a/modules/flash/producer/cg_producer.cpp b/modules/flash/producer/cg_producer.cpp index c920db2e9..85cd830f2 100644 --- a/modules/flash/producer/cg_producer.cpp +++ b/modules/flash/producer/cg_producer.cpp @@ -1,22 +1,24 @@ /* -* copyright (c) 2010 Sveriges Television AB +* Copyright 2013 Sveriges Television AB http://casparcg.com/ * -* This file is part of CasparCG. +* This file is part of CasparCG (www.casparcg.com). * -* CasparCG is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. * -* CasparCG is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. - -* You should have received a copy of the GNU General Public License -* along with CasparCG. If not, see . +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . * +* Author: Robert Nagy, ronag89@gmail.com */ + #include "../StdAfx.h" #include "cg_producer.h" @@ -25,6 +27,7 @@ #include +#include #include #include @@ -48,6 +51,9 @@ public: if(filename.size() > 0 && filename[0] == L'/') filename = filename.substr(1, filename.size()-1); + if(boost::filesystem::wpath(filename).extension() == L"") + filename += L".ft"; + auto str = (boost::wformat(L"%1%%2%%3%%4%") % layer % filename % (play_on_load?TEXT(""):TEXT("")) % label % data).str(); CASPAR_LOG(info) << flash_producer_->print() << " Invoking add-command: " << str; @@ -112,32 +118,39 @@ public: boost::unique_future call(const std::wstring& str) { - static const boost::wregex add_exp (L"ADD (?\\d+) (?[^\\s]+) (?\\d)( (?.*))?"); - static const boost::wregex remove_exp (L"REMOVE (?\\d+)"); - static const boost::wregex play_exp (L"PLAY (?\\d+)"); - static const boost::wregex stop_exp (L"STOP (?\\d+)"); - static const boost::wregex next_exp (L"NEXT (?\\d+)"); - static const boost::wregex update_exp (L"UPDATE (?\\d+) (?.+)"); - static const boost::wregex invoke_exp (L"INVOKE (?\\d+) (?