LCOV - code coverage report
Current view: top level - dom/media/platforms/agnostic - AOMDecoder.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          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(AOMDecoder_h_)
       7             : #define AOMDecoder_h_
       8             : 
       9             : #include "PlatformDecoderModule.h"
      10             : #include "mozilla/Span.h"
      11             : 
      12             : #include <stdint.h>
      13             : #include "aom/aom_decoder.h"
      14             : 
      15             : namespace mozilla {
      16             : 
      17             : class AOMDecoder : public MediaDataDecoder
      18             : {
      19             : public:
      20             :   explicit AOMDecoder(const CreateDecoderParams& aParams);
      21             : 
      22             :   RefPtr<InitPromise> Init() override;
      23             :   RefPtr<DecodePromise> Decode(MediaRawData* aSample) override;
      24             :   RefPtr<DecodePromise> Drain() override;
      25             :   RefPtr<FlushPromise> Flush() override;
      26             :   RefPtr<ShutdownPromise> Shutdown() override;
      27           0 :   const char* GetDescriptionName() const override
      28             :   {
      29           0 :     return "libaom (AV1) video decoder";
      30             :   }
      31             : 
      32             :   // Return true if aMimeType is a one of the strings used
      33             :   // by our demuxers to identify AV1 streams.
      34             :   static bool IsAV1(const nsACString& aMimeType);
      35             : 
      36             :   // Return true if aCodecType is a supported codec description.
      37             :   static bool IsSupportedCodec(const nsAString& aCodecType);
      38             : 
      39             :   // Return true if a sample is a keyframe.
      40             :   static bool IsKeyframe(Span<const uint8_t> aBuffer);
      41             : 
      42             :   // Return the frame dimensions for a sample.
      43             :   static nsIntSize GetFrameSize(Span<const uint8_t> aBuffer);
      44             : 
      45             : private:
      46             :   ~AOMDecoder();
      47             :   RefPtr<DecodePromise> ProcessDecode(MediaRawData* aSample);
      48             : 
      49             :   const RefPtr<layers::ImageContainer> mImageContainer;
      50             :   const RefPtr<TaskQueue> mTaskQueue;
      51             : 
      52             :   // AOM decoder state
      53             :   aom_codec_ctx_t mCodec;
      54             : 
      55             :   const VideoInfo& mInfo;
      56             : };
      57             : 
      58             : } // namespace mozilla
      59             : 
      60             : #endif // AOMDecoder_h_

Generated by: LCOV version 1.13