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

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

Issue 229503002: Cast: Make castv2 mirroring performance test run again (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 8 months 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
« no previous file with comments | « media/cast/cast_environment.h ('k') | media/cast/test/utility/standalone_cast_environment.h » ('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
(...skipping 13 matching lines...) Expand all
24 24
25 namespace transport { 25 namespace transport {
26 class PacketSender; 26 class PacketSender;
27 } 27 }
28 28
29 // The following callbacks are used to deliver decoded audio/video frame data, 29 // The following callbacks are used to deliver decoded audio/video frame data,
30 // the frame's corresponding play-out time, and a continuity flag. 30 // the frame's corresponding play-out time, and a continuity flag.
31 // |is_continuous| will be false to indicate the loss of data due to a loss of 31 // |is_continuous| will be false to indicate the loss of data due to a loss of
32 // frames (or decoding errors). This allows the client to take steps to smooth 32 // frames (or decoding errors). This allows the client to take steps to smooth
33 // discontinuities for playback. Note: A NULL pointer can be returned when data 33 // discontinuities for playback. Note: A NULL pointer can be returned when data
34 // is not available (e.g., bad packet or when flushing callbacks during 34 // is not available (e.g., bad/missing packet).
35 // shutdown).
36 typedef base::Callback<void(scoped_ptr<AudioBus> audio_bus, 35 typedef base::Callback<void(scoped_ptr<AudioBus> audio_bus,
37 const base::TimeTicks& playout_time, 36 const base::TimeTicks& playout_time,
38 bool is_continuous)> AudioFrameDecodedCallback; 37 bool is_continuous)> AudioFrameDecodedCallback;
39 // TODO(miu): |video_frame| includes a timestamp, so use that instead. 38 // TODO(miu): |video_frame| includes a timestamp, so use that instead.
40 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame, 39 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
41 const base::TimeTicks& playout_time, 40 const base::TimeTicks& playout_time,
42 bool is_continuous)> VideoFrameDecodedCallback; 41 bool is_continuous)> VideoFrameDecodedCallback;
43 42
44 // The following callbacks deliver still-encoded audio/video frame data, along 43 // The following callbacks deliver still-encoded audio/video frame data, along
45 // with the frame's corresponding play-out time. The client should examine the 44 // with the frame's corresponding play-out time. The client should examine the
46 // EncodedXXXFrame::frame_id field to determine whether any frames have been 45 // EncodedXXXFrame::frame_id field to determine whether any frames have been
47 // dropped (i.e., frame_id should be incrementing by one each time). Note: A 46 // dropped (i.e., frame_id should be incrementing by one each time). Note: A
48 // NULL pointer can be returned on error/shutdown. 47 // NULL pointer can be returned on error.
49 typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>, 48 typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>,
50 const base::TimeTicks&)> AudioFrameEncodedCallback; 49 const base::TimeTicks&)> AudioFrameEncodedCallback;
51 typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>, 50 typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>,
52 const base::TimeTicks&)> VideoFrameEncodedCallback; 51 const base::TimeTicks&)> VideoFrameEncodedCallback;
53 52
54 // This Class is thread safe. 53 // This Class is thread safe.
55 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> { 54 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
56 public: 55 public:
57 virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) = 0; 56 virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) = 0;
58 57
(...skipping 30 matching lines...) Expand all
89 // Polling interface to get audio and video frames from the CastReceiver. 88 // Polling interface to get audio and video frames from the CastReceiver.
90 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0; 89 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0;
91 90
92 virtual ~CastReceiver() {} 91 virtual ~CastReceiver() {}
93 }; 92 };
94 93
95 } // namespace cast 94 } // namespace cast
96 } // namespace media 95 } // namespace media
97 96
98 #endif // MEDIA_CAST_CAST_RECEIVER_H_ 97 #endif // MEDIA_CAST_CAST_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/cast_environment.h ('k') | media/cast/test/utility/standalone_cast_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698