| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 collection containing the filters they want the pipeline to | 6 // provide a filter collection 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_ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 uint32 audio_bytes_decoded; // Should be uint64? | 31 uint32 audio_bytes_decoded; // Should be uint64? |
| 32 uint32 video_bytes_decoded; // Should be uint64? | 32 uint32 video_bytes_decoded; // Should be uint64? |
| 33 uint32 video_frames_decoded; | 33 uint32 video_frames_decoded; |
| 34 uint32 video_frames_dropped; | 34 uint32 video_frames_dropped; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 class FilterCollection; | 37 class FilterCollection; |
| 38 | 38 |
| 39 class Pipeline : public base::RefCountedThreadSafe<Pipeline> { | 39 class MEDIA_EXPORT Pipeline : public base::RefCountedThreadSafe<Pipeline> { |
| 40 public: | 40 public: |
| 41 // Initializes pipeline. Pipeline takes ownership of all callbacks passed | 41 // Initializes pipeline. Pipeline takes ownership of all callbacks passed |
| 42 // into this method. | 42 // into this method. |
| 43 // |ended_callback| will be executed when the media reaches the end. | 43 // |ended_callback| will be executed when the media reaches the end. |
| 44 // |error_callback_| will be executed upon an error in the pipeline. | 44 // |error_callback_| will be executed upon an error in the pipeline. |
| 45 // |network_callback_| will be executed when there's a network event. | 45 // |network_callback_| will be executed when there's a network event. |
| 46 virtual void Init(const PipelineStatusCB& ended_callback, | 46 virtual void Init(const PipelineStatusCB& ended_callback, |
| 47 const PipelineStatusCB& error_callback, | 47 const PipelineStatusCB& error_callback, |
| 48 const PipelineStatusCB& network_callback) = 0; | 48 const PipelineStatusCB& network_callback) = 0; |
| 49 | 49 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 // Only allow ourselves to be deleted by reference counting. | 166 // Only allow ourselves to be deleted by reference counting. |
| 167 friend class base::RefCountedThreadSafe<Pipeline>; | 167 friend class base::RefCountedThreadSafe<Pipeline>; |
| 168 virtual ~Pipeline() {} | 168 virtual ~Pipeline() {} |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace media | 171 } // namespace media |
| 172 | 172 |
| 173 #endif // MEDIA_BASE_PIPELINE_H_ | 173 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |