Bug 1417011 - move MP4Metadata and MoofParser to ./dom/media/mp4. r?kinetik
MozReview-Commit-ID: IdNFBer3RCT
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',
]