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 : #ifndef MP3Decoder_h_
7 : #define MP3Decoder_h_
8 :
9 : #include "ChannelMediaDecoder.h"
10 :
11 : namespace mozilla {
12 :
13 : class MediaContainerType;
14 :
15 0 : class MP3Decoder : public ChannelMediaDecoder
16 : {
17 : public:
18 : // MediaDecoder interface.
19 0 : explicit MP3Decoder(MediaDecoderInit& aInit)
20 0 : : ChannelMediaDecoder(aInit)
21 : {
22 0 : }
23 : ChannelMediaDecoder* Clone(MediaDecoderInit& aInit) override;
24 : MediaDecoderStateMachine* CreateStateMachine() override;
25 :
26 : // Returns true if the MP3 backend is preffed on, and we're running on a
27 : // platform that is likely to have decoders for the format.
28 : static bool IsEnabled();
29 : static bool IsSupportedType(const MediaContainerType& aContainerType);
30 : };
31 :
32 : } // namespace mozilla
33 :
34 : #endif
|