1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #if !defined(XiphExtradata_h)
7 # define XiphExtradata_h
9 # include "MediaData.h"
13 /* This converts a list of headers to the canonical form of extradata for Xiph
14 codecs in non-Ogg containers. We use it to pass those headers from demuxer
15 to decoder even when demuxing from an Ogg cotainer. */
16 bool XiphHeadersToExtradata(MediaByteBuffer
* aCodecSpecificConfig
,
17 const nsTArray
<const unsigned char*>& aHeaders
,
18 const nsTArray
<size_t>& aHeaderLens
);
20 /* This converts a set of extradata back into a list of headers. */
21 bool XiphExtradataToHeaders(nsTArray
<unsigned char*>& aHeaders
,
22 nsTArray
<size_t>& aHeaderLens
, unsigned char* aData
,
25 } // namespace mozilla
27 #endif // XiphExtradata_h