OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_RECEIVER_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_CAST_RECEIVER_VIDEO_DECODER_H_ |
6 #define MEDIA_CAST_RECEIVER_VIDEO_DECODER_H_ | 6 #define MEDIA_CAST_RECEIVER_VIDEO_DECODER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "media/base/video_frame.h" | 13 #include "media/base/video_frame.h" |
13 #include "media/cast/constants.h" | 14 #include "media/cast/constants.h" |
14 #include "media/cast/net/cast_transport_config.h" | 15 #include "media/cast/net/cast_transport_config.h" |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 namespace cast { | 18 namespace cast { |
18 | 19 |
19 class CastEnvironment; | 20 class CastEnvironment; |
20 | 21 |
21 class VideoDecoder { | 22 class VideoDecoder { |
(...skipping 15 matching lines...) Expand all Loading... |
37 // succeed. | 38 // succeed. |
38 OperationalStatus InitializationResult() const; | 39 OperationalStatus InitializationResult() const; |
39 | 40 |
40 // Decode the payload in |encoded_frame| asynchronously. |callback| will be | 41 // Decode the payload in |encoded_frame| asynchronously. |callback| will be |
41 // invoked on the CastEnvironment::MAIN thread with the result. | 42 // invoked on the CastEnvironment::MAIN thread with the result. |
42 // | 43 // |
43 // In the normal case, |encoded_frame->frame_id| will be | 44 // In the normal case, |encoded_frame->frame_id| will be |
44 // monotonically-increasing by 1 for each successive call to this method. | 45 // monotonically-increasing by 1 for each successive call to this method. |
45 // When it is not, the decoder will assume one or more frames have been | 46 // When it is not, the decoder will assume one or more frames have been |
46 // dropped (e.g., due to packet loss), and will perform recovery actions. | 47 // dropped (e.g., due to packet loss), and will perform recovery actions. |
47 void DecodeFrame(scoped_ptr<EncodedFrame> encoded_frame, | 48 void DecodeFrame(std::unique_ptr<EncodedFrame> encoded_frame, |
48 const DecodeFrameCallback& callback); | 49 const DecodeFrameCallback& callback); |
49 | 50 |
50 private: | 51 private: |
51 class FakeImpl; | 52 class FakeImpl; |
52 class ImplBase; | 53 class ImplBase; |
53 class Vp8Impl; | 54 class Vp8Impl; |
54 | 55 |
55 const scoped_refptr<CastEnvironment> cast_environment_; | 56 const scoped_refptr<CastEnvironment> cast_environment_; |
56 scoped_refptr<ImplBase> impl_; | 57 scoped_refptr<ImplBase> impl_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); | 59 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); |
59 }; | 60 }; |
60 | 61 |
61 } // namespace cast | 62 } // namespace cast |
62 } // namespace media | 63 } // namespace media |
63 | 64 |
64 #endif // MEDIA_CAST_RECEIVER_VIDEO_DECODER_H_ | 65 #endif // MEDIA_CAST_RECEIVER_VIDEO_DECODER_H_ |
OLD | NEW |