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

Replace libav with FFmpeg 3.4.2 *do not merge* #1218

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2ab121a
Replace libav with ffmpeg 3.4.2
zevarito May 14, 2018
8aafb1a
Fix install dep scripts for ffmpeg
zevarito May 15, 2018
63c428f
Update erizo cmakelists to enable -Werror
zevarito May 16, 2018
fb5a464
Update ExternalInput to ffmpeg API
zevarito May 17, 2018
6d21295
Refactor encoding/decoding pipeline.
zevarito May 22, 2018
62ba1e0
Add avresample lib to cmakelists and enable build
zevarito May 23, 2018
6fac4e7
Add av_str_2_err_cpp macro
zevarito May 23, 2018
59ff231
Include chrono in Coder class
zevarito May 23, 2018
7700db0
ExternalOutput uses AV Coder classes
zevarito May 24, 2018
5b085ff
Update Erizo log verbosity
zevarito May 29, 2018
8f476c0
Make cpp lint pass
zevarito May 29, 2018
f6494e1
Fix unref frames after decoding/encoding external output
zevarito May 31, 2018
865db5b
Move Erizo build flag -Werror to the right place
zevarito Jun 1, 2018
595c900
Fixes around ExternalOutput refactor
zevarito Jun 1, 2018
b43063e
Start recording accepts format extension
zevarito May 30, 2018
13c2c37
Start recording accepts urls
zevarito May 30, 2018
a22fb8d
Fix lint for erizoController
zevarito Jun 1, 2018
68ad15b
Fix the way ICE propagates connection state events (#1232)
kekkokk May 30, 2018
ce6f84b
Do not check if room param is NaN in basic example server. (#1231)
fantasy4z Jun 1, 2018
beecac0
Fix crashes in addRemoteCandidate when subscriber is not removed from…
luoshaohua Jun 4, 2018
e676776
Added pipeline shared_ptr check before dereferencing it (#1238)
Equod Jun 7, 2018
38c845a
Sanitise token signature checking (#1235)
joseajp Jun 7, 2018
ee4eb15
Fix unpublish in p2p (#1236)
kekkokk Jun 7, 2018
a4e5330
Fix concurrency in Nuve create room(#1225)
kekkokk Jun 7, 2018
17eebd4
Update build script to automatically detect the number of CPUs (#1226)
kekkokk Jun 7, 2018
5ca71eb
Assign room to stream (#1243)
kekkokk Jun 13, 2018
4b4fe08
Fix circleci scripts (#1248)
jcague Jun 13, 2018
013ca00
Small code review like avoiding redundant objects copy. (#1247)
Equod Jun 13, 2018
b733ceb
Added clion configs to gitignore (.idea folder) (#1246)
Equod Jun 13, 2018
d1ae92e
Fix WebRtcConnection close by updating publishers immediately (#1237)
luoshaohua Jun 18, 2018
a1fa1f5
Improve startRecording advancedOptions
zevarito Jul 4, 2018
8dcf31b
fix js client lint
zevarito Jul 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions erizo_controller/erizoClient/src/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,14 +682,22 @@ const Room = (altIo, altConnectionHelpers, altConnectionManager, specInput) => {
};

// Returns callback(id, error)
that.startRecording = (stream, callback = () => {}) => {
that.startRecording = (stream, callbackOrOptions) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if it's an API just to test things, I'd rather have

that.startRecording = (stream, callback, advancedOptions=undefined) => {

We can decide later at what point and in what format we can expose that options in the API and update the docs accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lodoyun yes, totally, I've even forgot you can add arbitrary params to a js fn, I'll update as soon as I can.

let callback = () => {};
let extension = 'mkv';
if (typeof callbackOrOptions === 'function') {
callback = callbackOrOptions;
} else if (typeof callbackOrOptions === 'object') {
callback = callbackOrOptions.callback || callback;
extension = callbackOrOptions.extension || extension;
}
if (stream === undefined) {
Logger.error('Trying to start recording on an invalid stream', stream);
callback(undefined, 'Invalid Stream');
return;
}
Logger.debug(`Start Recording stream: ${stream.getID()}`);
socket.sendMessage('startRecorder', { to: stream.getID() }, (id, error) => {
socket.sendMessage('startRecorder', { to: stream.getID(), extension }, (id, error) => {
if (id === null) {
Logger.error('Error on start recording', error);
callback(undefined, error);
Expand Down
23 changes: 8 additions & 15 deletions erizo_controller/erizoController/models/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Client extends events.EventEmitter {
this.id = uuidv4();
this.options = options;
listenToSocketEvents(this);
this.user = {name: token.userName, role: token.role, permissions: {}};
this.user = {name: token.userName, role: token.role, permissions: {}, recordings: {}};
const permissions = global.config.erizoController.roles[token.role] || [];
for (const right in permissions) {
this.user.permissions[right] = permissions[right];
Expand Down Expand Up @@ -151,11 +151,7 @@ class Client extends events.EventEmitter {
let url = sdp;
if (options.state === 'recording') {
const recordingId = sdp;
if (global.config.erizoController.recording_path) { // jshint ignore:line
url = global.config.erizoController.recording_path + recordingId + '.mkv'; // jshint ignore:line
} else {
url = '/tmp/' + recordingId + '.mkv';
}
url = this.user.recordings[recordingId];
}
this.room.controller.addExternalInput(id, url, (result) => {
if (result === 'success') {
Expand Down Expand Up @@ -357,16 +353,19 @@ class Client extends events.EventEmitter {
callback(null, 'Unauthorized');
return;
}
var extension = options.extension || 'mkv';
var streamId = options.to;
var recordingId = Math.random() * 1000000000000000000;
var url;

if (global.config.erizoController.recording_path) { // jshint ignore:line
url = global.config.erizoController.recording_path + recordingId + '.mkv'; // jshint ignore:line
url = global.config.erizoController.recording_path + recordingId + '.' + extension; // jshint ignore:line
} else {
url = '/tmp/' + recordingId + '.mkv';
url = '/tmp/' + recordingId + '.' + extension;
}

this.user.recordings[recordingId] = url;

log.info('message: startRecorder, ' +
'state: RECORD_REQUESTED, ' +
'streamId: ' + streamId + ', ' +
Expand Down Expand Up @@ -412,13 +411,7 @@ class Client extends events.EventEmitter {
return;
}
var recordingId = options.id;
var url;

if (global.config.erizoController.recording_path) { // jshint ignore:line
url = global.config.erizoController.recording_path + recordingId + '.mkv'; // jshint ignore:line
} else {
url = '/tmp/' + recordingId + '.mkv';
}
var url = this.user.recordings[recordingId];

log.info('message: startRecorder, ' +
'state: RECORD_STOPPED, ' +
Expand Down