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_VIDEO_RECEIVER_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_RECEIVER_VIDEO_DECODER_H_ |
6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_DECODER_H_ | 6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_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_receiver.h" | 11 #include "media/cast/cast_receiver.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
14 namespace cast { | 14 namespace cast { |
15 | 15 |
16 class Vp8Decoder; | 16 class Vp8Decoder; |
17 | 17 |
18 // This class is not thread safe; it's only called from the cast video decoder | 18 // This class is not thread safe; it's only called from the cast video decoder |
19 // thread. | 19 // thread. |
20 class VideoDecoder : public base::NonThreadSafe { | 20 class VideoDecoder : public base::NonThreadSafe { |
21 public: | 21 public: |
22 explicit VideoDecoder(const VideoReceiverConfig& video_config); | 22 VideoDecoder(const VideoReceiverConfig& video_config, |
23 scoped_refptr<CastEnvironment> cast_environment); | |
23 virtual ~VideoDecoder(); | 24 virtual ~VideoDecoder(); |
24 | 25 |
25 // Decode a video frame. Decoded (raw) frame will be returned in the | 26 // Decode a video frame. Decoded (raw) frame will be returned via the |
26 // provided video_frame. | 27 // provided callback |
27 bool DecodeVideoFrame(const EncodedVideoFrame* encoded_frame, | 28 bool DecodeVideoFrame(const EncodedVideoFrame* encoded_frame, |
28 const base::TimeTicks render_time, | 29 const base::TimeTicks render_time, |
29 I420VideoFrame* video_frame); | 30 const VideoFrameDecodedCallback& |
Alpha Left Google
2013/11/06 02:22:06
Call back doesn't need to be const ref. You can pa
mikhal
2013/11/06 18:29:16
Done.
| |
31 frame_decoded_callback); | |
30 | 32 |
31 private: | 33 private: |
32 VideoCodec codec_; | 34 VideoCodec codec_; |
33 scoped_ptr<Vp8Decoder> vp8_decoder_; | 35 scoped_ptr<Vp8Decoder> vp8_decoder_; |
34 | 36 |
35 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); | 37 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); |
36 }; | 38 }; |
37 | 39 |
38 } // namespace cast | 40 } // namespace cast |
39 } // namespace media | 41 } // namespace media |
40 | 42 |
41 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_DECODER_H_ | 43 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_DECODER_H_ |
OLD | NEW |