#include "StdAfx.h"\r
\r
-#include "server.h"\r
+#include "configuration.h"\r
#include "channel.h"\r
\r
#include "consumer/oal/oal_consumer.h"\r
\r
namespace caspar { namespace core {\r
\r
-struct server::implementation : boost::noncopyable\r
+struct configuration::implementation : boost::noncopyable\r
{\r
implementation() \r
{ \r
\r
~implementation()\r
{ \r
- async_servers_.clear();\r
+ async_configurations_.clear();\r
channels_.clear();\r
}\r
\r
{ \r
unsigned int port = xml_controller.second.get<unsigned int>("port");\r
port = port != 0 ? port : 5250;\r
- auto asyncserver = make_safe<IO::AsyncEventServer>(create_protocol(protocol), port);\r
- asyncserver->Start();\r
- async_servers_.push_back(asyncserver);\r
+ auto asyncconfiguration = make_safe<IO::AsyncEventServer>(create_protocol(protocol), port);\r
+ asyncconfiguration->Start();\r
+ async_configurations_.push_back(asyncconfiguration);\r
}\r
else\r
BOOST_THROW_EXCEPTION(invalid_configuration() << arg_name_info(name) << msg_info("Invalid controller"));\r
BOOST_THROW_EXCEPTION(invalid_configuration() << arg_name_info("name") << arg_value_info(name) << msg_info("Invalid protocol"));\r
}\r
\r
- std::vector<safe_ptr<IO::AsyncEventServer>> async_servers_;\r
+ std::vector<safe_ptr<IO::AsyncEventServer>> async_configurations_;\r
\r
std::vector<safe_ptr<channel>> channels_;\r
\r
static std::wstring data_folder_;\r
};\r
\r
-std::wstring server::implementation::media_folder_ = L"";\r
-std::wstring server::implementation::log_folder_ = L"";\r
-std::wstring server::implementation::template_folder_ = L"";\r
-std::wstring server::implementation::data_folder_ = L"";\r
+std::wstring configuration::implementation::media_folder_ = L"";\r
+std::wstring configuration::implementation::log_folder_ = L"";\r
+std::wstring configuration::implementation::template_folder_ = L"";\r
+std::wstring configuration::implementation::data_folder_ = L"";\r
\r
-server::server() : impl_(new implementation()){}\r
+configuration::configuration() : impl_(new implementation()){}\r
\r
-const std::wstring& server::media_folder()\r
+const std::wstring& configuration::media_folder()\r
{\r
- server::implementation::setup_paths();\r
- return server::implementation::media_folder_;\r
+ configuration::implementation::setup_paths();\r
+ return configuration::implementation::media_folder_;\r
}\r
\r
-const std::wstring& server::log_folder()\r
+const std::wstring& configuration::log_folder()\r
{\r
- server::implementation::setup_paths();\r
- return server::implementation::log_folder_;\r
+ configuration::implementation::setup_paths();\r
+ return configuration::implementation::log_folder_;\r
}\r
\r
-const std::wstring& server::template_folder()\r
+const std::wstring& configuration::template_folder()\r
{\r
- server::implementation::setup_paths();\r
- return server::implementation::template_folder_;\r
+ configuration::implementation::setup_paths();\r
+ return configuration::implementation::template_folder_;\r
}\r
\r
-const std::wstring& server::data_folder()\r
+const std::wstring& configuration::data_folder()\r
{\r
- server::implementation::setup_paths();\r
- return server::implementation::data_folder_;\r
+ configuration::implementation::setup_paths();\r
+ return configuration::implementation::data_folder_;\r
}\r
\r
-const std::vector<safe_ptr<channel>> server::get_channels() const\r
+const std::vector<safe_ptr<channel>> configuration::get_channels() const\r
{\r
return impl_->channels_;\r
}\r
\r
struct invalid_configuration : virtual boost::exception, virtual std::exception {};\r
\r
-class server : boost::noncopyable\r
+class configuration : boost::noncopyable\r
{\r
public:\r
- server();\r
+ configuration();\r
\r
static const std::wstring& media_folder();\r
static const std::wstring& log_folder();\r
#include <BlueVelvet4.h>\r
#include "../../format/video_format.h"\r
\r
-#include <memory>\r
-\r
namespace caspar { namespace core { namespace bluefish {\r
\r
inline bool is_epoch_card(int card_type)\r
//case video_format::ntsc: return VID_FMT_NTSC;\r
//case video_format::x576p2500: return VID_FMT_INVALID; //not supported\r
case video_format::x720p2500: return VID_FMT_720P_2500;\r
- //case video_format::x720p5000: return VID_FMT_720P_5000;\r
+ case video_format::x720p5000: return VID_FMT_720P_5000;\r
//case video_format::x720p5994: return VID_FMT_720P_5994;\r
//case video_format::x720p6000: return VID_FMT_720P_6000;\r
//case video_format::x1080p2397: return VID_FMT_1080P_2397;\r
\r
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */\r
\r
-/* link this file in with the server and any clients */\r
+/* link this file in with the configuration and any clients */\r
\r
\r
/* File created by MIDL compiler version 7.00.0500 */\r
//case video_format::ntsc: return bmdModeNTSC;\r
//case video_format::x576p2500: return ULONG_MAX;\r
case video_format::x720p2500: return ULONG_MAX;\r
- //case video_format::x720p5000: return bmdModeHD720p50;\r
+ case video_format::x720p5000: return bmdModeHD720p50;\r
//case video_format::x720p5994: return bmdModeHD720p5994;\r
//case video_format::x720p6000: return bmdModeHD720p60;\r
//case video_format::x1080p2397: return bmdModeHD1080p2398;\r
try\r
{\r
size_t offset = max_depth_ - consumer->buffer_depth();\r
- if(offset >= buffer_.size())\r
- return;\r
-\r
- if(consumer->synchronize() == frame_consumer::clock)\r
+ if(offset < buffer_.size() && consumer->synchronize() == frame_consumer::clock)\r
sync = frame_consumer::clock;\r
}\r
catch(...)\r
implementation() : container_(5)\r
{\r
sf::SoundStream::Initialize(2, 48000);\r
- }\r
-\r
- ~implementation()\r
- {\r
- Stop();\r
+ Play(); \r
}\r
\r
void send(const safe_ptr<const read_frame>& frame)\r
{ \r
- input_.push(std::vector<short>(frame->audio_data().begin(), frame->audio_data().end())); \r
+ if(frame->audio_data().empty())\r
+ return;\r
\r
- if(GetStatus() != Playing && input_.size() > 2) \r
- Play(); \r
+ input_.push(std::vector<short>(frame->audio_data().begin(), frame->audio_data().end())); \r
}\r
\r
frame_consumer::sync_mode synchronize()\r
}\r
\r
bool OnGetData(sf::SoundStream::Chunk& data)\r
- {\r
- static std::vector<short> silence(1920*2, 0);\r
- \r
+ { \r
std::vector<short> audio_data; \r
input_.pop(audio_data);\r
- \r
- if(audio_data.empty())\r
- { \r
- data.Samples = silence.data();\r
- data.NbSamples = silence.size();\r
- }\r
- else\r
- {\r
- container_.push_back(std::move(audio_data));\r
- data.Samples = container_.back().data();\r
- data.NbSamples = container_.back().size();\r
- }\r
+ \r
+ container_.push_back(std::move(audio_data));\r
+ data.Samples = container_.back().data();\r
+ data.NbSamples = container_.back().size(); \r
\r
return true;\r
}\r
<ClInclude Include="protocol\clk\CLKCommand.h" />\r
<ClInclude Include="protocol\clk\CLKProtocolStrategy.h" />\r
<ClInclude Include="protocol\media.h" />\r
- <ClInclude Include="server.h" />\r
+ <ClInclude Include="configuration.h" />\r
<CustomBuildStep Include="consumers\bluefish\BluefishException.h" />\r
<CustomBuildStep Include="consumers\bluefish\BluefishFrameManager.h" />\r
<CustomBuildStep Include="consumers\bluefish\BluefishPlaybackStrategy.h" />\r
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
</ClCompile>\r
- <ClCompile Include="server.cpp" />\r
+ <ClCompile Include="configuration.cpp" />\r
<ClCompile Include="StdAfx.cpp">\r
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>\r
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>\r
<ClInclude Include="producer\layer.h">\r
<Filter>Source\channel</Filter>\r
</ClInclude>\r
- <ClInclude Include="server.h">\r
- <Filter>Source</Filter>\r
- </ClInclude>\r
<ClInclude Include="processor\write_frame.h">\r
<Filter>Source\channel\processor\frame</Filter>\r
</ClInclude>\r
<ClInclude Include="producer\flash\TimerHelper.h">\r
<Filter>Source\channel\producer\flash\interop</Filter>\r
</ClInclude>\r
+ <ClInclude Include="configuration.h">\r
+ <Filter>Source</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<ClCompile Include="protocol\amcp\AMCPCommandQueue.cpp">\r
<ClCompile Include="consumer\frame_consumer_device.cpp">\r
<Filter>Source\channel\consumer</Filter>\r
</ClCompile>\r
- <ClCompile Include="server.cpp">\r
- <Filter>Source</Filter>\r
- </ClCompile>\r
<ClCompile Include="processor\frame_processor_device.cpp">\r
<Filter>Source\channel\processor</Filter>\r
</ClCompile>\r
<ClCompile Include="producer\flash\Flash9e_i.c">\r
<Filter>Source\channel\producer\flash\interop</Filter>\r
</ClCompile>\r
+ <ClCompile Include="configuration.cpp">\r
+ <Filter>Source</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<Midl Include="consumer\decklink\DeckLinkAPI_v7_3.idl">\r
//DEFINE_VIDEOFORMATDESC(720, 486, video_mode::lower, 60/1.001, TEXT("NTSC"), video_format::ntsc ), \r
//DEFINE_VIDEOFORMATDESC(720, 576, video_mode::progressive, 25, TEXT("576p2500"), video_format::x576p2500 ),\r
DEFINE_VIDEOFORMATDESC(1280, 720, video_mode::progressive, 25, TEXT("720p2500"), video_format::x720p2500 ), \r
- //DEFINE_VIDEOFORMATDESC(1280, 720, video_mode::progressive, 50, TEXT("720p5000"), video_format::x720p5000 ), \r
+ DEFINE_VIDEOFORMATDESC(1280, 720, video_mode::progressive, 50, TEXT("720p5000"), video_format::x720p5000 ), \r
//DEFINE_VIDEOFORMATDESC(1280, 720, video_mode::progressive, 60/1.001, TEXT("720p5994"), video_format::x720p5994 ),\r
//DEFINE_VIDEOFORMATDESC(1280, 720, video_mode::progressive, 60, TEXT("720p6000"), video_format::x720p6000 ),\r
//DEFINE_VIDEOFORMATDESC(1920, 1080, video_mode::progressive, 24/1.001, TEXT("1080p2397"), video_format::x1080p2397),\r
//ntsc,\r
//x576p2500,\r
x720p2500,\r
- //x720p5000,\r
+ x720p5000,\r
//x720p5994,\r
//x720p6000,\r
//x1080p2397,\r
\r
struct audio_decoder::implementation : boost::noncopyable\r
{\r
- static const int FRAME_AUDIO_SAMPLES = 1920*2;\r
- static const int SAMPLE_RATE = 48000;\r
+ static const size_t SAMPLE_RATE = 48000;\r
+ static const size_t N_CHANNELS = 2;\r
\r
- implementation(AVCodecContext* codec_context) : current_chunk_(), codec_context_(codec_context), audio_buffer_(4*SAMPLE_RATE*2+FF_INPUT_BUFFER_PADDING_SIZE/2){}\r
+ implementation(AVCodecContext* codec_context, double fps) : current_chunk_(), codec_context_(codec_context), audio_buffer_(4*SAMPLE_RATE*2+FF_INPUT_BUFFER_PADDING_SIZE/2)\r
+ {\r
+ if(codec_context_->sample_rate != SAMPLE_RATE)\r
+ BOOST_THROW_EXCEPTION(file_read_error() << msg_info("Invalid sample rate. Expected 48000."));\r
+\r
+ if(codec_context_->channels != 2)\r
+ BOOST_THROW_EXCEPTION(file_read_error() << msg_info("Invalid channel count. Expected 2."));\r
+ audio_frame_size_ = static_cast<size_t>(static_cast<double>(SAMPLE_RATE) / fps) * N_CHANNELS;\r
+ }\r
\r
std::vector<std::vector<short>> execute(const aligned_buffer& audio_packet)\r
{ \r
- static const std::vector<std::vector<short>> silence(1920*2, 0);\r
- \r
int written_bytes = audio_buffer_.size()*2 - FF_INPUT_BUFFER_PADDING_SIZE;\r
const int result = avcodec_decode_audio2(codec_context_, audio_buffer_.data(), &written_bytes, audio_packet.data(), audio_packet.size());\r
\r
- if(result <= 0 || codec_context_->sample_rate != SAMPLE_RATE)\r
- return silence;\r
+ if(result <= 0)\r
+ return std::vector<std::vector<short>>();\r
\r
current_chunk_.insert(current_chunk_.end(), audio_buffer_.data(), audio_buffer_.data() + written_bytes/2);\r
\r
std::vector<std::vector<short>> chunks_;\r
\r
- const auto last = current_chunk_.end() - current_chunk_.size() % FRAME_AUDIO_SAMPLES;\r
+ const auto last = current_chunk_.end() - current_chunk_.size() % audio_frame_size_;\r
\r
- for(auto it = current_chunk_.begin(); it != last; it += FRAME_AUDIO_SAMPLES) \r
- chunks_.push_back(std::vector<short>(it, it + FRAME_AUDIO_SAMPLES)); \r
+ for(auto it = current_chunk_.begin(); it != last; it += audio_frame_size_) \r
+ chunks_.push_back(std::vector<short>(it, it + audio_frame_size_)); \r
\r
current_chunk_.erase(current_chunk_.begin(), last);\r
\r
return chunks_;\r
}\r
\r
+ size_t audio_frame_size_;\r
+\r
typedef std::vector<short, tbb::cache_aligned_allocator<short>> buffer;\r
\r
buffer audio_buffer_; \r
AVCodecContext* codec_context_;\r
};\r
\r
-audio_decoder::audio_decoder(AVCodecContext* codec_context) : impl_(new implementation(codec_context)){}\r
+audio_decoder::audio_decoder(AVCodecContext* codec_context, double fps) : impl_(new implementation(codec_context, fps)){}\r
std::vector<std::vector<short>> audio_decoder::execute(const aligned_buffer& audio_packet){return impl_->execute(audio_packet);}\r
}}}
\ No newline at end of file
class audio_decoder : boost::noncopyable\r
{\r
public:\r
- audio_decoder(AVCodecContext* codec_context);\r
+ audio_decoder(AVCodecContext* codec_context, double fps);\r
std::vector<std::vector<short>> execute(const aligned_buffer& audio_packet);\r
private:\r
struct implementation;\r
{\r
public:\r
ffmpeg_producer(const std::wstring& filename, const std::vector<std::wstring>& params) : filename_(filename), last_frame_(draw_frame(draw_frame::empty())),\r
- input_(filename), video_decoder_(input_.get_video_codec_context().get()), audio_decoder_(input_.get_audio_codec_context().get())\r
+ input_(filename), video_decoder_(input_.get_video_codec_context().get()), audio_decoder_(input_.get_audio_codec_context().get(), input_.fps())\r
{ \r
input_.set_loop(std::find(params.begin(), params.end(), L"LOOP") != params.end());\r
\r
return true;\r
}\r
\r
+ double fps() const\r
+ {\r
+ return static_cast<double>(video_codec_context_->time_base.den) / static_cast<double>(video_codec_context_->time_base.num);\r
+ }\r
+\r
std::wstring print() const\r
{\r
return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"] Buffer thread";\r
aligned_buffer input::get_video_packet(){return impl_->get_video_packet();}\r
aligned_buffer input::get_audio_packet(){return impl_->get_audio_packet();}\r
bool input::seek(unsigned long long frame){return impl_->seek(frame);}\r
+double input::fps() const { return impl_->fps(); }\r
}}}
\ No newline at end of file
\r
bool is_eof() const;\r
void set_loop(bool value);\r
+\r
+ double fps() const;\r
private:\r
struct implementation;\r
std::shared_ptr<implementation> impl_;\r
});\r
});\r
\r
- // TODO: Make generic for all formats and modes.\r
- if(codec_context_->codec_id == CODEC_ID_DVVIDEO) // Move up one field \r
+ if(frame_processor_->get_video_format_desc().mode == video_mode::upper && codec_context_->codec_id == CODEC_ID_DVVIDEO) // Move up one field \r
write->translate(0.0f, 1.0/static_cast<double>(height_));\r
\r
return write;\r
\r
sws_scale(sws_context_.get(), decoded_frame->data, decoded_frame->linesize, 0, height_, av_frame.data, av_frame.linesize); \r
\r
- // TODO: Make generic for all formats and modes.\r
- if(codec_context_->codec_id == CODEC_ID_DVVIDEO) // Move up one field \r
+ if(frame_processor_->get_video_format_desc().mode == video_mode::upper && codec_context_->codec_id == CODEC_ID_DVVIDEO) // Move up one field \r
write->translate(0.0f, 1.0/static_cast<double>(height_));\r
\r
return write;\r
\r
void initialize(const safe_ptr<frame_processor_device>& frame_processor)\r
{\r
- frame_processor_ = frame_processor;\r
+ frame_processor_ = frame_processor; \r
+ double frame_rate = static_cast<double>(codec_context_->time_base.den) / static_cast<double>(codec_context_->time_base.num);\r
+ if(abs(frame_rate - frame_processor->get_video_format_desc().actual_fps) > std::numeric_limits<double>::min())\r
+ BOOST_THROW_EXCEPTION(file_read_error() << msg_info("Invalid video framerate."));\r
}\r
\r
std::shared_ptr<frame_processor_device> frame_processor_;\r
\r
#include "flash_producer.h"\r
\r
-#include "../../Server.h"\r
+#include "../../configuration.h"\r
\r
#include <boost/filesystem.hpp>\r
#include <boost/format.hpp>\r
struct cg_producer::implementation : boost::noncopyable\r
{\r
public:\r
- implementation() : flash_producer_(flash_producer(server::template_folder()+TEXT("cg.fth.18"))){}\r
+ implementation() : flash_producer_(flash_producer(configuration::template_folder()+TEXT("cg.fth.18"))){}\r
\r
void clear()\r
{\r
- flash_producer_ = flash_producer(server::template_folder()+TEXT("cg.fth.18"));\r
+ flash_producer_ = flash_producer(configuration::template_folder()+TEXT("cg.fth.18"));\r
}\r
\r
void add(int layer, const std::wstring& filename, bool play_on_load, const std::wstring& label, const std::wstring& data)\r
//#include "../../processor/draw_frame.h"\r
//#include "../../format/video_format.h"\r
//#include "../../processor/frame_processor_device.h"\r
-//#include "../../server.h"\r
+//#include "../../configuration.h"\r
//\r
//#include <tbb/parallel_for.h>\r
//#include <tbb/parallel_invoke.h>\r
//safe_ptr<frame_producer> create_image_scroll_producer(const std::vector<std::wstring>& params)\r
//{\r
// static const std::vector<std::wstring> extensions = list_of(L"spng")(L"stga")(L"sbmp")(L"sjpg")(L"sjpeg");\r
-// std::wstring filename = server::media_folder() + L"\\" + params[0];\r
+// std::wstring filename = configuration::media_folder() + L"\\" + params[0];\r
// \r
// auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool\r
// { \r
#include <boost/lexical_cast.hpp>\r
#include "../../producer/flash/cg_producer.h"\r
#include "../media.h"\r
-#include "../../Server.h"\r
+#include "../../configuration.h"\r
\r
#include <algorithm>\r
#include <locale>\r
403 [kommando] ERROR Ogiltig parameter \r
404 [kommando] ERROR Mediafilen hittades inte \r
\r
-500 FAILED Internt serverfel \r
-501 [kommando] FAILED Internt serverfel \r
+500 FAILED Internt configurationfel \r
+501 [kommando] FAILED Internt configurationfel \r
502 [kommando] FAILED Oläslig mediafil \r
\r
600 [kommando] FAILED funktion ej implementerad\r
std::wstring ListMedia()\r
{ \r
std::wstringstream replyString;\r
- for (boost::filesystem::wrecursive_directory_iterator itr(server::media_folder()), end; itr != end; ++itr)\r
+ for (boost::filesystem::wrecursive_directory_iterator itr(configuration::media_folder()), end; itr != end; ++itr)\r
{ \r
if(boost::filesystem::is_regular_file(itr->path()))\r
{\r
{ \r
auto is_not_digit = [](char c){ return std::isdigit(c) == 0; };\r
\r
- auto relativePath = boost::filesystem::wpath(itr->path().file_string().substr(server::media_folder().size()-1, itr->path().file_string().size()));\r
+ auto relativePath = boost::filesystem::wpath(itr->path().file_string().substr(configuration::media_folder().size()-1, itr->path().file_string().size()));\r
\r
auto writeTimeStr = boost::posix_time::to_iso_string(boost::posix_time::from_time_t(boost::filesystem::last_write_time(itr->path())));\r
writeTimeStr.erase(std::remove_if(writeTimeStr.begin(), writeTimeStr.end(), is_not_digit), writeTimeStr.end());\r
{\r
std::wstringstream replyString;\r
\r
- for (boost::filesystem::wrecursive_directory_iterator itr(server::template_folder()), end; itr != end; ++itr)\r
+ for (boost::filesystem::wrecursive_directory_iterator itr(configuration::template_folder()), end; itr != end; ++itr)\r
{ \r
if(boost::filesystem::is_regular_file(itr->path()) && itr->path().extension() == L".ft")\r
{\r
- auto relativePath = boost::filesystem::wpath(itr->path().file_string().substr(server::template_folder().size()-1, itr->path().file_string().size()));\r
+ auto relativePath = boost::filesystem::wpath(itr->path().file_string().substr(configuration::template_folder().size()-1, itr->path().file_string().size()));\r
\r
auto writeTimeStr = boost::posix_time::to_iso_string(boost::posix_time::from_time_t(boost::filesystem::last_write_time(itr->path())));\r
writeTimeStr.erase(std::remove_if(writeTimeStr.begin(), writeTimeStr.end(), [](char c){ return std::isdigit(c) == 0;}), writeTimeStr.end());\r
//Perform loading of the clip\r
try\r
{\r
- _parameters[0] = server::media_folder() + L"\\" + _parameters[0];\r
+ _parameters[0] = configuration::media_folder() + L"\\" + _parameters[0];\r
auto pFP = load_media(_parameters); \r
GetChannel()->preview(GetLayerIndex(), pFP);\r
\r
//Perform loading of the clip\r
try\r
{\r
- _parameters[0] = server::media_folder() + L"\\" + _parameters[0];\r
+ _parameters[0] = configuration::media_folder() + L"\\" + _parameters[0];\r
auto pFP = load_media(_parameters);\r
if(pFP == frame_producer::empty())\r
BOOST_THROW_EXCEPTION(file_not_found() << msg_info(_parameters.size() > 0 ? narrow(_parameters[0]) : ""));\r
else \r
{\r
//The data is not an XML-string, it must be a filename\r
- std::wstring filename = server::data_folder();\r
+ std::wstring filename = configuration::data_folder();\r
filename.append(dataString);\r
filename.append(TEXT(".ftd"));\r
\r
}\r
}\r
\r
- std::wstring fullFilename = flash::flash_producer::find_template(server::template_folder() + _parameters[2]);\r
+ std::wstring fullFilename = flash::flash_producer::find_template(configuration::template_folder() + _parameters[2]);\r
if(!fullFilename.empty())\r
{\r
std::wstring extension = boost::filesystem::wpath(fullFilename).extension();\r
return false;\r
}\r
\r
- std::wstring filename = server::data_folder();\r
+ std::wstring filename = configuration::data_folder();\r
filename.append(_parameters[1]);\r
filename.append(TEXT(".ftd"));\r
\r
return false;\r
}\r
\r
- std::wstring filename = server::data_folder();\r
+ std::wstring filename = configuration::data_folder();\r
filename.append(_parameters[1]);\r
filename.append(TEXT(".ftd"));\r
\r
{\r
std::wstringstream replyString;\r
\r
- std::wstring filename = server::media_folder()+_parameters[0];\r
+ std::wstring filename = configuration::media_folder()+_parameters[0];\r
\r
// TODO:\r
\r
#include "CIICommandsimpl.h"\r
#include "../../producer/flash/flash_producer.h"\r
#include "../../producer/transition/transition_producer.h"\r
-#include "../../Server.h"\r
+#include "../../configuration.h"\r
#include "../../producer/frame_producer.h"\r
\r
#if defined(_MSC_VER)\r
\r
void CIIProtocolStrategy::WriteTemplateData(const std::wstring& templateName, const std::wstring& titleName, const std::wstring& xmlData) \r
{\r
- std::wstring fullTemplateFilename = server::template_folder();\r
+ std::wstring fullTemplateFilename = configuration::template_folder();\r
if(currentProfile_.size() > 0)\r
{\r
fullTemplateFilename += currentProfile_;\r
return;\r
}\r
\r
- auto producer = flash::flash_producer(server::template_folder()+TEXT("CG.fth"));\r
+ auto producer = flash::flash_producer(configuration::template_folder()+TEXT("CG.fth"));\r
\r
std::wstringstream flashParam;\r
flashParam << TEXT("<invoke name=\"Add\" returntype=\"xml\"><arguments><number>1</number><string>") << currentProfile_ << '/' << templateName << TEXT("</string><number>0</number><true/><string> </string><string><![CDATA[ ") << xmlData << TEXT(" ]]></string></arguments></invoke>");\r
#include <conio.h>\r
\r
#include <core/config.h>\r
-#include <core/server.h>\r
+#include <core/configuration.h>\r
#include <core/protocol/amcp/AMCPProtocolStrategy.h>\r
#include <common/exception/win32_exception.h>\r
#include <common/exception/exceptions.h>\r
MessageBox(nullptr, TEXT("Now is the time to connect for remote debugging..."), TEXT("Debug"), MB_OK | MB_TOPMOST);\r
#endif\r
\r
- log::add_file_sink(server::log_folder());\r
+ log::add_file_sink(configuration::log_folder());\r
\r
CASPAR_LOG(debug) << "Started Main Thread";\r
\r
\r
try \r
{\r
- server caspar_device;\r
+ configuration caspar_device;\r
\r
auto dummy = std::make_shared<IO::DummyClientInfo>();\r
amcp::AMCPProtocolStrategy amcp(caspar_device.get_channels());\r