SDKERR_WRONG_USAGE (2) when attempting to call IMeetingRecordingController.StartRecording

Starting the process of implementing Recording of session, and have the methods all implemented for Start, StartCloud, Stop, Pause and Resume - but the call to StartRecording returns an SDK error for Wrong usage (2) - can’t find any reference to that in the SDK documents and not sure what the issue is:

Here is the C++ code being used:
bool CMeetingManager::StartScreenRecording( wchar_t* recPath)
{
if (m_pMeetingService != nullptr)
{
IMeetingRecordingController* p_controller = m_pMeetingService->GetMeetingRecordingController();
if (p_controller != nullptr)
{
time_t timeStamp = time(nullptr);
SDKError error = p_controller->StartRecording(timeStamp, recPath);
if (error != SDKError::SDKERR_SUCCESS)
{
LOG_ERROR << "Start Recording failed, Error: " << toString(error) << std::endl;
return false;
}
return true;
}
}
}

You can see where I am getting the timeStamp to pass in here, the path is being passed down from the client layer and is in the format “C:\Users\brian.roach\OneDrive\Documents”

Not sure if that is a invalid file path or if there is an issue with the timestamp or both? I was “assuming” that maybe the incorrect usage (2) meant the second parameter was bad, but not sure.

Which Windows Video SDK version?
5.5.12511.0422

To Reproduce(If applicable)
For me it’s simple, just call that method.

Screenshots

Device (please complete the following information):

  • Device: Dell XPS 9500
  • OS: Windows 10

Additional context

As an additional note, I get the exact same error when attempting to start Cloud Recording, and that takes no parameters.

Hi @brian.roach, thanks for using our SDK.

Please note that I have moved this thread over to the #desktop-client-sdk:windows category.

The most common cause of this error is when you call a method at the wrong time. Can you please provide the steps taken in the meeting prior to calling this?

Thanks!

Hey @jon.zoom - yep that was correct. We figured that bit out, and we were “recording” at the time, so it failed. Got stuck in a state where zoom thought we were still recording

So the next issue is we are using a custom UI, and now when we call RequestCustomizedLocalRecordingSource prior to recording we get that same usage error.

So to be clear, we can record, but what we end up recording is nothing…so trying to see if the issue is that we haven’t called that method to get the callback and setup things.

I’m sure we are just missing a step, but not sure where that step is.

Hi @brian.roach,

Got it, thanks for clarifying. Another approach that can help with checking whether or not you can start a recording is by checking the CanStartRecording function.

So the next issue is we are using a custom UI, and now when we call RequestCustomizedLocalRecordingSource prior to recording we get that same usage error.

It sounds like you are calling this before setting the IMeetingRecordingCtrlEvent, right? If I’m understanding that correctly, can you try calling SetEvent first?

Thanks!

Hi @jon.zoom
We figured out the issues we were having with this circumstance - going to start a new topic as we have a new question relating to the processing dialog that pops up once you stop recording. Appreciate the feedback.

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