PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 38ms app.codeStats 0ms

/H264Dec/hooks.js

http://github.com/mbebenita/Broadway
JavaScript | 35 lines | 26 code | 8 blank | 1 comment | 1 complexity | 2cd2ba4ce84eb80bc4b99f03b18784cc MD5 | raw file
 1Module['FS'] = FS;
 2Module['HEAPU8'] = HEAPU8;
 3Module['CorrectionsMonitor'] = CorrectionsMonitor; 
 4
 5FS['createDataFile'] = FS.createDataFile;
 6
 7// Replace main loop handler
 8
 9var breakLoop = false;
10_runMainLoop = function() {
11  window.addEventListener("message", function() {
12    _mainLoopIteration();
13    if (!breakLoop) {
14      window.postMessage(0, "*")
15    }
16  }, false);
17}
18
19Module['play'] = function() {
20  breakLoop = false;
21  window.postMessage(0, "*")
22};
23
24Module['stop'] = function() {
25  breakLoop = true;
26};
27
28Module['onFrameDecoded'] = function () { }
29
30_broadwayOnFrameDecoded = function() {
31  Module['onFrameDecoded']();
32}
33
34Module['setPosition'] = _broadwaySetPosition; 
35Module['getPosition'] = _broadwayGetPosition;