- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 的弹框。实在查不出问题在哪。
版主能帮忙指点下吗?
- Tags:
- HTML5
- JavaScript*
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page