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

Unified Diff: media/cast/cast_receiver.h

Issue 225023010: [Cast] Refactor/clean-up VideoReceiver to match AudioReceiver as closely as possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/cast_defines.h ('k') | media/cast/cast_receiver_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_receiver.h
diff --git a/media/cast/cast_receiver.h b/media/cast/cast_receiver.h
index b88827cb7ab235ea6fd7fb9cfb5734fdf8f86b1c..f73665a9b60caaaedd8fe871cab6e31845fe06c6 100644
--- a/media/cast/cast_receiver.h
+++ b/media/cast/cast_receiver.h
@@ -26,30 +26,28 @@ namespace transport {
class PacketSender;
}
-// Callback in which the raw audio frame, play-out time, and a continuity flag
-// will be returned. |is_continuous| will be false to indicate the loss of
-// audio data due to a loss of frames (or decoding errors). This allows the
-// client to take steps to smooth discontinuities for playback. Note: A NULL
-// AudioBus can be returned when data is not available (e.g., bad packet or when
-// flushing callbacks during shutdown).
+// The following callbacks are used to deliver decoded audio/video frame data,
+// the frame's corresponding play-out time, and a continuity flag.
+// |is_continuous| will be false to indicate the loss of data due to a loss of
+// frames (or decoding errors). This allows the client to take steps to smooth
+// discontinuities for playback. Note: A NULL pointer can be returned when data
+// is not available (e.g., bad packet or when flushing callbacks during
+// shutdown).
typedef base::Callback<void(scoped_ptr<AudioBus> audio_bus,
const base::TimeTicks& playout_time,
bool is_continuous)> AudioFrameDecodedCallback;
+// TODO(miu): |video_frame| includes a timestamp, so use that instead.
+typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
+ const base::TimeTicks& playout_time,
+ bool is_continuous)> VideoFrameDecodedCallback;
-// Callback in which the encoded audio frame and play-out time will be
-// returned. The client should examine the EncodedAudioFrame::frame_id field to
-// determine whether any frames have been dropped (i.e., frame_id should be
-// incrementing by one each time). Note: A NULL EncodedAudioFrame can be
-// returned on error/shutdown.
+// The following callbacks deliver still-encoded audio/video frame data, along
+// with the frame's corresponding play-out time. The client should examine the
+// EncodedXXXFrame::frame_id field to determine whether any frames have been
+// dropped (i.e., frame_id should be incrementing by one each time). Note: A
+// NULL pointer can be returned on error/shutdown.
typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>,
const base::TimeTicks&)> AudioFrameEncodedCallback;
-
-// Callback in which the raw frame and render time will be returned once
-// decoding is complete.
-typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
- const base::TimeTicks&)> VideoFrameDecodedCallback;
-
-// Callback in which the encoded video frame and render time will be returned.
typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>,
const base::TimeTicks&)> VideoFrameEncodedCallback;
« no previous file with comments | « media/cast/cast_defines.h ('k') | media/cast/cast_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698