dom/media/gmp/moz.build
author Chris Pearce <cpearce@mozilla.com>
Fri, 26 Feb 2016 14:01:41 +1300
changeset 330613 0b14f30da67f5cba9c6f6243a0a73dc36ab08b69
parent 330604 f8602e536671b8724251c0e2e39bf7338b4b3562
child 324296 1182c6ecfe5e6e3741c4a2e8b991cd4420579387
permissions -rw-r--r--
Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium We need to not build Widevine by default, and when enabled we will need to be able to ifdef on MOZ_WIDEVINE_EME (see next patch) so that we can not build the code on platforms where it can't possibly work (Android specifcally, as Widevine isn't available as a Chromium plugin there). MozReview-Commit-ID: Avgz5NRcl9v

# -*- Mode: python; c-basic-offset: 4; 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/.

for cdm in CONFIG['MOZ_EME_MODULES']:
    DEFINES['MOZ_%s_EME' % cdm.upper()] = True

XPIDL_MODULE = 'content_geckomediaplugins'

XPIDL_SOURCES += [
    'mozIGeckoMediaPluginChromeService.idl',
    'mozIGeckoMediaPluginService.idl',
]

EXPORTS += [
    'gmp-api/gmp-async-shutdown.h',
    'gmp-api/gmp-audio-codec.h',
    'gmp-api/gmp-audio-decode.h',
    'gmp-api/gmp-audio-host.h',
    'gmp-api/gmp-audio-samples.h',
    'gmp-api/gmp-decryption.h',
    'gmp-api/gmp-entrypoints.h',
    'gmp-api/gmp-errors.h',
    'gmp-api/gmp-platform.h',
    'gmp-api/gmp-storage.h',
    'gmp-api/gmp-video-codec.h',
    'gmp-api/gmp-video-decode.h',
    'gmp-api/gmp-video-encode.h',
    'gmp-api/gmp-video-frame-encoded.h',
    'gmp-api/gmp-video-frame-i420.h',
    'gmp-api/gmp-video-frame.h',
    'gmp-api/gmp-video-host.h',
    'gmp-api/gmp-video-plane.h',
    'GMPAudioDecoderChild.h',
    'GMPAudioDecoderParent.h',
    'GMPAudioDecoderProxy.h',
    'GMPAudioHost.h',
    'GMPCallbackBase.h',
    'GMPChild.h',
    'GMPContentChild.h',
    'GMPContentParent.h',
    'GMPDecryptorChild.h',
    'GMPDecryptorParent.h',
    'GMPDecryptorProxy.h',
    'GMPEncryptedBufferDataImpl.h',
    'GMPLoader.h',
    'GMPMessageUtils.h',
    'GMPParent.h',
    'GMPPlatform.h',
    'GMPProcessChild.h',
    'GMPProcessParent.h',
    'GMPService.h',
    'GMPServiceChild.h',
    'GMPServiceParent.h',
    'GMPSharedMemManager.h',
    'GMPStorageChild.h',
    'GMPStorageParent.h',
    'GMPTimerChild.h',
    'GMPTimerParent.h',
    'GMPUtils.h',
    'GMPVideoDecoderChild.h',
    'GMPVideoDecoderParent.h',
    'GMPVideoDecoderProxy.h',
    'GMPVideoEncodedFrameImpl.h',
    'GMPVideoEncoderChild.h',
    'GMPVideoEncoderParent.h',
    'GMPVideoEncoderProxy.h',
    'GMPVideoHost.h',
    'GMPVideoi420FrameImpl.h',
    'GMPVideoPlaneImpl.h',
]

# We link GMPLoader into xul on B2G/Fennec as its code does not need to be
# covered by a DRM vendor's voucher.
if CONFIG['OS_TARGET'] == 'Android':
    SOURCES += [
      'GMPLoader.cpp',
    ]

UNIFIED_SOURCES += [
    'GMPAudioDecoderChild.cpp',
    'GMPAudioDecoderParent.cpp',
    'GMPAudioHost.cpp',
    'GMPChild.cpp',
    'GMPContentChild.cpp',
    'GMPContentParent.cpp',
    'GMPDecryptorChild.cpp',
    'GMPDecryptorParent.cpp',
    'GMPEncryptedBufferDataImpl.cpp',
    'GMPParent.cpp',
    'GMPPlatform.cpp',
    'GMPProcessChild.cpp',
    'GMPProcessParent.cpp',
    'GMPService.cpp',
    'GMPServiceChild.cpp',
    'GMPServiceParent.cpp',
    'GMPSharedMemManager.cpp',
    'GMPStorageChild.cpp',
    'GMPStorageParent.cpp',
    'GMPTimerChild.cpp',
    'GMPTimerParent.cpp',
    'GMPUtils.cpp',
    'GMPVideoDecoderChild.cpp',
    'GMPVideoDecoderParent.cpp',
    'GMPVideoEncodedFrameImpl.cpp',
    'GMPVideoEncoderChild.cpp',
    'GMPVideoEncoderParent.cpp',
    'GMPVideoHost.cpp',
    'GMPVideoi420FrameImpl.cpp',
    'GMPVideoPlaneImpl.cpp',
]

if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin'):
  DIRS += [
      'rlz',
  ]

if 'widevine' in CONFIG['MOZ_EME_MODULES']:
  DIRS += [
      'widevine-adapter',
  ]

IPDL_SOURCES += [
  'GMPTypes.ipdlh',
  'PGMP.ipdl',
  'PGMPAudioDecoder.ipdl',
  'PGMPContent.ipdl',
  'PGMPDecryptor.ipdl',
  'PGMPService.ipdl',
  'PGMPStorage.ipdl',
  'PGMPTimer.ipdl',
  'PGMPVideoDecoder.ipdl',
  'PGMPVideoEncoder.ipdl',
]

# comment this out to use Unsafe Shmem for more performance
DEFINES['GMP_SAFE_SHMEM'] = True

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'
# media/mtransport so we work with --disable-webrtc
LOCAL_INCLUDES += [
    '/media/mtransport',
    '/xpcom/base',
    '/xpcom/build',
    '/xpcom/threads',
]