Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: media/base/mock_ffmpeg.h

Issue 6541037: Revert 75444 - Move MockFFmpeg instance setting into the constructor/destruct... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/mock_ffmpeg.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MOCK_FFMPEG_H_ 5 #ifndef MEDIA_BASE_MOCK_FFMPEG_H_
6 #define MEDIA_BASE_MOCK_FFMPEG_H_ 6 #define MEDIA_BASE_MOCK_FFMPEG_H_
7 7
8 // TODO(scherkus): See if we can remove ffmpeg_common from this file. 8 // TODO(scherkus): See if we can remove ffmpeg_common from this file.
9 #include "media/ffmpeg/ffmpeg_common.h" 9 #include "media/ffmpeg/ffmpeg_common.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 11
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 MOCK_METHOD2(AVNewPacket, int(AVPacket* packet, int size)); 58 MOCK_METHOD2(AVNewPacket, int(AVPacket* packet, int size));
59 MOCK_METHOD1(AVFreePacket, void(AVPacket* packet)); 59 MOCK_METHOD1(AVFreePacket, void(AVPacket* packet));
60 MOCK_METHOD1(AVFree, void(void* ptr)); 60 MOCK_METHOD1(AVFree, void(void* ptr));
61 MOCK_METHOD1(AVDupPacket, int(AVPacket* packet)); 61 MOCK_METHOD1(AVDupPacket, int(AVPacket* packet));
62 62
63 MOCK_METHOD1(AVLogSetLevel, void(int level)); 63 MOCK_METHOD1(AVLogSetLevel, void(int level));
64 64
65 // Used for verifying check points during tests. 65 // Used for verifying check points during tests.
66 MOCK_METHOD1(CheckPoint, void(int id)); 66 MOCK_METHOD1(CheckPoint, void(int id));
67 67
68 // Returns the current MockFFmpeg instance. 68 // Setter/getter for the global instance of MockFFmpeg.
69 static void set(MockFFmpeg* instance);
69 static MockFFmpeg* get(); 70 static MockFFmpeg* get();
70 71
71 // Returns the URLProtocol registered by the FFmpegGlue singleton. 72 // Returns the URLProtocol registered by the FFmpegGlue singleton.
72 static URLProtocol* protocol(); 73 static URLProtocol* protocol();
73 74
74 // AVPacket destructor for packets allocated by av_new_packet(). 75 // AVPacket destructor for packets allocated by av_new_packet().
75 static void DestructPacket(AVPacket* packet); 76 static void DestructPacket(AVPacket* packet);
76 77
77 // Modifies the number of outstanding packets. 78 // Modifies the number of outstanding packets.
78 void inc_outstanding_packets(); 79 void inc_outstanding_packets();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 arg0->destruct(arg0); 140 arg0->destruct(arg0);
140 } 141 }
141 142
142 // Decrement number of packets allocated. 143 // Decrement number of packets allocated.
143 MockFFmpeg::get()->dec_outstanding_packets(); 144 MockFFmpeg::get()->dec_outstanding_packets();
144 } 145 }
145 146
146 } // namespace media 147 } // namespace media
147 148
148 #endif // MEDIA_BASE_MOCK_FFMPEG_H_ 149 #endif // MEDIA_BASE_MOCK_FFMPEG_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/mock_ffmpeg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698