Bug 1417011 - move BufferReader, BitReader and ByteWriter to dom/media. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Wed, 15 Nov 2017 11:15:20 +0800
changeset 430761 d20919a219d305ba27acce8440bfacb200040031
parent 430760 441d3a12c9ad5af995e2de27e523c4a6d7082454
child 430762 583fc8854af09f4d093fde54a860b290e84fcfd2
push idunknown
push userunknown
push dateunknown
reviewerskinetik
bugs1417011
milestone59.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 1417011 - move BufferReader, BitReader and ByteWriter to dom/media. r=kinetik MozReview-Commit-ID: KqmSM3RlD1V
dom/media/BitReader.cpp
dom/media/BitReader.h
dom/media/BufferReader.h
dom/media/ByteWriter.h
dom/media/CloneableWithRangeMediaResource.cpp
dom/media/moz.build
media/libstagefright/binding/BitReader.cpp
media/libstagefright/binding/include/mp4_demuxer/BitReader.h
media/libstagefright/binding/include/mp4_demuxer/BufferReader.h
media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
media/libstagefright/moz.build
rename from media/libstagefright/binding/BitReader.cpp
rename to dom/media/BitReader.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/BitReader.h
rename to dom/media/BitReader.h
rename from media/libstagefright/binding/include/mp4_demuxer/BufferReader.h
rename to dom/media/BufferReader.h
rename from media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
rename to dom/media/ByteWriter.h
--- a/dom/media/CloneableWithRangeMediaResource.cpp
+++ b/dom/media/CloneableWithRangeMediaResource.cpp
@@ -1,15 +1,16 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 
 #include "CloneableWithRangeMediaResource.h"
 
+#include "mozilla/AbstractThread.h"
 #include "mozilla/Monitor.h"
 #include "nsContentUtils.h"
 #include "nsIAsyncInputStream.h"
 #include "nsNetCID.h"
 
 namespace mozilla {
 
 namespace {
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -153,16 +153,22 @@ EXPORTS += [
     'VideoFrameContainer.h',
     'VideoLimits.h',
     'VideoSegment.h',
     'VideoUtils.h',
     'VorbisUtils.h',
     'XiphExtradata.h',
 ]
 
+EXPORTS.mp4_demuxer += [
+    'BitReader.h',
+    'BufferReader.h',
+    'ByteWriter.h',
+]
+
 EXPORTS.mozilla += [
     'MediaManager.h',
 ]
 
 EXPORTS.mozilla.media.webrtc += [
     'webrtc/WebrtcGlobal.h',
 ]
 
@@ -207,16 +213,17 @@ UNIFIED_SOURCES += [
     'AudioDeviceInfo.cpp',
     'AudioSegment.cpp',
     'AudioStream.cpp',
     'AudioStreamTrack.cpp',
     'AudioTrack.cpp',
     'AudioTrackList.cpp',
     'BaseMediaResource.cpp',
     'Benchmark.cpp',
+    'BitReader.cpp',
     'CanvasCaptureMediaStream.cpp',
     'ChannelMediaDecoder.cpp',
     'ChannelMediaResource.cpp',
     'CloneableWithRangeMediaResource.cpp',
     'DOMMediaStream.cpp',
     'FileBlockCache.cpp',
     'FileMediaResource.cpp',
     'GetUserMediaRequest.cpp',
--- a/media/libstagefright/moz.build
+++ b/media/libstagefright/moz.build
@@ -7,20 +7,17 @@
 with Files("**"):
     BUG_COMPONENT = ("Core", "Audio/Video: Playback")
 
 EXPORTS.mp4_demuxer += [
     'binding/include/mp4_demuxer/Adts.h',
     'binding/include/mp4_demuxer/AnnexB.h',
     'binding/include/mp4_demuxer/Atom.h',
     'binding/include/mp4_demuxer/AtomType.h',
-    'binding/include/mp4_demuxer/BitReader.h',
-    'binding/include/mp4_demuxer/BufferReader.h',
     'binding/include/mp4_demuxer/BufferStream.h',
-    'binding/include/mp4_demuxer/ByteWriter.h',
     'binding/include/mp4_demuxer/DecoderData.h',
     'binding/include/mp4_demuxer/H264.h',
     'binding/include/mp4_demuxer/Index.h',
     'binding/include/mp4_demuxer/Interval.h',
     'binding/include/mp4_demuxer/MoofParser.h',
     'binding/include/mp4_demuxer/MP4Metadata.h',
     'binding/include/mp4_demuxer/ResourceStream.h',
     'binding/include/mp4_demuxer/SinfParser.h',
@@ -29,17 +26,16 @@ EXPORTS.mp4_demuxer += [
 
 EXPORTS.demuxer += [
     'binding/include/demuxer/TrackDemuxer.h',
 ]
 
 UNIFIED_SOURCES += [
     'binding/Adts.cpp',
     'binding/AnnexB.cpp',
-    'binding/BitReader.cpp',
     'binding/Box.cpp',
     'binding/BufferStream.cpp',
     'binding/DecoderData.cpp',
     'binding/H264.cpp',
     'binding/Index.cpp',
     'binding/MoofParser.cpp',
     'binding/MP4Metadata.cpp',
     'binding/ResourceStream.cpp',