Line data Source code
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 : #if !defined(OggDecoder_h_)
7 : #define OggDecoder_h_
8 :
9 : #include "ChannelMediaDecoder.h"
10 :
11 : namespace mozilla {
12 :
13 : class MediaContainerType;
14 :
15 0 : class OggDecoder : public ChannelMediaDecoder
16 : {
17 : public:
18 0 : explicit OggDecoder(MediaDecoderInit& aInit)
19 0 : : ChannelMediaDecoder(aInit)
20 0 : {}
21 :
22 0 : ChannelMediaDecoder* Clone(MediaDecoderInit& aInit) override
23 : {
24 0 : if (!IsOggEnabled()) {
25 0 : return nullptr;
26 : }
27 0 : return new OggDecoder(aInit);
28 : }
29 : MediaDecoderStateMachine* CreateStateMachine() override;
30 :
31 : // Returns true if aContainerType is an Ogg type that we think we can render
32 : // with an enabled platform decoder backend.
33 : // If provided, codecs are checked for support.
34 : static bool IsSupportedType(const MediaContainerType& aContainerType);
35 : };
36 :
37 : } // namespace mozilla
38 :
39 : #endif
|