Chromium Code Reviews| Index: media/cast/video_receiver/codecs/vp8/vp8_decoder.h |
| diff --git a/media/cast/video_receiver/codecs/vp8/vp8_decoder.h b/media/cast/video_receiver/codecs/vp8/vp8_decoder.h |
| index c8d930bb2a5d3091dac8e5410345095c0b730d87..090b94865c1819349aca78400a83899e6c8e738e 100644 |
| --- a/media/cast/video_receiver/codecs/vp8/vp8_decoder.h |
| +++ b/media/cast/video_receiver/codecs/vp8/vp8_decoder.h |
| @@ -8,6 +8,8 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/threading/non_thread_safe.h" |
| #include "media/cast/cast_config.h" |
| +#include "media/cast/cast_environment.h" |
| +#include "media/cast/cast_receiver.h" |
| #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" |
| typedef struct vpx_codec_ctx vpx_dec_ctx_t; |
| @@ -19,18 +21,25 @@ namespace cast { |
| // thread. |
| class Vp8Decoder : public base::NonThreadSafe { |
| public: |
| - explicit Vp8Decoder(int number_of_cores); |
| + Vp8Decoder(int number_of_cores, |
| + scoped_refptr<CastEnvironment> cast_environment); |
|
Alpha Left Google
2013/11/06 02:22:06
The usual style for scoped_refptr is to pass it as
mikhal
2013/11/06 18:29:16
This way is consistent with the rest of Cast. Will
|
| ~Vp8Decoder(); |
| - // Decode encoded image (as a part of a video stream). |
| - bool Decode(const EncodedVideoFrame& input_image, |
| - I420VideoFrame* decoded_frame); |
| + // Decode encoded image (as a part of a video stream). The decoded frame will |
|
Alpha Left Google
2013/11/06 02:22:06
nit: Decode a frame (...).
"Decode encoded image"
mikhal
2013/11/06 18:29:16
Done.
|
| + // be passed via the callback. |
| + // Will return false in case of error, and then it's up to the caller to |
| + // release the memory. |
| + bool Decode(const EncodedVideoFrame* encoded_frame, |
|
Alpha Left Google
2013/11/06 02:22:06
Is the ownership of |encoded_frame| passed? If not
mikhal
2013/11/06 18:29:16
Done.
|
| + const base::TimeTicks render_time, |
| + const VideoFrameDecodedCallback& |
| + frame_decoded_callback); |
|
Alpha Left Google
2013/11/06 02:22:06
You can pass the callback by value instead of cons
mikhal
2013/11/06 18:29:16
Done.
|
| private: |
| // Initialize the decoder. |
| void InitDecode(int number_of_cores); |
| scoped_ptr<vpx_dec_ctx_t> decoder_; |
| + scoped_refptr<CastEnvironment> cast_environment_; |
| }; |
| } // namespace cast |