Bug 938686 - Make OggReader::DownmixToStereo public static. r=rillian

We want this to be available to the WebM reader as well.
This commit is contained in:
Jan Gerber 2013-11-14 10:16:00 -08:00
parent 72f57b32df
commit bd090158c7

View File

@ -78,6 +78,12 @@ public:
virtual nsresult Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime);
virtual nsresult GetBuffered(dom::TimeRanges* aBuffered, int64_t aStartTime);
// Downmix multichannel Audio samples to Stereo.
// It is used from Vorbis and Opus decoders.
// Input are the buffer contains multichannel data,
// the number of channels and the number of frames.
static void DownmixToStereo(nsAutoArrayPtr<AudioDataValue>& buffer,
uint32_t& channel, int32_t frames);
private:
// This monitor should be taken when reading or writing to mIsChained.
ReentrantMonitor mMonitor;
@ -223,12 +229,6 @@ private:
// audio queue.
nsresult DecodeOpus(ogg_packet* aPacket);
// Downmix multichannel Audio samples to Stereo.
// It is used from Vorbis and Opus decoders.
// Input are the buffer contains multichannel data,
// the number of channels and the number of frames.
void DownmixToStereo(nsAutoArrayPtr<AudioDataValue>& buffer,
uint32_t& channel, int32_t frames);
// Decodes a packet of Theora data, and inserts its frame into the
// video queue. May return NS_ERROR_OUT_OF_MEMORY. Caller must have obtained