test_gst_transcode_configurator.js File Reference

Go to the source code of this file.

Functions

Components utils import ("resource://gre/modules/XPCOMUtils.jsm")
 Test that the configurator gives expected results when deciding on the output formats. This doesn't operate on real files, just feeds in the fake inputs and hopes it comes out right. More...
 
function CopyProperties (aPropertyBag)
 Create a property bag, and do a shallow copy of another property bag if given. More...
 
function F (aNumerator, aDenominator)
 Shorthand for creating a fraction. More...
 
function sbDevCapRange (aInput)
 Make a sbIDevCapRange The input can either be an array (in which case it's used as explicit values) or an object with "min", "step", and "max" properties. More...
 
function checkBitrate (aCaps, aBitrate, aMin, aMax)
 
function fromFractionRange (aFractions)
 
function runTest ()
 Advanced DataRemote unit tests. More...
 

Variables

const K_DEFAULT_INPUT
 
const K_DEFAULT_CAPS
 
const K_DEFAULT_OUTPUT
 
const K_TEST_CASES
 

Function Documentation

function checkBitrate (   aCaps,
  aBitrate,
  aMin,
  aMax 
)

Definition at line 177 of file test_gst_transcode_configurator.js.

Here is the call graph for this function:

function CopyProperties (   aPropertyBag)

Create a property bag, and do a shallow copy of another property bag if given.

Definition at line 39 of file test_gst_transcode_configurator.js.

function F (   aNumerator,
  aDenominator 
)

Shorthand for creating a fraction.

Definition at line 65 of file test_gst_transcode_configurator.js.

function fromFractionRange (   aFractions)

Convert suported PARs / frame rates into an nsIArray The input can either be an array (in which case it's not a range), or an object with "min" and "max" properties, each of which is a fraction (in which case it is a range)

Definition at line 384 of file test_gst_transcode_configurator.js.

Here is the caller graph for this function:

Components utils import ( "resource://gre/modules/XPCOMUtils.jsm"  )

Test that the configurator gives expected results when deciding on the output formats. This doesn't operate on real files, just feeds in the fake inputs and hopes it comes out right.

function runTest ( )

Advanced DataRemote unit tests.

Minimal sanity check for the AddonMetadata Datasource. Assumes that coppery will be installed.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL Initial file to test testharness architecture. Ultimately this file would hold more advanced unit tests.

Advanced DataRemote unit tests.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL

Advanced DataRemote unit tests.

Run the unit tests.

Tests single thread synchronous and asynchronous events

Definition at line 390 of file test_gst_transcode_configurator.js.

Here is the call graph for this function:

function sbDevCapRange (   aInput)

Make a sbIDevCapRange The input can either be an array (in which case it's used as explicit values) or an object with "min", "step", and "max" properties.

Definition at line 78 of file test_gst_transcode_configurator.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const K_DEFAULT_CAPS
Initial value:
= {
type: "video",
containerType: "application/ogg",
video: {
type: "video/x-theora",
explicitSizes: [{width: 320, height: 240}],
widths: {min: 16, step: 16, max: 320},
heights: {min: 16, step: 16, max: 240},
PARs: [F(1, 1)],
frameRates: [F(15, 1), F(30000, 1001)],
bitRates: {min: 0, step:1, max: 4000000}
},
audio: {
type: "audio/x-vorbis",
bitRates: {min: 0, step: 1, max: 400000},
sampleRates: [44100],
channels: [1, 2]
}
}
function F(aNumerator, aDenominator)
Shorthand for creating a fraction.
function width(ele) rect(ele).width
_updateDatepicker height
#define min(a, b)

Definition at line 135 of file test_gst_transcode_configurator.js.

const K_DEFAULT_INPUT

Definition at line 99 of file test_gst_transcode_configurator.js.

const K_DEFAULT_OUTPUT
Initial value:
= {
muxer: "oggmux",
fileExtension: "ogg",
videoEncoder: "theoraenc",
audioEncoder: "vorbisenc",
videoFormat: {
width: 320,
height: 240,
PAR: F(1, 1),
frameRate: F(30000, 1001),
properties: {}
},
audioFormat: {
sampleRate: 44100,
channels: 2,
properties: {}
}
}
function F(aNumerator, aDenominator)
Shorthand for creating a fraction.
function width(ele) rect(ele).width
_updateDatepicker height

Definition at line 158 of file test_gst_transcode_configurator.js.

const K_TEST_CASES

Definition at line 186 of file test_gst_transcode_configurator.js.