windows平台自采集摄像头数据相关问题

	if (!m_lpRtcEngine)
		return FALSE;
	agora::util::AutoPtr<agora::media::IMediaEngine> mediaEngine;
	mediaEngine.queryInterface(m_lpRtcEngine, agora::AGORA_IID_MEDIA_ENGINE);
	if (mediaEngine.get() == NULL)
		return FALSE;

	agora::media::ExternalVideoFrame vf;
	vf.format = agora::media::ExternalVideoFrame::VIDEO_PIXEL_I420;
	vf.type = agora::media::ExternalVideoFrame::VIDEO_BUFFER_TYPE::VIDEO_BUFFER_RAW_DATA;
	vf.height = height;
	vf.rotation = 0;
	vf.stride = stride;
	vf.buffer = data;
	vf.timestamp = timestamp;

	int retCode = mediaEngine->pushVideoFrame(&vf);
	return TRUE;

调用这处代码,retCode 返回的错误码是-7,想知道这个是为什么?

在这个之前调用了下面的代码,加入通道成功回调也走了,没有报错。

BOOL CAgoraHelper::initAgoraEngine(){
	if (m_lpRtcEngine == nullptr){
		m_lpRtcEngine = createAgoraRtcEngine();
	}
	agora::rtc::RtcEngineContext ctx;
	ctx.eventHandler = &m_eventHandle;
	ctx.appId = APP_ID;
	int retCode = m_lpRtcEngine->initialize(ctx);

	return retCode==0?TRUE:FALSE;
}

BOOL CAgoraHelper::prepareToPushStream(const char* rtmpUrl){
	m_lpRtcEngine->setChannelProfile(agora::rtc::CHANNEL_PROFILE_LIVE_BROADCASTING);
	m_lpRtcEngine->setClientRole(agora::rtc::CLIENT_ROLE_BROADCASTER);
	m_lpRtcEngine->addPublishStreamUrl(rtmpUrl, false);
	m_lpRtcEngine->enableVideo();

	agora::rtc::RtcEngineParameters rep(m_lpRtcEngine);


	agora::util::AutoPtr<agora::media::IMediaEngine> mediaEngine;
	//mediaEngine.queryInterface(m_lpAgoraEngine, agora::AGORA_IID_MEDIA_ENGINE);
	mediaEngine.queryInterface(m_lpRtcEngine, agora::AGORA_IID_MEDIA_ENGINE);
	if (mediaEngine.get() == NULL)
		return FALSE;
	//mediaEngine->registerVideoFrameObserver(lpAudioFrameObserver);
	mediaEngine->setExternalVideoSource(true, false);
	//mediaEngine->pushVideoFrame()

	LPCSTR lpStreamInfo = "{\"owner\":true,\"width\":960,\"height\":540,\"bitrate\":500}";
	m_lpRtcEngine->joinChannel(NULL, "7878", lpStreamInfo, 5554);

	return TRUE;
}

返回有还其他错误信息吗?看这个报错是SDK 尚未初始化,就调用其 API。 有log吗,提供下

其他的接口返回的都是正确的,都是0

PC端SDK你们有写日志在哪里了?

请参考 排查问题之「获取日志篇」