Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/platforms/agnostic/WAVDecoder.h
Line
Count
Source (jump to first uncovered line)
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
7
#if !defined(WaveDecoder_h_)
8
#define WaveDecoder_h_
9
10
#include "PlatformDecoderModule.h"
11
12
namespace mozilla {
13
14
DDLoggedTypeDeclNameAndBase(WaveDataDecoder, MediaDataDecoder);
15
16
class WaveDataDecoder
17
  : public MediaDataDecoder
18
  , public DecoderDoctorLifeLogger<WaveDataDecoder>
19
{
20
public:
21
  explicit WaveDataDecoder(const CreateDecoderParams& aParams);
22
23
  // Return true if mimetype is Wave
24
  static bool IsWave(const nsACString& aMimeType);
25
26
  RefPtr<InitPromise> Init() override;
27
  RefPtr<DecodePromise> Decode(MediaRawData* aSample) override;
28
  RefPtr<DecodePromise> Drain() override;
29
  RefPtr<FlushPromise> Flush() override;
30
  RefPtr<ShutdownPromise> Shutdown() override;
31
  nsCString GetDescriptionName() const override
32
0
  {
33
0
    return NS_LITERAL_CSTRING("wave audio decoder");
34
0
  }
35
36
private:
37
  RefPtr<DecodePromise> ProcessDecode(MediaRawData* aSample);
38
  const AudioInfo& mInfo;
39
  const RefPtr<TaskQueue> mTaskQueue;
40
};
41
42
} // namespace mozilla
43
#endif