本文整理汇总了C++中safe_ptr::set_color方法的典型用法代码示例。如果您正苦于以下问题:C++ safe_ptr::set_color方法的具体用法?C++ safe_ptr::set_color怎么用?C++ safe_ptr::set_color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类safe_ptr
的用法示例。
在下文中一共展示了safe_ptr::set_color方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
newtek_ivga_consumer(core::channel_layout channel_layout)
: executor_(print())
, channel_layout_(channel_layout)
{
if (!airsend::is_available())
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(airsend::dll_name()) + " not available"));
connected_ = false;
graph_->set_text(print());
graph_->set_color("frame-time", diagnostics::color(0.5f, 1.0f, 0.2f));
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f));
diagnostics::register_graph(graph_);
}
示例2:
oal_consumer()
: container_(16)
, channel_index_(-1)
, started_(false)
, channel_layout_(
core::default_channel_layout_repository().get_by_name(
L"STEREO"))
{
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f));
graph_->set_color("dropped-frame", diagnostics::color(0.3f, 0.6f, 0.3f));
diagnostics::register_graph(graph_);
is_running_ = true;
presentation_age_ = 0;
input_.set_capacity(2);
}
示例3:
decklink_producer(const core::video_format_desc& format_desc, size_t device_index, const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& filter)
: decklink_(get_device(device_index))
, input_(decklink_)
, attributes_(decklink_)
, model_name_(get_model_name(decklink_))
, device_index_(device_index)
, filter_(filter)
, format_desc_(format_desc)
, audio_cadence_(format_desc.audio_cadence)
, muxer_(format_desc.fps, frame_factory, filter)
, sync_buffer_(format_desc.audio_cadence.size())
, frame_factory_(frame_factory)
{
hints_ = 0;
frame_buffer_.set_capacity(2);
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f));
graph_->set_color("late-frame", diagnostics::color(0.6f, 0.3f, 0.3f));
graph_->set_color("frame-time", diagnostics::color(1.0f, 0.0f, 0.0f));
graph_->set_color("dropped-frame", diagnostics::color(0.3f, 0.6f, 0.3f));
graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f));
graph_->set_text(print());
diagnostics::register_graph(graph_);
auto display_mode = get_display_mode(input_, format_desc_.format, bmdFormat8BitYUV, bmdVideoInputFlagDefault);
// NOTE: bmdFormat8BitARGB is currently not supported by any decklink card. (2011-05-08)
if(FAILED(input_->EnableVideoInput(display_mode, bmdFormat8BitYUV, bmdVideoInputFlagDefault)))
BOOST_THROW_EXCEPTION(caspar_exception()
<< msg_info(narrow(print()) + " Could not enable video input.")
<< boost::errinfo_api_function("EnableVideoInput"));
if(FAILED(input_->EnableAudioInput(bmdAudioSampleRate48kHz, bmdAudioSampleType32bitInteger, format_desc_.audio_channels)))
BOOST_THROW_EXCEPTION(caspar_exception()
<< msg_info(narrow(print()) + " Could not enable audio input.")
<< boost::errinfo_api_function("EnableAudioInput"));
if (FAILED(input_->SetCallback(this)) != S_OK)
BOOST_THROW_EXCEPTION(caspar_exception()
<< msg_info(narrow(print()) + " Failed to set input callback.")
<< boost::errinfo_api_function("SetCallback"));
if(FAILED(input_->StartStreams()))
BOOST_THROW_EXCEPTION(caspar_exception()
<< msg_info(narrow(print()) + " Failed to start input stream.")
<< boost::errinfo_api_function("StartStreams"));
}