28 Components.utils.import(
"resource://app/jsmodules/ArrayConverter.jsm");
30 var conf =
Cc[
"@songbirdnest.com/Songbird/Mediacore/Transcode/Configurator/Device/GStreamer;1"]
31 .createInstance(
Ci.sbITranscodingConfigurator);
32 var profiles = ArrayConverter.JSArray(conf.availableProfiles);
33 var testProfile =
null;
34 for each (var profile
in profiles) {
35 profile.QueryInterface(
Ci.sbITranscodeProfile);
36 log(profile.id +
" = " + profile.description);
37 if (profile.id ==
"072b5104-1dd2-11b2-9313-e80ca3194e4e") {
39 testProfile = profile;
43 profile = testProfile.QueryInterface(
Ci.sbITranscodeEncoderProfile);
45 const K_PRIORITY_MAP = {
"-1": 350,
52 const K_BITRATE_MAP = {
"-1": 32000,
59 const K_BPP_MAP = {
"-1": 0.03,
67 for (var
i in K_PRIORITY_MAP) {
68 assertEqual(K_PRIORITY_MAP[
i], profile.getEncoderProfilePriority(i));
70 for (var
i in K_BITRATE_MAP) {
71 assertEqual(K_BITRATE_MAP[
i], profile.getAudioBitrate(i));
73 for (var
i in K_BPP_MAP) {
75 profile.getVideoBitsPerPixel(
i).toFixed(5));
function assertEqual(aExpected, aActual, aMessage)
_getSelectedPageStyle s i
function runTest()
Advanced DataRemote unit tests.