OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PIPELINE_INTEGRATION_TEST_BASE_H_ | 5 #ifndef MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ |
6 #define MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ | 6 #define MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ |
7 | 7 |
8 #include "base/md5.h" | 8 #include "base/md5.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "media/audio/clockless_audio_sink.h" | 10 #include "media/audio/clockless_audio_sink.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bool ended_; | 96 bool ended_; |
97 PipelineStatus pipeline_status_; | 97 PipelineStatus pipeline_status_; |
98 NeedKeyCB need_key_cb_; | 98 NeedKeyCB need_key_cb_; |
99 VideoFrame::Format last_video_frame_format_; | 99 VideoFrame::Format last_video_frame_format_; |
100 | 100 |
101 void OnStatusCallbackChecked(PipelineStatus expected_status, | 101 void OnStatusCallbackChecked(PipelineStatus expected_status, |
102 PipelineStatus status); | 102 PipelineStatus status); |
103 void OnStatusCallback(PipelineStatus status); | 103 void OnStatusCallback(PipelineStatus status); |
104 PipelineStatusCB QuitOnStatusCB(PipelineStatus expected_status); | 104 PipelineStatusCB QuitOnStatusCB(PipelineStatus expected_status); |
105 void DemuxerNeedKeyCB(const std::string& type, | 105 void DemuxerNeedKeyCB(const std::string& type, |
106 scoped_ptr<uint8[]> init_data, int init_data_size); | 106 const std::vector<uint8>& init_data); |
107 void set_need_key_cb(const NeedKeyCB& need_key_cb) { | 107 void set_need_key_cb(const NeedKeyCB& need_key_cb) { |
108 need_key_cb_ = need_key_cb; | 108 need_key_cb_ = need_key_cb; |
109 } | 109 } |
110 | 110 |
111 void OnEnded(); | 111 void OnEnded(); |
112 void OnError(PipelineStatus status); | 112 void OnError(PipelineStatus status); |
113 void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time); | 113 void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time); |
114 scoped_ptr<FilterCollection> CreateFilterCollection( | 114 scoped_ptr<FilterCollection> CreateFilterCollection( |
115 scoped_ptr<Demuxer> demuxer, Decryptor* decryptor); | 115 scoped_ptr<Demuxer> demuxer, Decryptor* decryptor); |
116 | 116 |
117 void SetDecryptor(Decryptor* decryptor, | 117 void SetDecryptor(Decryptor* decryptor, |
118 const DecryptorReadyCB& decryptor_ready_cb); | 118 const DecryptorReadyCB& decryptor_ready_cb); |
119 void OnVideoRendererPaint(const scoped_refptr<VideoFrame>& frame); | 119 void OnVideoRendererPaint(const scoped_refptr<VideoFrame>& frame); |
120 | 120 |
121 MOCK_METHOD1(OnSetOpaque, void(bool)); | 121 MOCK_METHOD1(OnSetOpaque, void(bool)); |
122 MOCK_METHOD1(OnBufferingState, void(Pipeline::BufferingState)); | 122 MOCK_METHOD1(OnBufferingState, void(Pipeline::BufferingState)); |
123 }; | 123 }; |
124 | 124 |
125 } // namespace media | 125 } // namespace media |
126 | 126 |
127 #endif // MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ | 127 #endif // MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ |
OLD | NEW |