OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |