Chromium Code Reviews| Index: media/mojo/services/media_type_converters.h |
| diff --git a/media/mojo/services/media_type_converters.h b/media/mojo/services/media_type_converters.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fdb418e05e0a22c4a714c8c80f7feba047891e78 |
| --- /dev/null |
| +++ b/media/mojo/services/media_type_converters.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_ |
| +#define MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "media/mojo/interfaces/media_types.mojom.h" |
| + |
| +namespace media { |
| +class DecoderBuffer; |
| +} |
| + |
| +namespace mojo { |
| + |
| +template <> |
| +class TypeConverter<MediaDecoderBufferPtr, |
| + scoped_refptr<media::DecoderBuffer> > { |
| + public: |
| + static MediaDecoderBufferPtr ConvertFrom( |
| + const scoped_refptr<media::DecoderBuffer> input); |
|
scherkus (not reviewing)
2014/09/02 23:50:20
const-& ?
xhwang
2014/09/03 00:09:08
nit: in media code, we pass scoped_refptr by const
tim (not reviewing)
2014/09/03 00:43:50
Oops. Syntactically valid typo :( Fixed.
|
| + static scoped_refptr<media::DecoderBuffer> ConvertTo( |
| + const MediaDecoderBufferPtr& input); |
| +}; |
| + |
| +} // namespace mojo |
| + |
| +#endif // MEDIA_MOJO_SERVICES_MEDIA_TYPE_CONVERTERS_H_ |