Skip to content
Snippets Groups Projects
Commit c027bdf3 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Check for bad packet order

parent 6cb6e3f6
No related branches found
No related tags found
No related merge requests found
Pipeline #26802 passed
......@@ -59979,6 +59979,11 @@ webSocketTest = () => {
peer.send("update_cfg", "ftl://utu.fi#reconstruction_default/0/renderer/cool_effect", "true")
}
function FTLFrameset(id) {
this.id = id;
this.sources = {};
}
function FTLStream(peer, uri, element) {
this.uri = uri;
this.peer = peer;
......@@ -59988,6 +59993,10 @@ function FTLStream(peer, uri, element) {
this.current_source = 0;
this.current_channel = 0;
this.framesets = {};
this.handlers = {};
//this.elements_ = {};
//this.converters_ = {};
......@@ -60226,6 +60235,22 @@ function FTLStream(peer, uri, element) {
}
}
FTLStream.prototype.on = function(name, cb) {
if (!this.handlers.hasOwnProperty(name)) {
this.handlers[name] = [];
}
this.handlers[name].push(cb);
}
FTLStream.prototype.notify = function (name, ...args) {
if (this.handlers.hasOwnProperty(name)) {
let a = this.handlers[name];
for (let i=0; i<a.length; ++i) {
a[i].apply(this, args);
}
}
}
FTLStream.prototype.pause = function() {
this.paused = !this.paused;
if (!this.paused) {
......@@ -61669,6 +61694,7 @@ var VideoConverter = (function () {
this.queue.push(data);
}
else {
if (this.queue.length > 0) console.error("DATA IN QUEUE");
this.doAppend(data);
}
}
......@@ -125,6 +125,11 @@ webSocketTest = () => {
peer.send("update_cfg", "ftl://utu.fi#reconstruction_default/0/renderer/cool_effect", "true")
}
function FTLFrameset(id) {
this.id = id;
this.sources = {};
}
function FTLStream(peer, uri, element) {
this.uri = uri;
this.peer = peer;
......@@ -134,6 +139,10 @@ function FTLStream(peer, uri, element) {
this.current_source = 0;
this.current_channel = 0;
this.framesets = {};
this.handlers = {};
//this.elements_ = {};
//this.converters_ = {};
......@@ -372,6 +381,22 @@ function FTLStream(peer, uri, element) {
}
}
FTLStream.prototype.on = function(name, cb) {
if (!this.handlers.hasOwnProperty(name)) {
this.handlers[name] = [];
}
this.handlers[name].push(cb);
}
FTLStream.prototype.notify = function (name, ...args) {
if (this.handlers.hasOwnProperty(name)) {
let a = this.handlers[name];
for (let i=0; i<a.length; ++i) {
a[i].apply(this, args);
}
}
}
FTLStream.prototype.pause = function() {
this.paused = !this.paused;
if (!this.paused) {
......
......@@ -143,6 +143,7 @@ var VideoConverter = (function () {
this.queue.push(data);
}
else {
if (this.queue.length > 0) console.error("DATA IN QUEUE");
this.doAppend(data);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment