o Copy casparcg_auto_restart.bat into Windows releases.\r
o Fixed bug with thumbnail generation when there are .-files in the media\r
folder.\r
+ o Removed CMake platform specification in Linux build script\r
+ (Krzysztof Pyrkosz).\r
+ o Build script for building FFmpeg for Linux now part of the repository.\r
+ Contributions during development (not w.r.t 2.1.0 Beta 1):\r
+ + Fix ffmpeg build dependencies on clean ubuntu desktop amd64 14.04.3 or\r
+ higher (Walter Sonius).\r
+ o Added support for video modes 2160p5000, 2160p5994 and 2160p6000\r
+ (Antonio Ruano Cuesta).\r
\r
Consumers\r
---------\r
+ Fixed bug where decoders sometimes requires more than one video packet to\r
decode the first frame.\r
+ Added support for IN and OUT parameters (Dimitry Ishenko).\r
+ + Added DV/HDV video device support under Linux (Walter Sonius).\r
o Framerate producer:\r
+ Fixed bug when INFO was used on a not yet playing framerate producer.\r
o HTML producer:\r
+ Fixed bug where only URL:s with . in them where recognized.\r
o Image producer:\r
+ Added LENGTH parameter to allow for queueing with LOADBG AUTO.\r
+ o Layer producer:\r
+ + Fixed serious bug where a circular reference of layer producers caused a\r
+ stack overflow and server crash.\r
+ o Scene producer:\r
+ + Added abs() function to expression language.\r
\r
Mixer\r
-----\r
# Run cmake
echo Running cmake...
-cmake -G "Unix Makefiles" -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo .. || fail "cmake failed"
+cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo .. || fail "cmake failed"
# Run make using the number of hardware threads in BUILD_PARALLEL_THREADS
echo Building...
boost::log::core::get()->add_sink(stream_sink);
}
+std::string current_exception_diagnostic_information()
+{
+ auto e = boost::current_exception_cast<const char*>();
+
+ if (e)
+ return std::string("[char *] = ") + *e + "\n";
+ else
+ return boost::current_exception_diagnostic_information();
+}
+
}
void add_file_sink(const std::wstring& file, const boost::log::filter& filter)
namespace internal{
void init();
std::wstring get_call_stack();
+std::string current_exception_diagnostic_information();
}
const char* remove_source_prefix(const char* file);
catch(...){}
#define CASPAR_LOG_CURRENT_EXCEPTION() try{\
- CASPAR_LOG(error) << caspar::u16(boost::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
+ CASPAR_LOG(error) << caspar::u16(::caspar::log::internal::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
}\
catch(...){}
#define CASPAR_LOG_CURRENT_EXCEPTION_AT_LEVEL(lvl) try{\
- CASPAR_LOG(lvl) << caspar::u16(boost::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
+ CASPAR_LOG(lvl) << caspar::u16(::caspar::log::internal::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
}\
catch(...){}
{
RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
}
- __except (EXCEPTION_CONTINUE_EXECUTION){}
+ __except (EXCEPTION_CONTINUE_EXECUTION){}
}
} // namespace detail
static boost::thread_specific_ptr<bool> installed;
auto for_thread = installed.get();
-
+
if (!for_thread)
{
for_thread = new bool(false);
{
case EXCEPTION_ACCESS_VIOLATION:
CASPAR_THROW_EXCEPTION(win32_access_violation() << generate_message(*(pInfo->ExceptionRecord)));
+ case EXCEPTION_STACK_OVERFLOW:
+ throw "Stack overflow. Not generating stack trace to protect from further overflowing the stack";
default:
CASPAR_THROW_EXCEPTION(win32_exception() << generate_message(*(pInfo->ExceptionRecord)));
}
return angle.transformed([](double a) { return std::cos(a); });
}
+boost::any create_abs_function(const std::vector<boost::any>& params, const variable_repository& var_repo)
+{
+ if (params.size() != 1)
+ CASPAR_THROW_EXCEPTION(user_error()
+ << msg_info(L"abs() function requires one parameters: value"));
+
+ auto val = require<double>(params.at(0));
+
+ return val.transformed([](double v) { return std::abs(v); });
+}
+
boost::any parse_function(
const std::wstring& function_name,
std::wstring::const_iterator& cursor,
{
{L"animate", create_animate_function },
{L"sin", create_sin_function },
- {L"cos", create_cos_function }
+ {L"cos", create_cos_function },
+ {L"abs", create_abs_function }
};
auto function = FUNCTIONS.find(function_name);
auto cond = require<bool>(condition);
auto t = as_binding(true_value);
auto f = as_binding(false_value);
-
+
// double
if (is<binding<double>>(t) && is<binding<double>>(f))
return ternary(cond, as<binding<double>>(t), as<binding<double>>(f));
#include <boost/algorithm/string.hpp>
namespace caspar { namespace core {
-
+
const std::vector<video_format_desc> format_descs = {
{ video_format::pal, 720, 576, 1024, 576, field_mode::upper, 25000, 1000, L"PAL", { 1920 } },
{ video_format::ntsc, 720, 486, 720, 540, field_mode::lower, 30000, 1001, L"NTSC", { 1602, 1601, 1602, 1601, 1602 } },
{ video_format::x2160p2500, 3840, 2160, 3840, 2160, field_mode::progressive, 25000, 1000, L"2160p2500", { 1920 } },
{ video_format::x2160p2997, 3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1001, L"2160p2997", { 1602, 1601, 1602, 1601, 1602 } },
{ video_format::x2160p3000, 3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1000, L"2160p3000", { 1600 } },
+ { video_format::x2160p5000, 3840, 2160, 3840, 2160, field_mode::progressive, 50000, 1000, L"2160p5000", { 960 } },
+ { video_format::x2160p5994, 3840, 2160, 3840, 2160, field_mode::progressive, 60000, 1001, L"2160p5994", { 801, 800, 801, 801, 801 } },
+ { video_format::x2160p6000, 3840, 2160, 3840, 2160, field_mode::progressive, 60000, 1000, L"2160p6000", { 800 } },
{ video_format::dci2160p2398, 4096, 2160, 4096, 2160, field_mode::progressive, 24000, 1001, L"dci2160p2398", { 2002 } },
{ video_format::dci2160p2400, 4096, 2160, 4096, 2160, field_mode::progressive, 24000, 1000, L"dci2160p2400", { 2000 } },
{ video_format::dci2160p2500, 4096, 2160, 4096, 2160, field_mode::progressive, 25000, 1000, L"dci2160p2500", { 1920 } },
video_format_desc::video_format_desc(const std::wstring& name)
: format(video_format::invalid)
, field_mode(core::field_mode::empty)
-{
+{
*this = video_format_desc(video_format::invalid);
for(auto it = std::begin(format_descs); it != std::end(format_descs)-1; ++it)
{
}
bool operator==(const video_format_desc& lhs, const video_format_desc& rhs)
-{
+{
return lhs.format == rhs.format;
}
}}
-
x2160p2500,
x2160p2997,
x2160p3000,
+ x2160p5000,
+ x2160p5994,
+ x2160p6000,
dci2160p2398,
dci2160p2400,
dci2160p2500,
#!/bin/bash
+#compile ffmpeg successful on ubuntu 14.04.3 & 16.04.1 amd64 using the CasparCG build requirments described here:
+#https://raw.githubusercontent.com/casparcg/Server/2.1.0/BUILDING
-sudo apt-get install build-essential curl tar pkg-config
+sudo apt-get -y install curl tar pkg-config python2.7-dev zlib1g-dev autoconf libtool subversion libfontconfig1-dev ant default-jre default-jdk frei0r-plugins-dev libv4l-dev libiec61883-dev libavc1394-dev
./build.sh
echo "#### FFmpeg static build, by STVS SA ####"
cd $BUILD_DIR
../fetchurl "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz"
-../fetchurl "http://zlib.net/zlib-1.2.8.tar.gz"
+../fetchurl "http://www.zlib.net/fossils/zlib-1.2.8.tar.gz"
../fetchurl "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
#../fetchurl "http://downloads.sf.net/project/libpng/libpng15/older-releases/1.5.14/libpng-1.5.14.tar.gz"
../fetchurl "http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz"
--enable-libfreetype \
--enable-libgme \
--enable-libgsm \
+ --enable-libiec61883 \
--enable-libilbc \
--enable-libmodplug \
--enable-libmp3lame \
--enable-libv4l2 \
--enable-zlib
make -j $jval && make install
+
case core::video_format::x2160p2500: return bmdMode4K2160p25;
case core::video_format::x2160p2997: return bmdMode4K2160p2997;
case core::video_format::x2160p3000: return bmdMode4K2160p30;
+ case core::video_format::x2160p5000: return bmdMode4K2160p50;
+ case core::video_format::x2160p5994: return bmdMode4K2160p5994;
+ case core::video_format::x2160p6000: return bmdMode4K2160p60;
case core::video_format::dci2160p2398: return bmdMode4kDCI2398;
case core::video_format::dci2160p2400: return bmdMode4kDCI24;
case core::video_format::dci2160p2500: return bmdMode4kDCI25;
case bmdMode4K2160p25: return core::video_format::x2160p2500;
case bmdMode4K2160p2997: return core::video_format::x2160p2997;
case bmdMode4K2160p30: return core::video_format::x2160p3000;
+ case bmdMode4K2160p50: return core::video_format::x2160p5000;
+ case bmdMode4K2160p5994: return core::video_format::x2160p5994;
+ case bmdMode4K2160p60: return core::video_format::x2160p6000;
case bmdMode4kDCI2398: return core::video_format::dci2160p2398;
case bmdMode4kDCI24: return core::video_format::dci2160p2400;
case bmdMode4kDCI25: return core::video_format::dci2160p2500;
->text(L"H.264, FLV, WMV and several audio codecs as well as uncompressed audio.");
sink.definitions()
->item(L"clip", L"The file without the file extension to play. It should reside under the media folder.")
- ->item(L"url", L"If clip contains :// it is instead treated as the URL parameter. The URL can either be any streaming protocol supported by FFmpeg, dshow://video={webcam_name} or v4l2://{video device}.")
+ ->item(L"url", L"If clip contains :// it is instead treated as the URL parameter. The URL can either be any streaming protocol supported by FFmpeg, dshow://video={webcam_name} or v4l2://{video device} or iec61883://{auto}.")
->item(L"loop", L"Will cause the media file to loop between in and out.")
->item(L"in", L"Optionally sets the first frame. 0 by default. If loop is specified, this will be the frame where it starts over again.")
->item(L"out", L"Optionally sets the last frame. If not specified the clip will be played to the end. If loop is specified, the file will jump to start position once it reaches the last frame.")
sink.example(L">> PLAY 1-10 rtmp://example.com/live/stream", L"to play an RTMP stream.");
sink.example(L">> PLAY 1-10 \"dshow://video=Live! Cam Chat HD VF0790\"", L"to use a web camera as video input on Windows.");
sink.example(L">> PLAY 1-10 v4l2:///dev/video0", L"to use a web camera as video input on Linux.");
+ sink.example(L">> PLAY 1-10 iec61883://auto", L"to use a FireWire (H)DV video device as video input on Linux.");
sink.para()->text(L"The FFmpeg producer also supports changing some of the settings via ")->code(L"CALL")->text(L":");
sink.example(L">> CALL 1-10 LOOP 1");
sink.example(L">> CALL 1-10 IN 10");
auto path = parts.at(1);
AVInputFormat* input_format = nullptr;
- static const std::set<std::wstring> PROTOCOLS_TREATED_AS_FORMATS = { L"dshow", L"v4l2" };
+ static const std::set<std::wstring> PROTOCOLS_TREATED_AS_FORMATS = { L"dshow", L"v4l2", L"iec61883" };
if (protocol.empty())
resource_name = path;
namespace caspar { namespace reroute {
class layer_consumer : public core::write_frame_consumer
-{
+{
tbb::concurrent_bounded_queue<core::draw_frame> frame_buffer_;
semaphore frames_available_ { 0 };
int frames_delay_;
: layer_(layer)
, consumer_(spl::make_shared<layer_consumer>(frames_delay))
, channel_(channel)
- , last_frame_(core::draw_frame::empty())
+ , last_frame_(core::draw_frame::late())
, frame_number_(0)
{
pixel_constraints_.width.set(channel->video_format_desc().width);
}
// frame_producer
-
+
core::draw_frame receive_impl() override
{
auto consumer_frame = consumer_->receive();
frame_number_++;
return last_frame_ = consumer_frame;
- }
+ }
+
+ core::draw_frame last_frame() override
+ {
+ return last_frame_;
+ }
std::wstring print() const override
{
</thumbnails>\r
<channels>\r
<channel>\r
- <video-mode>PAL [PAL|NTSC|576p2500|720p2398|720p2400|720p2500|720p5000|720p2997|720p5994|720p3000|720p6000|1080p2398|1080p2400|1080i5000|1080i5994|1080i6000|1080p2500|1080p2997|1080p3000|1080p5000|1080p5994|1080p6000|1556p2398|1556p2400|1556p2500|dci1080p2398|dci1080p2400|dci1080p2500|2160p2398|2160p2400|2160p2500|2160p2997|2160p3000|dci2160p2398|dci2160p2400|dci2160p2500] </video-mode>\r
+ <video-mode>PAL [PAL|NTSC|576p2500|720p2398|720p2400|720p2500|720p5000|720p2997|720p5994|720p3000|720p6000|1080p2398|1080p2400|1080i5000|1080i5994|1080i6000|1080p2500|1080p2997|1080p3000|1080p5000|1080p5994|1080p6000|1556p2398|1556p2400|1556p2500|dci1080p2398|dci1080p2400|dci1080p2500|2160p2398|2160p2400|2160p2500|2160p2997|2160p3000|2160p5000|2160p5994|2160p6000|dci2160p2398|dci2160p2400|dci2160p2500] </video-mode>\r
<straight-alpha-output>false [true|false]</straight-alpha-output>\r
<channel-layout>stereo [mono|stereo|matrix|film|smpte|ebu_r123_8a|ebu_r123_8b|8ch|16ch]</channel-layout>\r
<consumers>\r