This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
526 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- | ||
# vim: set filetype=python: | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
with Files("**"): | ||
BUG_COMPONENT = ("Core", "ImageLib") | ||
|
||
EXPORTS += [ | ||
'vorbislib_structs_for_cpp_api_new.h', | ||
] | ||
|
||
FINAL_LIBRARY = 'gkmedias' |
110 changes: 110 additions & 0 deletions
110
media/libvorbis_naclport/vorbislib_structs_for_cpp_api_new.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#define sandbox_fields_reflection_vorbislib_class_vorbis_info(f, g, ...) \ | ||
f(int, version, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int, channels, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long, rate, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long, bitrate_upper, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long, bitrate_nominal, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long, bitrate_lower, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long, bitrate_window, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(void*, codec_setup, FIELD_NORMAL, ##__VA_ARGS__) | ||
|
||
#define sandbox_fields_reflection_vorbislib_class_vorbis_comment(f, g, ...) \ | ||
f(char **, user_comments, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int *, comment_lengths, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , comments, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(char *, vendor, FIELD_NORMAL, ##__VA_ARGS__) | ||
|
||
#define sandbox_fields_reflection_vorbislib_class_vorbis_dsp_state(f, g, ...) \ | ||
f(int , analysisp, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(vorbis_info *, vi, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int32_t **, pcm, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int32_t **, pcmret, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , pcm_storage, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , pcm_current, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , pcm_returned, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , preextrapolate, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , eofflag, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , lW, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , W, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , nW, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , centerW, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int64_t , granulepos, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int64_t , sequence, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(void *, backend_state, FIELD_NORMAL, ##__VA_ARGS__) | ||
|
||
#define sandbox_fields_reflection_vorbislib_class_oggpack_buffer(f, g, ...) \ | ||
f(long , endbyte, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , endbit, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(unsigned char *, buffer, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(unsigned char *, ptr, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , storage, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() | ||
|
||
#define sandbox_fields_reflection_vorbislib_class_vorbis_block(f, g, ...) \ | ||
f(ogg_int32_t ** , pcm, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(oggpack_buffer , opb, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , lW, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , W, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , nW, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , pcmend, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , mode, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(int , eofflag, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int64_t , granulepos, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(ogg_int64_t , sequence, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(vorbis_dsp_state * , vd, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(void *, localstore, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , localtop, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , localalloc, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(long , totaluse, FIELD_NORMAL, ##__VA_ARGS__) \ | ||
g() \ | ||
f(struct alloc_chain *, reap, FIELD_NORMAL, ##__VA_ARGS__) | ||
|
||
#define sandbox_fields_reflection_vorbislib_allClasses(f, ...) \ | ||
f(vorbis_info, vorbislib, ##__VA_ARGS__) \ | ||
f(vorbis_comment, vorbislib, ##__VA_ARGS__) \ | ||
f(vorbis_dsp_state, vorbislib, ##__VA_ARGS__) \ | ||
f(oggpack_buffer, vorbislib, ##__VA_ARGS__) \ | ||
f(vorbis_block, vorbislib, ##__VA_ARGS__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Test video page</title> | ||
<script type="text/javascript" src="chrome://talos-powers-content/content/TalosContentProfiler.js"></script> | ||
</head> | ||
<body> | ||
<audio src='example.ogg' alt='Test' controls> | ||
<script type="text/javascript"> | ||
var delaySum = 0.0; | ||
var samples = 0; | ||
var v = document.getElementsByTagName("audio")[0]; | ||
var shouldMeasure = false; | ||
var start = 0; | ||
|
||
function refreshLoop() { | ||
window.requestAnimationFrame(() => { | ||
delaySum += v.mozFrameDelay; | ||
samples += 1; | ||
document.title = "Delay: " + (1000 * delaySum/samples).toFixed(2) + " Max allowed: 16.67"; | ||
if (shouldMeasure) { | ||
refreshLoop(); | ||
} | ||
}); | ||
} | ||
|
||
v.addEventListener("play", function() { | ||
shouldMeasure = true; | ||
setTimeout(refreshLoop, 1000 /* 1sec */); | ||
}); | ||
|
||
v.addEventListener("pause", function() { | ||
shouldMeasure = false; | ||
TalosContentProfiler.pause("audio test finish", true).then(() => { | ||
var result = (1000 * delaySum/samples).toFixed(2); | ||
tpRecordTime(result, start); | ||
parent.reportResults(result, start); | ||
}); | ||
}); | ||
|
||
addEventListener("load", function() { | ||
TalosContentProfiler.resume("audio test start", true).then(() => { | ||
start = new Date(); | ||
v.play(); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
% http://localhost/tests/vorbis_perf/audiotest.html |