MatroskaDecoder.h (1211B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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 #ifndef DOM_MEDIA_WEBM_MATROSKADECODER_H_ 7 #define DOM_MEDIA_WEBM_MATROSKADECODER_H_ 8 9 #include "mozilla/UniquePtr.h" 10 #include "nsTArray.h" 11 12 namespace mozilla { 13 14 class DecoderDoctorDiagnostics; 15 class MediaContainerType; 16 class MediaResult; 17 class TrackInfo; 18 19 class MatroskaDecoder { 20 public: 21 // Returns true if aContainerType is a Matroska type that we think we can 22 // render with an enabled platform decoder backend. 23 static bool IsSupportedType(const MediaContainerType& aContainerType, 24 DecoderDoctorDiagnostics* aDiagnostics); 25 26 static nsTArray<UniquePtr<TrackInfo>> GetTracksInfo( 27 const MediaContainerType& aType); 28 29 static bool IsMatroskaType(const MediaContainerType& aType); 30 31 private: 32 static nsTArray<UniquePtr<TrackInfo>> GetTracksInfo( 33 const MediaContainerType& aType, MediaResult& aError); 34 }; 35 36 } // namespace mozilla 37 38 #endif