Bug 1417011 - move MP4Metadata and MoofParser to ./dom/media/mp4. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Wed, 15 Nov 2017 12:00:14 +0800
changeset 392104 874157f43b66c435a70f4cd1225716dc7f45df48
parent 392103 583fc8854af09f4d093fde54a860b290e84fcfd2
child 392105 4434b40053770c809d51e4ff9060e0aacc250f69
push id32910
push userrgurzau@mozilla.com
push dateThu, 16 Nov 2017 10:02:59 +0000
treeherdermozilla-central@9941e68b5a53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 MP4Metadata and MoofParser to ./dom/media/mp4. r=kinetik MozReview-Commit-ID: IdNFBer3RCT
dom/media/mp4/Atom.h
dom/media/mp4/AtomType.h
dom/media/mp4/Box.cpp
dom/media/mp4/Box.h
dom/media/mp4/BufferStream.cpp
dom/media/mp4/BufferStream.h
dom/media/mp4/DecoderData.cpp
dom/media/mp4/DecoderData.h
dom/media/mp4/Index.cpp
dom/media/mp4/Index.h
dom/media/mp4/Interval.h
dom/media/mp4/MP4Metadata.cpp
dom/media/mp4/MP4Metadata.h
dom/media/mp4/MoofParser.cpp
dom/media/mp4/MoofParser.h
dom/media/mp4/ResourceStream.cpp
dom/media/mp4/ResourceStream.h
dom/media/mp4/SinfParser.cpp
dom/media/mp4/SinfParser.h
dom/media/mp4/Stream.h
dom/media/mp4/moz.build
dom/media/platforms/agnostic/mp4_demuxer/moz.build
media/libstagefright/binding/Box.cpp
media/libstagefright/binding/BufferStream.cpp
media/libstagefright/binding/DecoderData.cpp
media/libstagefright/binding/Index.cpp
media/libstagefright/binding/MP4Metadata.cpp
media/libstagefright/binding/MoofParser.cpp
media/libstagefright/binding/ResourceStream.cpp
media/libstagefright/binding/SinfParser.cpp
media/libstagefright/binding/include/mp4_demuxer/Atom.h
media/libstagefright/binding/include/mp4_demuxer/AtomType.h
media/libstagefright/binding/include/mp4_demuxer/Box.h
media/libstagefright/binding/include/mp4_demuxer/BufferStream.h
media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
media/libstagefright/binding/include/mp4_demuxer/Index.h
media/libstagefright/binding/include/mp4_demuxer/Interval.h
media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
media/libstagefright/binding/include/mp4_demuxer/MoofParser.h
media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h
media/libstagefright/binding/include/mp4_demuxer/SinfParser.h
media/libstagefright/binding/include/mp4_demuxer/Stream.h
media/libstagefright/moz.build
rename from media/libstagefright/binding/include/mp4_demuxer/Atom.h
rename to dom/media/mp4/Atom.h
rename from media/libstagefright/binding/include/mp4_demuxer/AtomType.h
rename to dom/media/mp4/AtomType.h
rename from media/libstagefright/binding/Box.cpp
rename to dom/media/mp4/Box.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/Box.h
rename to dom/media/mp4/Box.h
rename from media/libstagefright/binding/BufferStream.cpp
rename to dom/media/mp4/BufferStream.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/BufferStream.h
rename to dom/media/mp4/BufferStream.h
rename from media/libstagefright/binding/DecoderData.cpp
rename to dom/media/mp4/DecoderData.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
rename to dom/media/mp4/DecoderData.h
rename from media/libstagefright/binding/Index.cpp
rename to dom/media/mp4/Index.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/Index.h
rename to dom/media/mp4/Index.h
rename from media/libstagefright/binding/include/mp4_demuxer/Interval.h
rename to dom/media/mp4/Interval.h
rename from media/libstagefright/binding/MP4Metadata.cpp
rename to dom/media/mp4/MP4Metadata.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
rename to dom/media/mp4/MP4Metadata.h
rename from media/libstagefright/binding/MoofParser.cpp
rename to dom/media/mp4/MoofParser.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/MoofParser.h
rename to dom/media/mp4/MoofParser.h
rename from media/libstagefright/binding/ResourceStream.cpp
rename to dom/media/mp4/ResourceStream.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h
rename to dom/media/mp4/ResourceStream.h
rename from media/libstagefright/binding/SinfParser.cpp
rename to dom/media/mp4/SinfParser.cpp
rename from media/libstagefright/binding/include/mp4_demuxer/SinfParser.h
rename to dom/media/mp4/SinfParser.h
rename from media/libstagefright/binding/include/mp4_demuxer/Stream.h
rename to dom/media/mp4/Stream.h
--- a/dom/media/mp4/moz.build
+++ b/dom/media/mp4/moz.build
@@ -4,17 +4,76 @@
 # 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/.
 
 EXPORTS += [
     'MP4Decoder.h',
     'MP4Demuxer.h',
 ]
 
