Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

VideoEncoderInterface相关问题

jiang__meng
Beginner
158 Views

1,VideoEncoderInterface类中的EncodeOneFrame这个方法会被自动调用吗?

2,我采用4.2的sdk开发,自定义编码器,程序会直接崩溃掉。代码如下:

void OWTController::publish(function<void(int ret)> callback)
{
	//自定义采集
	if (!local_stream.get()) {
		Resolution resolution;
		resolution.width = 1920;
		resolution.height = 1080;
		int fps = 30;

		lcsp.reset(new LocalCustomizedStreamParameters(false, true));
		lcsp->Resolution(resolution.width, resolution.height);
		lcsp->Fps(fps);
		lcsp->Bitrate(4000);
		
		encoder.reset(new H264VideoEncoder(1920,1080));
		encoder->InitEncoderContext(resolution, fps, lcsp->Bitrate(), VideoCodec::kH264);
		local_stream = LocalStream::Create(lcsp,encoder.get());
	}

	pc->Publish(remote_peer_id,
		local_stream,
		[=](std::shared_ptr<P2PPublication> publication) {
			this->publication = publication;
			callback(1);
		},
		[=](std::unique_ptr<Exception> ex) {
			callback(0);
			printf("connect server failed! %s :", ex->Message().c_str());
		});
}

在执行publish方法推流后就会弹 Debug Error 的弹框。实在查不出问题在哪。

版主能帮忙指点下吗?

0 Kudos
0 Replies
Reply