av-merge: Add function to dump debugging info

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2021-08-28 18:11:31 -07:00 committed by Jesús
parent aacbf07ad7
commit 77fffee34f
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -114,6 +114,17 @@ AVMerge.prototype.videoEndOfStream = function() {
}
this.videoEndOfStreamCalled = true;
}
AVMerge.prototype.printDebuggingInfo = function() {
reportDebug('videoSource:', this.videoSource);
reportDebug('audioSource:', this.videoSource);
reportDebug('video sidx:', this.videoStream.sidx);
reportDebug('audio sidx:', this.audioStream.sidx);
reportDebug('video duration:', this.video.duration);
reportDebug('video current time:', this.video.currentTime);
reportDebug('mediaSource.readyState:', this.mediaSource.readyState);
reportDebug('videoEndOfStreamCalled', this.videoEndOfStreamCalled);
reportDebug('audioEndOfStreamCalled', this.audioEndOfStreamCalled);
}
function Stream(avMerge, source, startTime, avRatio) {
this.avMerge = avMerge;
@ -410,7 +421,7 @@ function reportError(...args){
console.error(...args);
}
function reportDebug(...args){
console.log(...args);
console.debug(...args);
}
function byteArrayToIntegerLittleEndian(unsignedByteArray){