2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2014-05-22 06:42:39 +04:00
|
|
|
# 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/.
|
|
|
|
|
2017-03-07 21:06:45 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Audio/Video: Playback")
|
|
|
|
|
2014-05-22 06:42:39 +04:00
|
|
|
DEFINES['ANDROID_SMP'] = 0
|
2014-11-19 04:29:12 +03:00
|
|
|
DEFINES['LOG_NDEBUG'] = 1
|
2014-05-22 06:42:39 +04:00
|
|
|
|
2014-06-03 15:26:07 +04:00
|
|
|
if CONFIG['OS_TARGET'] != 'WINNT':
|
|
|
|
DEFINES['_GLIBCXX_OS_DEFINES'] = True
|
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
DEFINES['ssize_t'] = 'intptr_t'
|
|
|
|
DEFINES['off64_t'] = 'int64_t'
|
|
|
|
DEFINES['strcasecmp'] = 'stricmp'
|
|
|
|
DEFINES['strncasecmp'] = 'strnicmp'
|
2014-05-22 06:42:39 +04:00
|
|
|
DEFINES['HAVE_MS_C_RUNTIME'] = True
|
|
|
|
DEFINES['__PRETTY_FUNCTION__'] = '__FUNCTION__'
|
|
|
|
LOCAL_INCLUDES += [ 'ports/win32/include' ]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'Darwin':
|
|
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
|
|
|
DEFINES['off64_t'] = 'off_t'
|
|
|
|
LOCAL_INCLUDES += [ 'ports/darwin/include' ]
|
2014-08-05 11:07:28 +04:00
|
|
|
elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'OpenBSD', 'NetBSD',
|
|
|
|
'GNU/kFreeBSD'):
|
|
|
|
if CONFIG['OS_TARGET'] != 'NetBSD':
|
2014-05-23 06:07:29 +04:00
|
|
|
DEFINES['ENODATA'] = '-0x80000003'
|
2014-05-26 08:05:53 +04:00
|
|
|
if CONFIG['OS_TARGET'] == 'OpenBSD':
|
|
|
|
DEFINES['EBADMSG'] = '-0x80000006'
|
2014-05-23 06:07:29 +04:00
|
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
2014-08-05 11:07:28 +04:00
|
|
|
if CONFIG['OS_TARGET'] != 'GNU/kFreeBSD':
|
|
|
|
DEFINES['off64_t'] = 'off_t'
|
|
|
|
LOCAL_INCLUDES += [ 'ports/bsd/include' ]
|
2014-05-22 06:42:39 +04:00
|
|
|
else:
|
|
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
|
|
|
|
2014-05-26 01:20:56 +04:00
|
|
|
if CONFIG['OS_TARGET'] != 'Android':
|
|
|
|
DEFINES['FAKE_LOG_DEVICE'] = True
|
|
|
|
SOURCES += [
|
|
|
|
'system/core/liblog/fake_log_device.c',
|
|
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'system/core/libcutils/strdup16to8.c',
|
|
|
|
'system/core/liblog/logd_write.c',
|
|
|
|
'system/core/liblog/logprint.c',
|
|
|
|
]
|
|
|
|
|
2014-05-22 06:42:39 +04:00
|
|
|
EXPORTS.mp4_demuxer += [
|
2014-10-31 01:43:00 +03:00
|
|
|
'binding/include/mp4_demuxer/Adts.h',
|
2014-06-20 02:59:00 +04:00
|
|
|
'binding/include/mp4_demuxer/AnnexB.h',
|
2015-01-19 11:39:00 +03:00
|
|
|
'binding/include/mp4_demuxer/Atom.h',
|
2014-12-16 08:10:45 +03:00
|
|
|
'binding/include/mp4_demuxer/AtomType.h',
|
2016-08-17 08:27:43 +03:00
|
|
|
'binding/include/mp4_demuxer/BitReader.h',
|
2014-08-26 08:53:48 +04:00
|
|
|
'binding/include/mp4_demuxer/BufferStream.h',
|
|
|
|
'binding/include/mp4_demuxer/ByteReader.h',
|
2014-12-23 06:36:09 +03:00
|
|
|
'binding/include/mp4_demuxer/ByteWriter.h',
|
2014-05-22 06:42:39 +04:00
|
|
|
'binding/include/mp4_demuxer/DecoderData.h',
|
2014-12-24 15:11:35 +03:00
|
|
|
'binding/include/mp4_demuxer/H264.h',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/include/mp4_demuxer/Index.h',
|
2014-06-02 19:38:04 +04:00
|
|
|
'binding/include/mp4_demuxer/Interval.h',
|
2014-08-26 08:53:48 +04:00
|
|
|
'binding/include/mp4_demuxer/MoofParser.h',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/include/mp4_demuxer/MP4Metadata.h',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/include/mp4_demuxer/ResourceStream.h',
|
2015-01-19 11:39:00 +03:00
|
|
|
'binding/include/mp4_demuxer/SinfParser.h',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/include/mp4_demuxer/Stream.h',
|
2014-05-22 06:42:39 +04:00
|
|
|
]
|
|
|
|
|
2015-03-05 07:30:44 +03:00
|
|
|
EXPORTS.demuxer += [
|
|
|
|
'binding/include/demuxer/TrackDemuxer.h',
|
|
|
|
]
|
|
|
|
|
2014-05-22 06:42:39 +04:00
|
|
|
SOURCES += [
|
|
|
|
'frameworks/av/media/libstagefright/foundation/hexdump.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/MetaData.cpp',
|
|
|
|
'system/core/libutils/RefBase.cpp',
|
|
|
|
'system/core/libutils/String16.cpp',
|
|
|
|
'system/core/libutils/String8.cpp',
|
|
|
|
'system/core/libutils/VectorImpl.cpp',
|
|
|
|
]
|
|
|
|
|
2017-05-09 21:36:13 +03:00
|
|
|
EXPORTS += [
|
|
|
|
'binding/include/mp4parse.h',
|
|
|
|
]
|
2015-06-17 01:50:00 +03:00
|
|
|
|
2014-05-22 06:42:39 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'binding/Adts.cpp',
|
|
|
|
'binding/AnnexB.cpp',
|
2016-08-17 08:27:43 +03:00
|
|
|
'binding/BitReader.cpp',
|
2014-08-05 10:12:48 +04:00
|
|
|
'binding/Box.cpp',
|
2014-08-26 08:53:48 +04:00
|
|
|
'binding/BufferStream.cpp',
|
2014-05-22 06:42:39 +04:00
|
|
|
'binding/DecoderData.cpp',
|
2014-12-24 15:11:35 +03:00
|
|
|
'binding/H264.cpp',
|
2014-06-02 19:38:04 +04:00
|
|
|
'binding/Index.cpp',
|
2014-08-05 10:12:48 +04:00
|
|
|
'binding/MoofParser.cpp',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/MP4Metadata.cpp',
|
2015-05-01 08:26:50 +03:00
|
|
|
'binding/ResourceStream.cpp',
|
2015-01-19 11:39:00 +03:00
|
|
|
'binding/SinfParser.cpp',
|
2014-05-22 06:42:39 +04:00
|
|
|
'frameworks/av/media/libstagefright/DataSource.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/ESDS.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/foundation/AAtomizer.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/foundation/ABitReader.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/foundation/ABuffer.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/foundation/AString.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/MediaBuffer.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/MediaDefs.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/MediaSource.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/MPEG4Extractor.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/SampleIterator.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/SampleTable.cpp',
|
|
|
|
'frameworks/av/media/libstagefright/Utils.cpp',
|
|
|
|
'system/core/libutils/SharedBuffer.cpp',
|
|
|
|
'system/core/libutils/Static.cpp',
|
|
|
|
'system/core/libutils/Unicode.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'binding/include',
|
|
|
|
'frameworks/av/include',
|
|
|
|
'frameworks/av/include/media/stagefright/foundation',
|
|
|
|
'frameworks/av/media/libstagefright/',
|
|
|
|
'stubs/empty',
|
|
|
|
'stubs/include',
|
|
|
|
'stubs/include/media/stagefright/foundation',
|
|
|
|
'system/core/include',
|
|
|
|
]
|
|
|
|
|
2014-06-02 19:38:04 +04:00
|
|
|
TEST_DIRS += [
|
|
|
|
'gtest',
|
|
|
|
]
|
|
|
|
|
2015-10-20 04:05:20 +03:00
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2015-08-28 06:44:53 +03:00
|
|
|
ALLOW_COMPILER_WARNINGS = True
|
|
|
|
|
2014-07-23 03:37:51 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2014-05-27 09:31:34 +04:00
|
|
|
|
|
|
|
# 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
|
2014-06-19 22:42:00 +04:00
|
|
|
'-wd4099', # mismatched class/struct tags
|
2014-05-27 09:31:34 +04:00
|
|
|
]
|
|
|
|
elif CONFIG['GNU_CXX']:
|
|
|
|
CFLAGS += [
|
|
|
|
'-Wno-comment',
|
2017-03-08 02:02:45 +03:00
|
|
|
'-Wno-sign-compare',
|
|
|
|
'-Wno-unused-function',
|
2014-05-27 09:31:34 +04:00
|
|
|
]
|
|
|
|
CXXFLAGS += [
|
2017-03-09 00:43:22 +03:00
|
|
|
'-Werror=format',
|
2014-05-27 09:31:34 +04:00
|
|
|
'-Wno-multichar',
|
|
|
|
'-Wno-sign-compare',
|
|
|
|
'-Wno-unused',
|
|
|
|
]
|
|
|
|
if CONFIG['CLANG_CXX']:
|
2014-06-30 07:12:38 +04:00
|
|
|
CXXFLAGS += [
|
|
|
|
'-Wno-mismatched-tags',
|
|
|
|
'-Wno-tautological-constant-out-of-range-compare',
|
2015-03-14 23:47:51 +03:00
|
|
|
'-Wno-unreachable-code-return',
|
2016-07-22 01:58:37 +03:00
|
|
|
'-Wno-implicit-fallthrough',
|
2014-06-30 07:12:38 +04:00
|
|
|
]
|