# Problem in starting raw data

**URL:** <https://devforum.zoom.us/t/problem-in-starting-raw-data/70091>\
**Category:** Windows\
**Created:** [June 7, 2022, 3:14pm UTC](https://devforum.zoom.us/t/problem-in-starting-raw-data/70091 "2022-06-07T15:14:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cai.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cai.zoom/32/29704_2.png) [@cai.zoom](https://devforum.zoom.us/u/cai.zoom)\
**Post date:** [June 7, 2022, 3:14pm UTC](https://devforum.zoom.us/t/problem-in-starting-raw-data/70091/1 "2022-06-07T15:14:22Z")

</div>

**Description**  
I want to start raw data recording through windows SDK but I am getting SDKERR\_WRONG\_USAGE on calling recordingController-\>StartRawRecording(). please refer last 8-10 lines of code where I have called StartRawRecording, i pasted other code just to give a broader look at what I am trying to do.  
Here is the code:

```auto
void ZoomController::onMeetingJoined() {
	if (this->pending_request != RequestMessage::UNDEFINED) {
		this->handle_request(this->pending_request);
	}
	IMeetingUIController* uiController = meetingService->GetUIController();
	uiController->EnterFullScreen(true, false);
	this->check_bot_alone();
    Events::send_meeting_status_update(Events::MeetingStatus::IN_MEETING);
	if (!this->joined) {
		Timers::cancel_timer(TimerType::WaitForHostTimer);
		IMeetingAudioController* audController = meetingService->GetMeetingAudioController();
		throwIfNotSuccess(audController->SetEvent(this), __LINE__ );
		throwIfNotSuccess(audController->JoinVoip(), __LINE__ );
		this->message_listener = new NanoMessageListener();
		this->message_listener->start_poll_timer();
		auto participants_controller = this->meetingService->GetMeetingParticipantsController();
		auto participant_list = participants_controller->GetParticipantsList();
		vector<unsigned int> participant_user_ids;
		for (int i = 0; i < participant_list->GetCount(); i++) 
			participant_user_ids.push_back(participant_list->GetItem(i));
		this->sendAudioJoinedEvent(participant_user_ids);
		this->joined = true;
	}
	LOG_INFO(TAG) << "checking the bot";
	IMeetingAudioController* audController = meetingService->GetMeetingAudioController();
	auto bot_user = this->getUserByUserId(0);
	if (!audController->CanUnMuteBySelf()) {
		LOG_INFO(TAG) << "Bot not allowed to unmute itself";
	}
	else {
		//IMeetingRecordingController* recordingController = meetingService->GetMeetingRecordingController();
		//recordingController->SetEvent(this);
		//for (int i = 0; i < 10000000; i++);
		//LOG_INFO(TAG) << "starting cloud recording";
		////LOG_INFO(TAG) << "cloud recording allowed"<<recordingController->CanStartRecording(true, bot_user->GetUserID());
		////throwIfNotSuccess(recordingController->StartCloudRecording(), __LINE__ );
		//LOG_INFO(TAG) << "started cloud recording";
	}
	IMeetingRecordingController* recordingController = meetingService->GetMeetingRecordingController();
	LOG_INFO(TAG) << "recording allowed: "<< recordingController->IsSupportLocalRecording(bot_user->GetUserID());
	LOG_INFO(TAG) << "starting raw recording";
	//recordingController->SetEvent(this);
	SDKError er = recordingController->StartRawRecording();
	LOG_INFO(TAG) << "recording status: " << er;
	IZoomSDKRenderer* p = NULL;
	ZOOM_SDK_NAMESPACE::SDKError error = ZOOM_SDK_NAMESPACE::createRenderer(&p, this);
	LOG_INFO(TAG) << "recording render status: "<<error;
}

```

I followed this([Window Raw Data](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/raw-data)) to implement the raw recording feature. I am calling to start raw recording after the meeting joined call back.  
as per the first steps I have implemented IZoomSDKRendererDelegate and IZoomSDKAudioRawDataDelegate here in the below code. I inherited these classes and use the object of zoomController class everywhere.I have implemented onRawDataFrameReceived and onOneWayAudioRawDataReceived as methods without any body as of now.My current aim is that consent pop should open when raw recording is started.

```auto
class ZoomController :
	public IAuthServiceEvent,
	public IMeetingServiceEvent,
	public IMeetingAudioCtrlEvent,
	//public IMeetingParticipantsCtrlEvent,onRawDataFrameReceived
	public IMeetingConfigurationEvent,
	public IMeetingRecordingCtrlEvent,
	public IZoomSDKRendererDelegate,
	public IZoomSDKAudioRawDataDelegate {
private:
	IAuthService* authService;
	IMeetingService* meetingService;
	ISettingService* settingService;
	std::string sdkKey, sdkSecret;
	std::string callAiMeetingId;
	std::string streamingServerUrl, speakerDeviceId, captureDeviceId;
	bool joined = false;

```

**Which Windows Meeting SDK version?**  
Windows SDK version: v5.9.1.2601

**Screenshots**

 ![Screenshot 2022-06-07 at 8.38.59 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/3/339250436932abd2dd6aaa0a137bc2eb27b8485b.png)  
ss of debugging statements

**Device (please complete the following information):**

- Device: [e.g. Dell XPS 13]
- OS: WIndows server 2016

**Additional context**  
I also have a follow up questions:  
Is there any other way of opening a consent pop up when the bot joins through windows sdk, i can use participant joined callback to do so but i am not sure how to implement pop up.

---

<div class="post-metadata">

**Author:** ![cai.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cai.zoom/32/29704_2.png) [@cai.zoom](https://devforum.zoom.us/u/cai.zoom)\
**Post date:** [June 8, 2022, 2:40pm UTC](https://devforum.zoom.us/t/problem-in-starting-raw-data/70091/2 "2022-06-08T14:40:45Z")

</div>

Follow up question:  
StartRawRecording works fine with scheduled meeting but gives error for live meeting(if any other user is present in the meeting before start raw recording is tiggered.)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 9, 2022, 12:41am UTC](https://devforum.zoom.us/t/problem-in-starting-raw-data/70091/3 "2022-07-09T00:41:14Z")

</div>

Closed on July 9, 2022, 12:41am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
