Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Side by Side Diff: media/cast/cast_receiver.h

Issue 82593005: Cast: Switching recevier to use media::VideoFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing includes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/cast_config.h ('k') | media/cast/test/encode_decode_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This is the main interface for the cast receiver. All configuration are done 5 // This is the main interface for the cast receiver. All configuration are done
6 // at creation. 6 // at creation.
7 7
8 #ifndef MEDIA_CAST_CAST_RECEIVER_H_ 8 #ifndef MEDIA_CAST_CAST_RECEIVER_H_
9 #define MEDIA_CAST_CAST_RECEIVER_H_ 9 #define MEDIA_CAST_CAST_RECEIVER_H_
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/cast/cast_config.h" 16 #include "media/cast/cast_config.h"
17 #include "media/cast/cast_environment.h" 17 #include "media/cast/cast_environment.h"
18 18
19 namespace media { 19 namespace media {
20 class VideoFrame;
21 }
22
23 namespace media {
20 namespace cast { 24 namespace cast {
21 // Callback in which the raw audio frame and play-out time will be returned 25 // Callback in which the raw audio frame and play-out time will be returned
22 // once decoding is complete. 26 // once decoding is complete.
23 typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)> 27 typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)>
24 AudioFrameDecodedCallback; 28 AudioFrameDecodedCallback;
25 29
26 // Callback in which the encoded audio frame and play-out time will be returned. 30 // Callback in which the encoded audio frame and play-out time will be returned.
27 typedef base::Callback<void(scoped_ptr<EncodedAudioFrame>, 31 typedef base::Callback<void(scoped_ptr<EncodedAudioFrame>,
28 const base::TimeTicks&)> AudioFrameEncodedCallback; 32 const base::TimeTicks&)> AudioFrameEncodedCallback;
29 33
30 // Callback in which the raw frame and render time will be returned once 34 // Callback in which the raw frame and render time will be returned once
31 // decoding is complete. 35 // decoding is complete.
32 typedef base::Callback<void(scoped_ptr<I420VideoFrame>, const base::TimeTicks&)> 36 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
37 const base::TimeTicks&)>
33 VideoFrameDecodedCallback; 38 VideoFrameDecodedCallback;
34 39
35 // Callback in which the encoded video frame and render time will be returned. 40 // Callback in which the encoded video frame and render time will be returned.
36 typedef base::Callback<void(scoped_ptr<EncodedVideoFrame>, 41 typedef base::Callback<void(scoped_ptr<EncodedVideoFrame>,
37 const base::TimeTicks&)> VideoFrameEncodedCallback; 42 const base::TimeTicks&)> VideoFrameEncodedCallback;
38 43
39 // This Class is thread safe. 44 // This Class is thread safe.
40 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> { 45 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
41 public: 46 public:
42 virtual void GetRawAudioFrame(int number_of_10ms_blocks, 47 virtual void GetRawAudioFrame(int number_of_10ms_blocks,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Polling interface to get audio and video frames from the CastReceiver. 79 // Polling interface to get audio and video frames from the CastReceiver.
75 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0; 80 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0;
76 81
77 virtual ~CastReceiver() {} 82 virtual ~CastReceiver() {}
78 }; 83 };
79 84
80 } // namespace cast 85 } // namespace cast
81 } // namespace media 86 } // namespace media
82 87
83 #endif // MEDIA_CAST_CAST_RECEIVER_H_ 88 #endif // MEDIA_CAST_CAST_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/cast_config.h ('k') | media/cast/test/encode_decode_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698