+EXPORTS.mp4_demuxer += [
+    'Atom.h',
+    'AtomType.h',
+    'Box.h',
+    'BufferStream.h',
+    'DecoderData.h',
+    'Index.h',
+    'Interval.h',
+    'MoofParser.h',
+    'MP4Metadata.h',
+    'ResourceStream.h',
+    'SinfParser.h',
+    'Stream.h',
+]
+
 UNIFIED_SOURCES += [
+    'Box.cpp',
+    'BufferStream.cpp',
+    'DecoderData.cpp',
+    'Index.cpp',
+    'MoofParser.cpp',
     'MP4Decoder.cpp',
+    'MP4Metadata.cpp',
+    'ResourceStream.cpp',
+    'SinfParser.cpp',
 ]
 
+
 SOURCES += [
     'MP4Demuxer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
+
+# Supress warnnings for now.
+if CONFIG['_MSC_VER']:
+    CFLAGS += [
+        '-wd4013', # 'function' undefined; assuming extern returning int
+        '-wd4101', # unreferenced local variable
+    ]
+    CXXFLAGS += [
+        '-wd4018', # '<' : signed/unsigned mismatch
+        '-wd4275', # non dll-interface class used as base for dll-interface class
+        '-wd4305', # '=' : truncation from 'double' to 'float'
+        '-wd4309', # '=' : truncation of constant value
+        '-wd4355', # 'this' : used in base member initializer list
+        '-wd4804', # '>' : unsafe use of type 'bool' in operation
+        '-wd4099', # mismatched class/struct tags
+    ]
+elif CONFIG['GNU_CXX']:
+    CFLAGS += [
+        '-Wno-comment',
+        '-Wno-sign-compare',
+        '-Wno-unused-function',
+    ]
+    CXXFLAGS += [
+        '-Werror=format',
+        '-Wno-multichar',
+        '-Wno-sign-compare',
+        '-Wno-unused',
+    ]
+    if CONFIG['CLANG_CXX']:
+        CXXFLAGS += [
+            '-Wno-mismatched-tags',
+            '-Wno-tautological-constant-out-of-range-compare',
+            '-Wno-unreachable-code-return',
+            '-Wno-implicit-fallthrough',
+        ]
new file mode 100644
--- /dev/null
+++ b/dom/media/platforms/agnostic/mp4_demuxer/moz.build
@@ -0,0 +1,61 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+with Files("**"):
+    BUG_COMPONENT = ("Core", "Audio/Video: Playback")
+
+EXPORTS.mp4_demuxer += [
+    'Adts.h',
+    'AnnexB.h',
+    'H264.h',
+]
+
+UNIFIED_SOURCES += [
+    'Adts.cpp',
+    'AnnexB.cpp',
+    'H264.cpp',
+]
+
+LOCAL_INCLUDES += [
+    '../../../mp4/',
+]
+
+FINAL_LIBRARY = 'xul'
+
+# Suppress warnings in third-party code.
+if CONFIG['_MSC_VER']:
+    CFLAGS += [
+        '-wd4013', # 'function' undefined; assuming extern returning int
+        '-wd4101', # unreferenced local variable
+    ]
+    CXXFLAGS += [
+        '-wd4018', # '<' : signed/unsigned mismatch
+        '-wd4275', # non dll-interface class used as base for dll-interface class
+        '-wd4305', # '=' : truncation from 'double' to 'float'
+        '-wd4309', # '=' : truncation of constant value
+        '-wd4355', # 'this' : used in base member initializer list
+        '-wd4804', # '>' : unsafe use of type 'bool' in operation
+        '-wd4099', # mismatched class/struct tags
+    ]
+elif CONFIG['GNU_CXX']:
+    CFLAGS += [
+        '-Wno-comment',
+        '-Wno-sign-compare',
+        '-Wno-unused-function',
+    ]
+    CXXFLAGS += [
+        '-Werror=format',
+        '-Wno-multichar',
+        '-Wno-sign-compare',
+        '-Wno-unused',
+    ]
+    if CONFIG['CLANG_CXX']:
+        CXXFLAGS += [
+            '-Wno-mismatched-tags',
+            '-Wno-tautological-constant-out-of-range-compare',
+            '-Wno-unreachable-code-return',
+            '-Wno-implicit-fallthrough',
+        ]
--- a/media/libstagefright/moz.build
+++ b/media/libstagefright/moz.build
@@ -2,45 +2,20 @@
 # vim: set filetype=python:
 # 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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "Audio/Video: Playback")
 
-EXPORTS.mp4_demuxer += [
-    'binding/include/mp4_demuxer/Atom.h',
-    'binding/include/mp4_demuxer/AtomType.h',
-    'binding/include/mp4_demuxer/BufferStream.h',
-    'binding/include/mp4_demuxer/DecoderData.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',
-    'binding/include/mp4_demuxer/Stream.h',
-]
-
 EXPORTS.demuxer += [
     'binding/include/demuxer/TrackDemuxer.h',
 ]
 
-UNIFIED_SOURCES += [
-    'binding/Box.cpp',
-    'binding/BufferStream.cpp',
-    'binding/DecoderData.cpp',
-    'binding/Index.cpp',
-    'binding/MoofParser.cpp',
-    'binding/MP4Metadata.cpp',
-    'binding/ResourceStream.cpp',
-    'binding/SinfParser.cpp',
-]
-
 LOCAL_INCLUDES += [
     'binding/include',
 ]
 
 TEST_DIRS += [
     'gtest',
 ]