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_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ | 5 #ifndef MEDIA_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ |
6 #define MEDIA_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ | 6 #define MEDIA_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "media/cast/cast_config.h" | 10 #include "media/cast/cast_config.h" |
11 #include "media/cast/cast_environment.h" | 11 #include "media/cast/cast_environment.h" |
12 #include "media/cast/cast_receiver.h" | 12 #include "media/cast/cast_receiver.h" |
13 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" | 13 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" |
14 | 14 |
15 typedef struct vpx_codec_ctx vpx_dec_ctx_t; | 15 typedef struct vpx_codec_ctx vpx_dec_ctx_t; |
16 | 16 |
| 17 // TODO(mikhal): Look into reusing VpxVideoDecoder. |
17 namespace media { | 18 namespace media { |
18 namespace cast { | 19 namespace cast { |
19 | 20 |
20 // This class is not thread safe; it's only called from the cast video decoder | 21 // This class is not thread safe; it's only called from the cast video decoder |
21 // thread. | 22 // thread. |
22 class Vp8Decoder : public base::NonThreadSafe { | 23 class Vp8Decoder : public base::NonThreadSafe { |
23 public: | 24 public: |
24 Vp8Decoder(int number_of_cores, | 25 Vp8Decoder(int number_of_cores, |
25 scoped_refptr<CastEnvironment> cast_environment); | 26 scoped_refptr<CastEnvironment> cast_environment); |
26 ~Vp8Decoder(); | 27 ~Vp8Decoder(); |
(...skipping 11 matching lines...) Expand all Loading... |
38 void InitDecode(int number_of_cores); | 39 void InitDecode(int number_of_cores); |
39 | 40 |
40 scoped_ptr<vpx_dec_ctx_t> decoder_; | 41 scoped_ptr<vpx_dec_ctx_t> decoder_; |
41 scoped_refptr<CastEnvironment> cast_environment_; | 42 scoped_refptr<CastEnvironment> cast_environment_; |
42 }; | 43 }; |
43 | 44 |
44 } // namespace cast | 45 } // namespace cast |
45 } // namespace media | 46 } // namespace media |
46 | 47 |
47 #endif // MEDIA_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ | 48 #endif // MEDIA_CAST_RTP_RECEVIER_CODECS_VP8_VP8_DECODER_H_ |
OLD | NEW |