diff options
author | mikhal@google.com <mikhal@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 02:36:21 +0000 |
---|---|---|
committer | mikhal@google.com <mikhal@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 02:36:21 +0000 |
commit | 6bfe8216bf3258382f19da1a9dd220a9851914e0 (patch) | |
tree | b3c86979be71f8e454af49583448495140c72863 /media/cast/cast_sender_impl.cc | |
parent | 93ae0ab84c62e89918d58edfc538d14e8cdc78f2 (diff) | |
download | chromium_src-6bfe8216bf3258382f19da1a9dd220a9851914e0.zip chromium_src-6bfe8216bf3258382f19da1a9dd220a9851914e0.tar.gz chromium_src-6bfe8216bf3258382f19da1a9dd220a9851914e0.tar.bz2 |
Switching cast sender to media::VideoFrame
Aligning cast with the media library by using the media::VideoFrame in lieu of a cast specific class. Should reduce a potential memcpy.
Follow up cl's include:
1. Switching cast receiver to use VideoFrame.
2. Using the timedelta in VideoFRame instead of an additional variable.
Review URL: https://codereview.chromium.org/62703003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/cast_sender_impl.cc')
-rw-r--r-- | media/cast/cast_sender_impl.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/media/cast/cast_sender_impl.cc b/media/cast/cast_sender_impl.cc index d1a83d3..db24b5d 100644 --- a/media/cast/cast_sender_impl.cc +++ b/media/cast/cast_sender_impl.cc @@ -7,18 +7,11 @@ #include "base/callback.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" +#include "media/base/video_frame.h" namespace media { namespace cast { -// static -void FrameInput::DeleteVideoFrame(const I420VideoFrame* video_frame) { - delete [] video_frame->y_plane.data; - delete [] video_frame->u_plane.data; - delete [] video_frame->v_plane.data; - delete video_frame; -} - // The LocalFrameInput class posts all incoming frames; audio and video to the // main cast thread for processing. // This make the cast sender interface thread safe. @@ -31,9 +24,10 @@ class LocalFrameInput : public FrameInput { audio_sender_(audio_sender), video_sender_(video_sender) {} - virtual void InsertRawVideoFrame(const I420VideoFrame* video_frame, - const base::TimeTicks& capture_time, - const base::Closure callback) OVERRIDE { + virtual void InsertRawVideoFrame( + const scoped_refptr<media::VideoFrame>& video_frame, + const base::TimeTicks& capture_time, + const base::Closure& callback) OVERRIDE { cast_environment_->Logging()->InsertFrameEvent(kVideoFrameReceived, GetVideoRtpTimestamp(capture_time), kFrameIdUnknown); |