Bug 938686 - Make OggReader::DownmixToStereo public static. r=rillian
authorJan Gerber <j@mailb.org>
Thu, 14 Nov 2013 10:16:00 -0800
changeset 174047 f1cca0891dbe0aae4f597c5b3db83d789aa7bf57
parent 174046 77c1f23afc1c1d4180148cf1858de0d9a22e078a
child 174048 8c2dbfc2463f05723bde9100ecb87a3b2b84fea3
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs938686
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 938686 - Make OggReader::DownmixToStereo public static. r=rillian We want this to be available to the WebM reader as well.
content/media/ogg/OggReader.h
--- a/content/media/ogg/OggReader.h
+++ b/content/media/ogg/OggReader.h
@@ -73,16 +73,22 @@ public:
     return mTheoraState != 0 && mTheoraState->mActive;
   }
 
   virtual nsresult ReadMetadata(MediaInfo* aInfo,
                                 MetadataTags** aTags);
   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;
 
   // Specialized Reset() method to signal if the seek is
   // to the start of the stream.
   nsresult ResetDecode(bool start);
 
@@ -218,22 +224,16 @@ private:
   // Decodes a packet of Vorbis data, and inserts its samples into the
   // audio queue.
   nsresult DecodeVorbis(ogg_packet* aPacket);
 
   // Decodes a packet of Opus data, and inserts its samples into the
   // 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
   // the reader's monitor. aTimeThreshold is the current playback position
   // in media time in microseconds. Frames with an end time before this will
   // not be enqueued.
   nsresult DecodeTheora(ogg_packet* aPacket, int64_t aTimeThreshold);