diff --git a/media/libstagefright/binding/include/mp4_demuxer/Atom.h b/dom/media/mp4/Atom.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/Atom.h rename to dom/media/mp4/Atom.h diff --git a/media/libstagefright/binding/include/mp4_demuxer/AtomType.h b/dom/media/mp4/AtomType.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/AtomType.h rename to dom/media/mp4/AtomType.h diff --git a/media/libstagefright/binding/Box.cpp b/dom/media/mp4/Box.cpp similarity index 100% rename from media/libstagefright/binding/Box.cpp rename to dom/media/mp4/Box.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/Box.h b/dom/media/mp4/Box.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/Box.h rename to dom/media/mp4/Box.h diff --git a/media/libstagefright/binding/BufferStream.cpp b/dom/media/mp4/BufferStream.cpp similarity index 100% rename from media/libstagefright/binding/BufferStream.cpp rename to dom/media/mp4/BufferStream.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/BufferStream.h b/dom/media/mp4/BufferStream.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/BufferStream.h rename to dom/media/mp4/BufferStream.h diff --git a/media/libstagefright/binding/DecoderData.cpp b/dom/media/mp4/DecoderData.cpp similarity index 100% rename from media/libstagefright/binding/DecoderData.cpp rename to dom/media/mp4/DecoderData.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h b/dom/media/mp4/DecoderData.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/DecoderData.h rename to dom/media/mp4/DecoderData.h diff --git a/media/libstagefright/binding/Index.cpp b/dom/media/mp4/Index.cpp similarity index 100% rename from media/libstagefright/binding/Index.cpp rename to dom/media/mp4/Index.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/Index.h b/dom/media/mp4/Index.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/Index.h rename to dom/media/mp4/Index.h diff --git a/media/libstagefright/binding/include/mp4_demuxer/Interval.h b/dom/media/mp4/Interval.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/Interval.h rename to dom/media/mp4/Interval.h diff --git a/media/libstagefright/binding/MP4Metadata.cpp b/dom/media/mp4/MP4Metadata.cpp similarity index 100% rename from media/libstagefright/binding/MP4Metadata.cpp rename to dom/media/mp4/MP4Metadata.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h b/dom/media/mp4/MP4Metadata.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h rename to dom/media/mp4/MP4Metadata.h diff --git a/media/libstagefright/binding/MoofParser.cpp b/dom/media/mp4/MoofParser.cpp similarity index 100% rename from media/libstagefright/binding/MoofParser.cpp rename to dom/media/mp4/MoofParser.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h b/dom/media/mp4/MoofParser.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/MoofParser.h rename to dom/media/mp4/MoofParser.h diff --git a/media/libstagefright/binding/ResourceStream.cpp b/dom/media/mp4/ResourceStream.cpp similarity index 100% rename from media/libstagefright/binding/ResourceStream.cpp rename to dom/media/mp4/ResourceStream.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h b/dom/media/mp4/ResourceStream.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h rename to dom/media/mp4/ResourceStream.h diff --git a/media/libstagefright/binding/SinfParser.cpp b/dom/media/mp4/SinfParser.cpp similarity index 100% rename from media/libstagefright/binding/SinfParser.cpp rename to dom/media/mp4/SinfParser.cpp diff --git a/media/libstagefright/binding/include/mp4_demuxer/SinfParser.h b/dom/media/mp4/SinfParser.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/SinfParser.h rename to dom/media/mp4/SinfParser.h diff --git a/media/libstagefright/binding/include/mp4_demuxer/Stream.h b/dom/media/mp4/Stream.h similarity index 100% rename from media/libstagefright/binding/include/mp4_demuxer/Stream.h rename to dom/media/mp4/Stream.h diff --git a/dom/media/mp4/moz.build b/dom/media/mp4/moz.build index c05272c63302..ada15976f83d 100644 --- a/dom/media/mp4/moz.build +++ b/dom/media/mp4/moz.build @@ -9,12 +9,71 @@ EXPORTS += [ 'MP4Demuxer.h', ] -UNIFIED_SOURCES += [ - 'MP4Decoder.cpp', +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', + ] diff --git a/dom/media/platforms/agnostic/mp4_demuxer/moz.build b/dom/media/platforms/agnostic/mp4_demuxer/moz.build new file mode 100644 index 000000000000..ac0fab58f59e --- /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', + ] diff --git a/media/libstagefright/moz.build b/media/libstagefright/moz.build index 457f1978b04a..c2df41c20957 100644 --- a/media/libstagefright/moz.build +++ b/media/libstagefright/moz.build @@ -7,35 +7,10 @@ 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', ]