XiphExtradata.h 1.1 KB

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