Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable / disable recording while conference is in progress #2137

Merged
merged 6 commits into from
May 15, 2020

Conversation

wheresjames
Copy link
Contributor

This PR adds a command to the video room plugin to enable / disable recording while a conference is in progress. The command is formatted as follows.

{
"request" : "enable_recording",
"room" : < unique numeric ID of the room >,
"secret" : "< room secret; mandatory if configured >"
"record" : < true|false, whether this publisher should be recorded or not; optional >,
"filename" : "< if recording, the base path/file to use for the recording files; optional >",
}

"request" : "enable_recording",
"room" : <unique numeric ID of the room>,
"secret" : "<room secret; mandatory if configured>"
"record" : <true|false, whether this publisher should be recorded or not; optional>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as i see the documentation is wrong, its not optional.

@wheresjames
Copy link
Contributor Author

@tgabi333 , Thanks, fixed.

@antoniotuzzi
Copy link

great extension!
May I suggest a new one related ? (and you are very strong currently in the field!)
"rec_dir"
should be a PATH that if used is prepended to the "filename" (with correct final slash checks)

using "rec_dir" we can leave empty, for example, "filename" in the configure, and leave to JANUS the naming tasks, but we avoid a common DIR for all recordings (to filter by, day, conversation ID etc etc)

@wheresjames
Copy link
Contributor Author

That's a great idea, I'll find time to add this.

@lminiero
Copy link
Member

lminiero commented May 6, 2020

"record" : < true|false, whether this publisher should be recorded or not; optional >,

Not sure why a specific publisher is addressed here, if this is supposed to be a global recording thing.

@wheresjames
Copy link
Contributor Author

@lminiero , I changed that in that last patch, you are correct.

@lminiero
Copy link
Member

lminiero commented May 6, 2020

Ah sorry for missing that, I was just looking at the description, didn't have time to review the code yet 👍

@wheresjames
Copy link
Contributor Author

wheresjames commented May 6, 2020

@antoniotuzzi , Sorry, I think I missed part of what you were saying, I think I get it now. It doesn't make sense here to accept the filename parameter since it would have the effect of pointing all participants to the same file. So that should be removed.

@antoniotuzzi
Copy link

@wheresjames you are right, correct

I confused with a single endpoint configure... :(

Copy link
Member

@lminiero lminiero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few notes.

plugins/janus_videoroom.c Outdated Show resolved Hide resolved
plugins/janus_videoroom.c Outdated Show resolved Hide resolved
plugins/janus_videoroom.c Outdated Show resolved Hide resolved
plugins/janus_videoroom.c Outdated Show resolved Hide resolved
@lminiero
Copy link
Member

@wheresjames any update on my notes? If you don't address them I can't merge this...

@wheresjames
Copy link
Contributor Author

@lminiero , Sorry for the delay I've been swamped. Getting on this now.

Copy link
Member

@lminiero lminiero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added a couple of minor notes on something I didn't notice before. I'll make a few tests either later today, or tomorrow, and merge in case.

plugins/janus_videoroom.c Outdated Show resolved Hide resolved
janus_mutex_lock(&videoroom->mutex);
janus_mutex_unlock(&rooms_mutex);
/* Set recording status */
gboolean room_prev_recording_active = recording_active ? TRUE : FALSE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for that, recording_active is a boolean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, I think I copied it that way. Pushed a fix.

@lminiero
Copy link
Member

This looks good to me: I'll add the new property to property to prevent self-recording myself, after I merge 👍
Thanks again for your contribution and the quick fixes!

@lminiero lminiero merged commit d480834 into meetecho:master May 15, 2020
@wheresjames
Copy link
Contributor Author

Thank you sir!

@lminiero
Copy link
Member

See the lock_record property introduced in the commit above for a way to ensure enable_recording is the only way to mess with recordings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants