当前位置: 首页>>代码示例>>C++>>正文


C++ safe_ptr::nb_frames方法代码示例

本文整理汇总了C++中safe_ptr::nb_frames方法的典型用法代码示例。如果您正苦于以下问题:C++ safe_ptr::nb_frames方法的具体用法?C++ safe_ptr::nb_frames怎么用?C++ safe_ptr::nb_frames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在safe_ptr的用法示例。


在下文中一共展示了safe_ptr::nb_frames方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: info

	boost::property_tree::wptree info() const
	{
		boost::property_tree::wptree info;
		info.add(L"status",		is_paused_ ? L"paused" : (foreground_ == frame_producer::empty() ? L"stopped" : L"playing"));
		info.add(L"auto_delta",	auto_play_delta_);
		info.add(L"frame-number", frame_number_);

		auto nb_frames = foreground_->nb_frames();

		info.add(L"nb_frames",	 nb_frames == std::numeric_limits<int64_t>::max() ? -1 : nb_frames);
		info.add(L"frames-left", nb_frames == std::numeric_limits<int64_t>::max() ? -1 : (foreground_->nb_frames() - frame_number_ - auto_play_delta_));
		info.add_child(L"foreground.producer", foreground_->info());
		info.add_child(L"background.producer", background_->info());
		return info;
	}
开发者ID:Mistobaan,项目名称:CasparCG,代码行数:15,代码来源:layer.cpp

示例2: disable_audio

	safe_ptr<basic_frame> receive(int hints)
	{		
		try
		{
			if(is_paused_)
				return disable_audio(foreground_->last_frame());
		
			auto frame = receive_and_follow(foreground_, hints);
			if(frame == core::basic_frame::late())
				return foreground_->last_frame();

			auto frames_left = static_cast<int64_t>(foreground_->nb_frames()) - static_cast<int64_t>(++frame_number_) - static_cast<int64_t>(auto_play_delta_);
			if(auto_play_delta_ > -1 && frames_left < 1)
			{
				play();
				return receive(hints);
			}
				
			return frame;
		}
		catch(...)
		{
			CASPAR_LOG_CURRENT_EXCEPTION();
			stop();
			return core::basic_frame::empty();
		}
	}
开发者ID:Mistobaan,项目名称:CasparCG,代码行数:27,代码来源:layer.cpp

示例3: disable_audio

	safe_ptr<basic_frame> receive()
	{		
		try
		{
			if(is_paused_)
				return disable_audio(foreground_->last_frame());
		
			auto frame = receive_and_follow(foreground_, frame_producer::NO_HINT);
			if(frame == core::basic_frame::late())
				return foreground_->last_frame();

			auto frames_left = foreground_->nb_frames() - (++frame_number_) - auto_play_delta_;
			if(auto_play_delta_ > -1 && frames_left < 1)
			{
				play();
				return receive();
			}
				
			return frame;
		}
		catch(...)
		{
			CASPAR_LOG_CURRENT_EXCEPTION();
			stop();
			return core::basic_frame::empty();
		}
	}
开发者ID:,项目名称:,代码行数:27,代码来源:

示例4: status

	layer_status status() const
	{
		layer_status status;
		status.foreground	 = foreground_->print();
		status.background	 = background_->print();
		status.is_paused	 = is_paused_;
		status.total_frames	 = foreground_->nb_frames();
		status.current_frame = frame_number_;

		return status;
	}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例5: disable_audio

	safe_ptr<basic_frame> receive(int hints)
	{		
		try
		{
			monitor_subject_ << monitor::message("/paused") % is_paused_;

			if(is_paused_)
			{
				if(foreground_->last_frame() == basic_frame::empty())
					foreground_->receive(frame_producer::NO_HINT);

				return disable_audio(foreground_->last_frame());
			}

			auto foreground = foreground_;

			auto frame = receive_and_follow(foreground, hints);

			if(foreground != foreground_)
				set_foreground(foreground);

			if(frame == core::basic_frame::late())
				return foreground_->last_frame();

			auto frames_left = static_cast<int64_t>(foreground_->nb_frames()) - static_cast<int64_t>(++frame_number_) - static_cast<int64_t>(auto_play_delta_);
			if(auto_play_delta_ > -1 && frames_left < 1)
			{
				play();
				return receive(hints);
			}
				
			return frame;
		}
		catch(...)
		{
			CASPAR_LOG_CURRENT_EXCEPTION();
			stop();
			return core::basic_frame::empty();
		}
	}
开发者ID:AronVietti,项目名称:Server,代码行数:40,代码来源:layer.cpp

示例6: min

	virtual uint32_t nb_frames() const override
	{
		return std::min(fill_producer_->nb_frames(), key_producer_->nb_frames());
	}
开发者ID:TELE-TWIN,项目名称:Server,代码行数:4,代码来源:separated_producer.cpp

示例7:

	last_frame_producer(const safe_ptr<frame_producer>& producer) 
		: print_(producer->print())
		, frame_(producer->last_frame() != basic_frame::eof() ? producer->last_frame() : basic_frame::empty())
		, nb_frames_(producer->nb_frames())
	{
	}
开发者ID:cambell-prince,项目名称:Server,代码行数:6,代码来源:frame_producer.cpp


注:本文中的safe_ptr::nb_frames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。