gecko-dev/dom/media/encoder/moz.build
Andreas Pehrson 8491bedfad Bug 1014393 - Break out muxing and queueing of track data from MediaEncoder to new Muxer class. r=bryce
This first of all does some refactoring of how metadata is encoded in
MediaEncoder. This is now guided by the new Muxer class. If we're ready to pass
data to the muxer and it does not have metadata yet, we provide metadata before
giving it any media data. This metadata is passed to the muxer in a single call.
The metadata provided in this call must stay valid for the entire recording.
This removes MediaEncoder::GetEncodedMetadata().

This also removes the ctor argument from the WebMWriter since it can now rely on
the single SetMetadata() instead.
To comply with the ContainerWriter::SetMetadata() docs,
WebMWriter::SetMetadata() will now also sanity check metadata.

ContainerWriter instances are updated somewhat, to accommodate these changes.

Lastly, and most important, the new Muxer class manages muxing of the (up to)
two tracks into a single container, ensuring that timestamps increase
monotonically throughout a recording.

Differential Revision: https://phabricator.services.mozilla.com/D35306

--HG--
extra : moz-landing-system : lando
2019-08-03 17:27:14 +00:00

49 lines
1.2 KiB
Python

# -*- 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: Recording')
EXPORTS += [
'ContainerWriter.h',
'EncodedFrame.h',
'MediaEncoder.h',
'OpusTrackEncoder.h',
'TrackEncoder.h',
'TrackMetadataBase.h',
]
UNIFIED_SOURCES += [
'MediaEncoder.cpp',
'Muxer.cpp',
'OpusTrackEncoder.cpp',
'TrackEncoder.cpp',
]
if CONFIG['MOZ_WEBM_ENCODER']:
EXPORTS += ['VP8TrackEncoder.h',
]
UNIFIED_SOURCES += ['VP8TrackEncoder.cpp',
]
LOCAL_INCLUDES += ['/media/libyuv/libyuv/include']
DEFINES['TRACING'] = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/dom/media',
'/ipc/chromium/src',
]
include('/ipc/chromium/chromium-config.mozbuild')
# Suppress some GCC warnings being treated as errors:
# - about attributes on forward declarations for types that are already
# defined, which complains about an important MOZ_EXPORT for android::AString
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
CXXFLAGS += ['-Wno-error=attributes']