MatroskaDemuxer.h (1291B)
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_MATROSKADEMUXER_H_ 7 #define DOM_MEDIA_WEBM_MATROSKADEMUXER_H_ 8 9 #include "WebMDemuxer.h" 10 11 namespace mozilla { 12 13 // WebM is a subset of Matroska, so we can build a Matroska demuxer on top of 14 // the WebM demuxer, and support more features which are not included in WebM. 15 // Currently the only differences are the codecs supported, besides that, all 16 // other parts are the same. The track demuxer is also the same as WebM's. 17 class MatroskaDemuxer : public WebMDemuxer { 18 public: 19 explicit MatroskaDemuxer(MediaResource* aResource); 20 21 private: 22 nsresult SetVideoCodecInfo(nestegg* aContext, int aTrackId) override; 23 nsresult SetAudioCodecInfo(nestegg* aContext, int aTrackId, 24 const nestegg_audio_params& aParams) override; 25 bool CheckKeyFrameByExamineByteStream(const MediaRawData* aSample) override; 26 27 nsresult SetCodecPrivateToVideoExtraData(nestegg* aContext, int aTrackId); 28 }; 29 30 } // namespace mozilla 31 32 #endif