blob: 62b085c0bb7bff304d3effa1be82970db4f2144f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BASE_MOCK_FFMPEG_H_
#define MEDIA_BASE_MOCK_FFMPEG_H_
#include "testing/gmock/include/gmock/gmock.h"
struct AVCodec;
struct AVCodecContext;
struct AVFrame;
struct AVPacket;
enum CodecID;
namespace media {
class MockFFmpeg {
public:
MOCK_METHOD1(AVCodecFindDecoder, AVCodec*(enum CodecID id));
MOCK_METHOD2(AVCodecOpen, int(AVCodecContext* avctx, AVCodec* codec));
MOCK_METHOD2(AVCodecThreadInit, int(AVCodecContext* avctx, int threads));
// Setter/getter for the global instance of MockFFmpeg.
static void set(MockFFmpeg* instance);
static MockFFmpeg* get();
private:
static MockFFmpeg* instance_;
};
} // namespace media
#endif // MEDIA_BASE_MOCK_FFMPEG_H_
|