| OLD | NEW |
| 1 // Copyright (c) 2010 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 // The pipeline is the public API clients use for playing back media. Clients | 5 // The pipeline is the public API clients use for playing back media. Clients |
| 6 // provide a filter factory containing the filters they want the pipeline to | 6 // provide a filter factory containing the filters they want the pipeline to |
| 7 // use to render media. | 7 // use to render media. |
| 8 | 8 |
| 9 #ifndef MEDIA_BASE_PIPELINE_H_ | 9 #ifndef MEDIA_BASE_PIPELINE_H_ |
| 10 #define MEDIA_BASE_PIPELINE_H_ | 10 #define MEDIA_BASE_PIPELINE_H_ |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "media/base/factory.h" | 15 #include "media/base/factory.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class TimeDelta; | 18 class TimeDelta; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace media { | 21 namespace media { |
| 22 | 22 |
| 23 // Error definitions for pipeline. All codes indicate an error except: | 23 // Error definitions for pipeline. All codes indicate an error except: |
| 24 // PIPELINE_OK indicates the pipeline is running normally. | 24 // PIPELINE_OK indicates the pipeline is running normally. |
| 25 // PIPELINE_STOPPING is used internally when Pipeline::Stop() is called. | |
| 26 enum PipelineError { | 25 enum PipelineError { |
| 27 PIPELINE_OK, | 26 PIPELINE_OK, |
| 28 PIPELINE_STOPPING, | |
| 29 PIPELINE_ERROR_URL_NOT_FOUND, | 27 PIPELINE_ERROR_URL_NOT_FOUND, |
| 30 PIPELINE_ERROR_NETWORK, | 28 PIPELINE_ERROR_NETWORK, |
| 31 PIPELINE_ERROR_DECODE, | 29 PIPELINE_ERROR_DECODE, |
| 32 PIPELINE_ERROR_ABORT, | 30 PIPELINE_ERROR_ABORT, |
| 33 PIPELINE_ERROR_INITIALIZATION_FAILED, | 31 PIPELINE_ERROR_INITIALIZATION_FAILED, |
| 34 PIPELINE_ERROR_REQUIRED_FILTER_MISSING, | 32 PIPELINE_ERROR_REQUIRED_FILTER_MISSING, |
| 35 PIPELINE_ERROR_OUT_OF_MEMORY, | 33 PIPELINE_ERROR_OUT_OF_MEMORY, |
| 36 PIPELINE_ERROR_COULD_NOT_RENDER, | 34 PIPELINE_ERROR_COULD_NOT_RENDER, |
| 37 PIPELINE_ERROR_READ, | 35 PIPELINE_ERROR_READ, |
| 38 PIPELINE_ERROR_AUDIO_HARDWARE, | 36 PIPELINE_ERROR_AUDIO_HARDWARE, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 159 |
| 162 protected: | 160 protected: |
| 163 // Only allow ourselves to be deleted by reference counting. | 161 // Only allow ourselves to be deleted by reference counting. |
| 164 friend class base::RefCountedThreadSafe<Pipeline>; | 162 friend class base::RefCountedThreadSafe<Pipeline>; |
| 165 virtual ~Pipeline() {} | 163 virtual ~Pipeline() {} |
| 166 }; | 164 }; |
| 167 | 165 |
| 168 } // namespace media | 166 } // namespace media |
| 169 | 167 |
| 170 #endif // MEDIA_BASE_PIPELINE_H_ | 168 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |