| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ | 5 #ifndef MEDIA_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ |
| 6 #define MEDIA_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ | 6 #define MEDIA_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/mojo/interfaces/content_decryption_module.mojom.h" | 10 #include "media/mojo/interfaces/content_decryption_module.mojom.h" |
| 11 #include "media/mojo/interfaces/media_types.mojom.h" | 11 #include "media/mojo/interfaces/media_types.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/type_converter.h" | 12 #include "mojo/public/cpp/bindings/type_converter.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 class AudioBuffer; | 15 class AudioBuffer; |
| 16 class AudioDecoderConfig; | 16 class AudioDecoderConfig; |
| 17 class DecoderBuffer; | 17 class DecoderBuffer; |
| 18 class DecryptConfig; | 18 class DecryptConfig; |
| 19 class EncryptionScheme; | |
| 20 class VideoDecoderConfig; | 19 class VideoDecoderConfig; |
| 21 class VideoFrame; | 20 class VideoFrame; |
| 22 struct CdmConfig; | 21 struct CdmConfig; |
| 23 struct CdmKeyInformation; | 22 struct CdmKeyInformation; |
| 24 struct SubsampleEntry; | 23 struct SubsampleEntry; |
| 25 } | 24 } |
| 26 | 25 |
| 27 // These are specializations of mojo::TypeConverter and have to be in the mojo | 26 // These are specializations of mojo::TypeConverter and have to be in the mojo |
| 28 // namespace. | 27 // namespace. |
| 29 namespace mojo { | 28 namespace mojo { |
| 30 | 29 |
| 31 template <> | 30 template <> |
| 32 struct TypeConverter<media::interfaces::EncryptionSchemePtr, | |
| 33 media::EncryptionScheme> { | |
| 34 static media::interfaces::EncryptionSchemePtr Convert( | |
| 35 const media::EncryptionScheme& input); | |
| 36 }; | |
| 37 template <> | |
| 38 struct TypeConverter<media::EncryptionScheme, | |
| 39 media::interfaces::EncryptionSchemePtr> { | |
| 40 static media::EncryptionScheme Convert( | |
| 41 const media::interfaces::EncryptionSchemePtr& input); | |
| 42 }; | |
| 43 | |
| 44 template <> | |
| 45 struct TypeConverter<media::interfaces::SubsampleEntryPtr, | 31 struct TypeConverter<media::interfaces::SubsampleEntryPtr, |
| 46 media::SubsampleEntry> { | 32 media::SubsampleEntry> { |
| 47 static media::interfaces::SubsampleEntryPtr Convert( | 33 static media::interfaces::SubsampleEntryPtr Convert( |
| 48 const media::SubsampleEntry& input); | 34 const media::SubsampleEntry& input); |
| 49 }; | 35 }; |
| 50 template <> | 36 template <> |
| 51 struct TypeConverter<media::SubsampleEntry, | 37 struct TypeConverter<media::SubsampleEntry, |
| 52 media::interfaces::SubsampleEntryPtr> { | 38 media::interfaces::SubsampleEntryPtr> { |
| 53 static media::SubsampleEntry Convert( | 39 static media::SubsampleEntry Convert( |
| 54 const media::interfaces::SubsampleEntryPtr& input); | 40 const media::interfaces::SubsampleEntryPtr& input); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 template <> | 136 template <> |
| 151 struct TypeConverter<scoped_refptr<media::VideoFrame>, | 137 struct TypeConverter<scoped_refptr<media::VideoFrame>, |
| 152 media::interfaces::VideoFramePtr> { | 138 media::interfaces::VideoFramePtr> { |
| 153 static scoped_refptr<media::VideoFrame> Convert( | 139 static scoped_refptr<media::VideoFrame> Convert( |
| 154 const media::interfaces::VideoFramePtr& input); | 140 const media::interfaces::VideoFramePtr& input); |
| 155 }; | 141 }; |
| 156 | 142 |
| 157 } // namespace mojo | 143 } // namespace mojo |
| 158 | 144 |
| 159 #endif // MEDIA_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ | 145 #endif // MEDIA_MOJO_COMMON_MEDIA_TYPE_CONVERTERS_H_ |
| OLD | NEW |