| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CDM_PPAPI_CDM_HELPERS_H_ | 5 #ifndef MEDIA_CDM_PPAPI_CDM_HELPERS_H_ |
| 6 #define MEDIA_CDM_PPAPI_CDM_HELPERS_H_ | 6 #define MEDIA_CDM_PPAPI_CDM_HELPERS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // of the surface divided by the horizontal sampling period. Note that | 173 // of the surface divided by the horizontal sampling period. Note that |
| 174 // strides can be negative. | 174 // strides can be negative. |
| 175 uint32_t strides_[kMaxPlanes]; | 175 uint32_t strides_[kMaxPlanes]; |
| 176 | 176 |
| 177 // Presentation timestamp in microseconds. | 177 // Presentation timestamp in microseconds. |
| 178 int64_t timestamp_; | 178 int64_t timestamp_; |
| 179 | 179 |
| 180 DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl); | 180 DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl); |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 class AudioFramesImpl : public cdm::AudioFrames_2 { | 183 class AudioFramesImpl : public cdm::AudioFrames { |
| 184 public: | 184 public: |
| 185 AudioFramesImpl() : buffer_(NULL), format_(cdm::kUnknownAudioFormat) {} | 185 AudioFramesImpl() : buffer_(NULL), format_(cdm::kUnknownAudioFormat) {} |
| 186 virtual ~AudioFramesImpl() { | 186 virtual ~AudioFramesImpl() { |
| 187 if (buffer_) | 187 if (buffer_) |
| 188 buffer_->Destroy(); | 188 buffer_->Destroy(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 // AudioFrames implementation. | 191 // AudioFrames implementation. |
| 192 virtual void SetFrameBuffer(cdm::Buffer* buffer) override { | 192 virtual void SetFrameBuffer(cdm::Buffer* buffer) override { |
| 193 buffer_ = static_cast<PpbBuffer*>(buffer); | 193 buffer_ = static_cast<PpbBuffer*>(buffer); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 211 private: | 211 private: |
| 212 PpbBuffer* buffer_; | 212 PpbBuffer* buffer_; |
| 213 cdm::AudioFormat format_; | 213 cdm::AudioFormat format_; |
| 214 | 214 |
| 215 DISALLOW_COPY_AND_ASSIGN(AudioFramesImpl); | 215 DISALLOW_COPY_AND_ASSIGN(AudioFramesImpl); |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 } // namespace media | 218 } // namespace media |
| 219 | 219 |
| 220 #endif // MEDIA_CDM_PPAPI_CDM_HELPERS_H_ | 220 #endif // MEDIA_CDM_PPAPI_CDM_HELPERS_H_ |
| OLD | NEW |