Home | History | Annotate | Download | only in services
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_
      6 #define MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_
      7 
      8 #include "base/memory/ref_counted.h"
      9 #include "media/mojo/interfaces/media_types.mojom.h"
     10 
     11 namespace media {
     12 class AudioDecoderConfig;
     13 class DecoderBuffer;
     14 }
     15 
     16 namespace mojo {
     17 
     18 template <>
     19 struct TypeConverter<MediaDecoderBufferPtr,
     20                      scoped_refptr<media::DecoderBuffer> > {
     21   static MediaDecoderBufferPtr Convert(
     22       const scoped_refptr<media::DecoderBuffer>& input);
     23 };
     24 template<>
     25 struct TypeConverter<scoped_refptr<media::DecoderBuffer>,
     26                      MediaDecoderBufferPtr> {
     27   static scoped_refptr<media::DecoderBuffer> Convert(
     28       const MediaDecoderBufferPtr& input);
     29 };
     30 
     31 template <>
     32 struct TypeConverter<AudioDecoderConfigPtr, media::AudioDecoderConfig> {
     33   static AudioDecoderConfigPtr Convert(const media::AudioDecoderConfig& input);
     34 };
     35 template <>
     36 struct TypeConverter<media::AudioDecoderConfig, AudioDecoderConfigPtr> {
     37   static media::AudioDecoderConfig Convert(const AudioDecoderConfigPtr& input);
     38 };
     39 
     40 }  // namespace mojo
     41 
     42 #endif  // MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_
     43