Chromium Code Reviews| 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_ |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "media/base/filters.h" | 15 #include "media/base/filters.h" |
| 16 #include "media/base/pipeline_status.h" | 16 #include "media/base/pipeline_status.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class TimeDelta; | 19 class TimeDelta; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace media { | 22 namespace media { |
| 23 | 23 |
| 24 static const char kRawMediaScheme[] = "x-raw-media"; | |
|
scherkus (not reviewing)
2011/06/29 00:39:28
please initialize this in the .cc
.h should have:
Ronghua
2011/06/29 20:36:39
Done.
| |
| 25 | |
| 24 struct PipelineStatistics { | 26 struct PipelineStatistics { |
| 25 PipelineStatistics() : | 27 PipelineStatistics() : |
| 26 audio_bytes_decoded(0), | 28 audio_bytes_decoded(0), |
| 27 video_bytes_decoded(0), | 29 video_bytes_decoded(0), |
| 28 video_frames_decoded(0), | 30 video_frames_decoded(0), |
| 29 video_frames_dropped(0) { | 31 video_frames_dropped(0) { |
| 30 } | 32 } |
| 31 | 33 |
| 32 uint32 audio_bytes_decoded; // Should be uint64? | 34 uint32 audio_bytes_decoded; // Should be uint64? |
| 33 uint32 video_bytes_decoded; // Should be uint64? | 35 uint32 video_bytes_decoded; // Should be uint64? |
| 34 uint32 video_frames_decoded; | 36 uint32 video_frames_decoded; |
| 35 uint32 video_frames_dropped; | 37 uint32 video_frames_dropped; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 class FilterCollection; | 40 class FilterCollection; |
| 39 | 41 |
| 40 class Pipeline : public base::RefCountedThreadSafe<Pipeline> { | 42 class Pipeline : public base::RefCountedThreadSafe<Pipeline> { |
| 41 public: | 43 public: |
| 42 // Initializes pipeline. Pipeline takes ownership of all callbacks passed | 44 // Initializes pipeline. Pipeline takes ownership of all callbacks passed |
| 43 // into this method. | 45 // into this method. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 | 167 |
| 166 protected: | 168 protected: |
| 167 // Only allow ourselves to be deleted by reference counting. | 169 // Only allow ourselves to be deleted by reference counting. |
| 168 friend class base::RefCountedThreadSafe<Pipeline>; | 170 friend class base::RefCountedThreadSafe<Pipeline>; |
| 169 virtual ~Pipeline() {} | 171 virtual ~Pipeline() {} |
| 170 }; | 172 }; |
| 171 | 173 |
| 172 } // namespace media | 174 } // namespace media |
| 173 | 175 |
| 174 #endif // MEDIA_BASE_PIPELINE_H_ | 176 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |