Bug 1417795 - remove mp4_demuxer namespace part1. r?kinetik draft
authorAlfredo.Yang <ayang@mozilla.com>
Thu, 16 Nov 2017 15:57:15 +0800
changeset 700380 abdc7a7849dcd8863e8f38fa2d3c479ffa7c2f19
parent 700379 366d87ed5a899370e3573556df71db89ffdf2100
child 700381 c1bd5d9ed8281765d255f0dd951e774a21851fac
push id89794
push userbmo:ayang@mozilla.com
push dateMon, 20 Nov 2017 02:30:12 +0000
reviewerskinetik
bugs1417795
milestone59.0a1
Bug 1417795 - remove mp4_demuxer namespace part1. r?kinetik MozReview-Commit-ID: 6YrURoOq2wk
dom/media/BitReader.cpp
dom/media/flac/FlacDemuxer.cpp
dom/media/flac/FlacFrameParser.cpp
dom/media/mediasource/ContainerParser.cpp
dom/media/moz.build
dom/media/mp3/MP3FrameParser.h
dom/media/mp4/Box.h
dom/media/mp4/DecoderData.cpp
dom/media/mp4/Index.cpp
dom/media/platforms/agnostic/WAVDecoder.cpp
dom/media/platforms/agnostic/bytestreams/AnnexB.cpp
dom/media/platforms/agnostic/bytestreams/H264.cpp
dom/media/wave/WaveDemuxer.cpp
--- a/dom/media/BitReader.cpp
+++ b/dom/media/BitReader.cpp
@@ -1,15 +1,15 @@
 /* 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/. */
 
 // Derived from Stagefright's ABitReader.
 
-#include "mp4_demuxer/BitReader.h"
+#include "BitReader.h"
 
 using namespace mozilla;
 
 namespace mp4_demuxer
 {
 
 BitReader::BitReader(const mozilla::MediaByteBuffer* aBuffer)
   : BitReader(aBuffer->Elements(), aBuffer->Length() * 8)
--- a/dom/media/flac/FlacDemuxer.cpp
+++ b/dom/media/flac/FlacDemuxer.cpp
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "FlacDemuxer.h"
 
 #include "mozilla/Maybe.h"
-#include "mp4_demuxer/BitReader.h"
+#include "BitReader.h"
 #include "nsAutoPtr.h"
 #include "prenv.h"
 #include "FlacFrameParser.h"
 #include "VideoUtils.h"
 #include "TimeUnits.h"
 
 extern mozilla::LazyLogModule gMediaDemuxerLog;
 #define LOG(msg, ...) \
--- a/dom/media/flac/FlacFrameParser.cpp
+++ b/dom/media/flac/FlacFrameParser.cpp
@@ -4,17 +4,17 @@
 * 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 "FlacFrameParser.h"
 #include "nsTArray.h"
 #include "OggCodecState.h"
 #include "OpusParser.h"
 #include "VideoUtils.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 #include "mozilla/ResultExtensions.h"
 
 using mp4_demuxer::BufferReader;
 
 namespace mozilla
 {
 
 #define OGG_FLAC_METADATA_TYPE_STREAMINFO 0x7F
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -12,17 +12,17 @@
 #include "mozilla/ErrorResult.h"
 #include "mp4_demuxer/MoofParser.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Result.h"
 #include "MediaData.h"
 #ifdef MOZ_FMP4
 #include "mp4_demuxer/AtomType.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 #include "mp4_demuxer/Stream.h"
 #endif
 #include "nsAutoPtr.h"
 #include "SourceBufferResource.h"
 #include <algorithm>
 
 extern mozilla::LogModule* GetMediaSourceSamplesLog();
 
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -94,17 +94,20 @@ EXPORTS += [
     'AudioCompactor.h',
     'AudioConverter.h',
     'AudioMixer.h',
     'AudioPacketizer.h',
     'AudioSampleFormat.h',
     'AudioSegment.h',
     'AudioStream.h',
     'Benchmark.h',
+    'BitReader.h',
     'BufferMediaResource.h',
+    'BufferReader.h',
+    'ByteWriter.h',
     'ChannelMediaDecoder.h',
     'CubebUtils.h',
     'DecoderTraits.h',
     'DOMMediaStream.h',
     'FileBlockCache.h',
     'FrameStatistics.h',
     'Intervals.h',
     'Latency.h',
@@ -153,22 +156,16 @@ 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',
 ]
 
--- a/dom/media/mp3/MP3FrameParser.h
+++ b/dom/media/mp3/MP3FrameParser.h
@@ -4,17 +4,17 @@
 
 #ifndef MP3_FRAME_PARSER_H_
 #define MP3_FRAME_PARSER_H_
 
 #include <vector>
 
 #include "mozilla/Maybe.h"
 #include "mozilla/Result.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 
 namespace mozilla {
 
 // ID3 header parser state machine used by FrameParser.
 // The header contains the following format (one byte per term):
 // 'I' 'D' '3' MajorVersion MinorVersion Flags Size1 Size2 Size3 Size4
 // For more details see http://id3.org/id3v2.3.0.
 class ID3Parser
--- a/dom/media/mp4/Box.h
+++ b/dom/media/mp4/Box.h
@@ -7,17 +7,17 @@
 #ifndef BOX_H_
 #define BOX_H_
 
 #include <stdint.h>
 #include "nsTArray.h"
 #include "MediaResource.h"
 #include "mozilla/EndianUtils.h"
 #include "mp4_demuxer/AtomType.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 
 using namespace mozilla;
 
 namespace mp4_demuxer {
 
 class Stream;
 
 class BoxContext
--- a/dom/media/mp4/DecoderData.cpp
+++ b/dom/media/mp4/DecoderData.cpp
@@ -1,15 +1,15 @@
 /* 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 "Adts.h"
 #include "AnnexB.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 #include "mp4_demuxer/DecoderData.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/EndianUtils.h"
 #include "VideoUtils.h"
 
 // OpusDecoder header is really needed only by MP4 in rust
 #include "OpusDecoder.h"
 #include "mp4parse.h"
--- a/dom/media/mp4/Index.cpp
+++ b/dom/media/mp4/Index.cpp
@@ -1,13 +1,13 @@
 /* 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 "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 #include "mp4_demuxer/Index.h"
 #include "mp4_demuxer/Interval.h"
 #include "mp4_demuxer/MP4Metadata.h"
 #include "mp4_demuxer/SinfParser.h"
 #include "nsAutoPtr.h"
 #include "mozilla/RefPtr.h"
 
 #include <algorithm>
--- a/dom/media/platforms/agnostic/WAVDecoder.cpp
+++ b/dom/media/platforms/agnostic/WAVDecoder.cpp
@@ -1,19 +1,19 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "AudioSampleFormat.h"
+#include "BufferReader.h"
 #include "WAVDecoder.h"
 #include "mozilla/SyncRunnable.h"
 #include "VideoUtils.h"
-#include "mp4_demuxer/BufferReader.h"
 
 namespace mozilla {
 
 int16_t
 DecodeALawSample(uint8_t aValue)
 {
   aValue = aValue ^ 0x55;
   int8_t sign = (aValue & 0x80) ? -1 : 1;
--- a/dom/media/platforms/agnostic/bytestreams/AnnexB.cpp
+++ b/dom/media/platforms/agnostic/bytestreams/AnnexB.cpp
@@ -2,18 +2,18 @@
  * 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 "mozilla/ArrayUtils.h"
 #include "mozilla/EndianUtils.h"
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/Unused.h"
 #include "AnnexB.h"
-#include "mp4_demuxer/BufferReader.h"
-#include "mp4_demuxer/ByteWriter.h"
+#include "BufferReader.h"
+#include "ByteWriter.h"
 #include "MediaData.h"
 #include "nsAutoPtr.h"
 
 using namespace mozilla;
 
 namespace mp4_demuxer
 {
 
--- a/dom/media/platforms/agnostic/bytestreams/H264.cpp
+++ b/dom/media/platforms/agnostic/bytestreams/H264.cpp
@@ -1,18 +1,18 @@
 /* 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 "mozilla/ArrayUtils.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/ResultExtensions.h"
-#include "mp4_demuxer/BitReader.h"
-#include "mp4_demuxer/BufferReader.h"
-#include "mp4_demuxer/ByteWriter.h"
+#include "BitReader.h"
+#include "BufferReader.h"
+#include "ByteWriter.h"
 #include "AnnexB.h"
 #include "H264.h"
 #include <limits>
 #include <cmath>
 
 #define READSE(var, min, max)                                                  \
   {                                                                            \
     int32_t val = br.ReadSE();                                                 \
--- a/dom/media/wave/WaveDemuxer.cpp
+++ b/dom/media/wave/WaveDemuxer.cpp
@@ -6,17 +6,17 @@
 
 #include "WaveDemuxer.h"
 
 #include <inttypes.h>
 #include <algorithm>
 
 #include "mozilla/Assertions.h"
 #include "mozilla/EndianUtils.h"
-#include "mp4_demuxer/BufferReader.h"
+#include "BufferReader.h"
 #include "nsAutoPtr.h"
 #include "VideoUtils.h"
 #include "TimeUnits.h"
 
 using mozilla::media::TimeUnit;
 using mozilla::media::TimeIntervals;
 
 namespace mozilla {