- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
使用IntelCS webrtc V4.1
分别实现接口:ics::base::AudioFrameGeneratorInterface和ics::base::VideoFrameGeneratorInterface,
音频pcm,44100,2通道,
视频h264, 1280x720,30fps
在调试过程中发现,新建LocalStream实例,尚未publish流的时候,SDK就已经调用VideoFrameGeneratorInterface的uint32_t GenerateNextFrame(uint8_t* buffer,
const uint32_t capacity);
不论是否在该函数返回h264数据都会崩溃在SDK里
AudioFrameGeneratorInterface实现
VideoFrameGeneratorInterface实现:
请问未publish的时候就调用VideoFrameGeneratorInterface的GenerateNextFrame是否合理?另外是否有ics 的pdb文件可供调试?
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VideoFrameGeneratorInterface接口在设计时是考虑到用户可能在本地去渲染不publish,和Camera流一样,所以是不需要publish就会调用GenerateNextFrame. 目前该接口的视频格式为VideoFrameGeneratorInterface::I420. 4.2的版本我们已经开源了,你可以通过https://github.com/open-media-streamer/oms-client-native 看到我们的源码.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
谢谢。
查看了源码,格式是I420,接口返回的大小也必须完全匹配,已解决问题
不过使用了VideoFrameGeneratorInterface接口,AudioFrameGeneratorInterface的GenerateFramesForNext10Ms并不被调用
ics::base::GlobalConfiguration::SetCustomizedAudioInputEnabled(true, std::unique_ptr<ics::base::AudioFrameGeneratorInterface>(new IcsLocalAudioFrameGenerator()));
已设置
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
在文档里找到了答案:
https://software.intel.com/sites/products/documentation/webrtc/android/index.html#section1
11 Customize audio input
Instead of getting audio data from device microphone, our Android client SDK allows customizing audio input which enables media stream to get audio data from the source that application customizes. To set a customized audio input, please follow these steps:
Implement com.intel.webrtc.base.IcsAudioRecord.AudioFrameGeneratorInterface;
Call WebRtcUtils.setCustomizedAudioInput(AudioFrameGeneratorInterface) before instantiating PeerClient or ConferenceClient;
Note: * Other names and brands may be claimed as the property of others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你好,我也在用VideoFrameGeneratorInterface这个接口实现自定义流,能指点一下这个类里的方法GenerateNextFrame 在子类里该怎么实现吗?我看你的截图中传了一个回调函数,这个回调函数干什么用的?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page