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

Side by Side Diff: media/filters/fake_video_decoder.h

Issue 1834303005: Refactor audio and video decoder status into common file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 8 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
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/filters/fake_video_decoder.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FILTERS_FAKE_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 enum State { 79 enum State {
80 STATE_UNINITIALIZED, 80 STATE_UNINITIALIZED,
81 STATE_NORMAL, 81 STATE_NORMAL,
82 STATE_END_OF_STREAM, 82 STATE_END_OF_STREAM,
83 STATE_ERROR, 83 STATE_ERROR,
84 }; 84 };
85 85
86 // Callback for updating |total_bytes_decoded_|. 86 // Callback for updating |total_bytes_decoded_|.
87 void OnFrameDecoded(int buffer_size, 87 void OnFrameDecoded(int buffer_size,
88 const DecodeCB& decode_cb, 88 const DecodeCB& decode_cb,
89 Status status); 89 DecodeStatus status);
90 90
91 // Runs |decode_cb| or puts it to |held_decode_callbacks_| depending on 91 // Runs |decode_cb| or puts it to |held_decode_callbacks_| depending on
92 // current value of |hold_decode_|. 92 // current value of |hold_decode_|.
93 void RunOrHoldDecode(const DecodeCB& decode_cb); 93 void RunOrHoldDecode(const DecodeCB& decode_cb);
94 94
95 // Runs |decode_cb| with a frame from |decoded_frames_|. 95 // Runs |decode_cb| with a frame from |decoded_frames_|.
96 void RunDecodeCallback(const DecodeCB& decode_cb); 96 void RunDecodeCallback(const DecodeCB& decode_cb);
97 97
98 void DoReset(); 98 void DoReset();
99 99
(...skipping 23 matching lines...) Expand all
123 123
124 // NOTE: Weak pointers must be invalidated before all other member variables. 124 // NOTE: Weak pointers must be invalidated before all other member variables.
125 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; 125 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); 127 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder);
128 }; 128 };
129 129
130 } // namespace media 130 } // namespace media
131 131
132 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ 132 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/filters/fake_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698