200 [command] OK [command] has been executed, plus multiple lines of data. ends with an empty line
400 ERROR the command could not be understood
401 [command] ERROR invalid/missing channel
402 [command] ERROR parameter missing
200 [command] OK [command] has been executed, plus multiple lines of data. ends with an empty line
400 ERROR the command could not be understood
401 [command] ERROR invalid/missing channel
402 [command] ERROR parameter missing
std::wstringstream replyString;
for (boost::filesystem::recursive_directory_iterator itr(env::media_folder()), end; itr != end; ++itr)
replyString << MediaInfo(itr->path(), media_info_repo);
std::wstringstream replyString;
for (boost::filesystem::recursive_directory_iterator itr(env::media_folder()), end; itr != end; ++itr)
replyString << MediaInfo(itr->path(), media_info_repo);
std::wstringstream replyString;
for (boost::filesystem::recursive_directory_iterator itr(env::template_folder()), end; itr != end; ++itr)
std::wstringstream replyString;
for (boost::filesystem::recursive_directory_iterator itr(env::template_folder()), end; itr != end; ++itr)
if(boost::filesystem::is_regular_file(itr->path()) && cg_registry->is_cg_extension(itr->path().extension().wstring()))
{
auto relativePath = get_relative_without_extension(itr->path(), env::template_folder());
if(boost::filesystem::is_regular_file(itr->path()) && cg_registry->is_cg_extension(itr->path().extension().wstring()))
{
auto relativePath = get_relative_without_extension(itr->path(), env::template_folder());
auto dir = relativePath.parent_path();
auto file = boost::to_upper_copy(relativePath.filename().wstring());
relativePath = dir / file;
auto dir = relativePath.parent_path();
auto file = boost::to_upper_copy(relativePath.filename().wstring());
relativePath = dir / file;
auto str = relativePath.generic_wstring();
boost::trim_if(str, boost::is_any_of("\\/"));
auto str = relativePath.generic_wstring();
boost::trim_if(str, boost::is_any_of("\\/"));
core::frame_producer_dependencies get_producer_dependencies(const std::shared_ptr<core::video_channel>& channel, const command_context& ctx)
{
return core::frame_producer_dependencies(
channel->frame_factory(),
core::frame_producer_dependencies get_producer_dependencies(const std::shared_ptr<core::video_channel>& channel, const command_context& ctx)
{
return core::frame_producer_dependencies(
channel->frame_factory(),
void add_describer(core::help_sink& sink, const core::help_repository& repo)
{
sink.short_description(L"Add a consumer to a video channel.");
void add_describer(core::help_sink& sink, const core::help_repository& repo)
{
sink.short_description(L"Add a consumer to a video channel.");
sink.para()
->text(L"Adds a consumer to the specified video channel. The string ")
->code(L"consumer")->text(L" will be parsed by the available consumer factories. ")
sink.para()
->text(L"Adds a consumer to the specified video channel. The string ")
->code(L"consumer")->text(L" will be parsed by the available consumer factories. ")
->code(L"video_channel")->text(L". Different consumers require different parameters, ")
->text(L"some examples are below. Consumers can alternatively be specified by adding them to ")
->see(L"the CasparCG config file")->text(L".");
->code(L"video_channel")->text(L". Different consumers require different parameters, ")
->text(L"some examples are below. Consumers can alternatively be specified by adding them to ")
->see(L"the CasparCG config file")->text(L".");
sink.para()->text(L"Examples:");
sink.example(L">> ADD 1 DECKLINK 1");
sink.example(L">> ADD 1 BLUEFISH 2");
sink.example(L">> ADD 1 SCREEN");
sink.example(L">> ADD 1 AUDIO");
sink.example(L">> ADD 1 IMAGE filename");
sink.para()->text(L"Examples:");
sink.example(L">> ADD 1 DECKLINK 1");
sink.example(L">> ADD 1 BLUEFISH 2");
sink.example(L">> ADD 1 SCREEN");
sink.example(L">> ADD 1 AUDIO");
sink.example(L">> ADD 1 IMAGE filename");
sink.example(L">> ADD 1 FILE filename.mov");
sink.example(L">> ADD 1 FILE filename.mov SEPARATE_KEY");
sink.example(L">> ADD 1 FILE filename.mov");
sink.example(L">> ADD 1 FILE filename.mov SEPARATE_KEY");
sink.para()->text(L"The streaming consumer is an implementation of the ffmpeg_consumer and supports many of the same arguments:");
sink.example(L">> ADD 1 STREAM udp://localhost:5004 -vcodec libx264 -tune zerolatency -preset ultrafast -crf 25 -format mpegts -vf scale=240:180");
}
sink.para()->text(L"The streaming consumer is an implementation of the ffmpeg_consumer and supports many of the same arguments:");
sink.example(L">> ADD 1 STREAM udp://localhost:5004 -vcodec libx264 -tune zerolatency -preset ultrafast -crf 25 -format mpegts -vf scale=240:180");
}
core::diagnostics::scoped_call_context save;
core::diagnostics::call_context::for_thread().video_channel = ctx.channel_index + 1;
core::diagnostics::scoped_call_context save;
core::diagnostics::call_context::for_thread().video_channel = ctx.channel_index + 1;
ctx.channel.channel->output().add(ctx.layer_index(consumer->index()), consumer);
return L"202 ADD OK\r\n";
ctx.channel.channel->output().add(ctx.layer_index(consumer->index()), consumer);
return L"202 ADD OK\r\n";
std::wstring remove_command(command_context& ctx)
{
auto index = ctx.layer_index(std::numeric_limits<int>::min());
std::wstring remove_command(command_context& ctx)
{
auto index = ctx.layer_index(std::numeric_limits<int>::min());
void data_retrieve_describer(core::help_sink& sink, const core::help_repository& repo)
{
sink.short_description(L"Retrieve a dataset.");
void data_retrieve_describer(core::help_sink& sink, const core::help_repository& repo)
{
sink.short_description(L"Retrieve a dataset.");
sink.para()->text(L"Returns the data saved under the name ")->code(L"name")->text(L".");
sink.para()->text(L"Examples:");
sink.example(L">> DATA RETRIEVE my_data");
sink.para()->text(L"Returns the data saved under the name ")->code(L"name")->text(L".");
sink.para()->text(L"Examples:");
sink.example(L">> DATA RETRIEVE my_data");