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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 #include "media/audio/null_audio_sink.h" | 10 #include "media/audio/null_audio_sink.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // after playback completes. Pipeline must have been started with hashing | 69 // after playback completes. Pipeline must have been started with hashing |
70 // enabled. | 70 // enabled. |
71 std::string GetAudioHash(); | 71 std::string GetAudioHash(); |
72 | 72 |
73 protected: | 73 protected: |
74 base::MessageLoop message_loop_; | 74 base::MessageLoop message_loop_; |
75 base::MD5Context md5_context_; | 75 base::MD5Context md5_context_; |
76 bool hashing_enabled_; | 76 bool hashing_enabled_; |
77 scoped_ptr<Demuxer> demuxer_; | 77 scoped_ptr<Demuxer> demuxer_; |
78 scoped_ptr<DataSource> data_source_; | 78 scoped_ptr<DataSource> data_source_; |
79 scoped_refptr<Pipeline> pipeline_; | 79 scoped_ptr<Pipeline> pipeline_; |
80 scoped_refptr<NullAudioSink> audio_sink_; | 80 scoped_refptr<NullAudioSink> audio_sink_; |
81 bool ended_; | 81 bool ended_; |
82 PipelineStatus pipeline_status_; | 82 PipelineStatus pipeline_status_; |
83 NeedKeyCB need_key_cb_; | 83 NeedKeyCB need_key_cb_; |
84 | 84 |
85 void OnStatusCallbackChecked(PipelineStatus expected_status, | 85 void OnStatusCallbackChecked(PipelineStatus expected_status, |
86 PipelineStatus status); | 86 PipelineStatus status); |
87 void OnStatusCallback(PipelineStatus status); | 87 void OnStatusCallback(PipelineStatus status); |
88 PipelineStatusCB QuitOnStatusCB(PipelineStatus expected_status); | 88 PipelineStatusCB QuitOnStatusCB(PipelineStatus expected_status); |
89 void DemuxerNeedKeyCB(const std::string& type, | 89 void DemuxerNeedKeyCB(const std::string& type, |
(...skipping 11 matching lines...) Expand all Loading... |
101 const DecryptorReadyCB& decryptor_ready_cb); | 101 const DecryptorReadyCB& decryptor_ready_cb); |
102 void OnVideoRendererPaint(const scoped_refptr<VideoFrame>& frame); | 102 void OnVideoRendererPaint(const scoped_refptr<VideoFrame>& frame); |
103 | 103 |
104 MOCK_METHOD1(OnSetOpaque, void(bool)); | 104 MOCK_METHOD1(OnSetOpaque, void(bool)); |
105 MOCK_METHOD1(OnBufferingState, void(Pipeline::BufferingState)); | 105 MOCK_METHOD1(OnBufferingState, void(Pipeline::BufferingState)); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace media | 108 } // namespace media |
109 | 109 |
110 #endif // MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ | 110 #endif // MEDIA_FILTERS_PIPELINE_INTEGRATION_TEST_BASE_H_ |
OLD | NEW |