diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 20:16:10 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 20:16:10 +0000 |
commit | 80a609dc8bb5cdd53a0383f2f173d3e94257c5a6 (patch) | |
tree | e1ed6eec1977eceeda384bc49ebaf7fae64ba812 /media/base/video_frame_impl.h | |
parent | e116a526fce847f7d19a0576d30b3e8de812d923 (diff) | |
download | chromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.zip chromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.tar.gz chromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.tar.bz2 |
Handle end of stream for media
When FFmpegDemuxer failed to decode a raw packet, the signal of
end of stream should bubble up to the renderers. It is done in
this CL by creating fake buffers.
This change also fixes a bug with video of only 1 frame.
Review URL: http://codereview.chromium.org/113611
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_frame_impl.h')
-rw-r--r-- | media/base/video_frame_impl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/base/video_frame_impl.h b/media/base/video_frame_impl.h index 36a2f2c..3a48380 100644 --- a/media/base/video_frame_impl.h +++ b/media/base/video_frame_impl.h @@ -22,9 +22,14 @@ class VideoFrameImpl : public VideoFrame { base::TimeDelta duration, scoped_refptr<VideoFrame>* frame_out); + // Creates a frame with format equals to VideoSurface::EMPTY, width, height + // timestamp and duration are all 0. + static void CreateEmptyFrame(scoped_refptr<VideoFrame>* frame_out); + // Implementation of VideoFrame. virtual bool Lock(VideoSurface* surface); virtual void Unlock(); + virtual bool IsEndOfStream() const; private: // Clients must use the static CreateFrame() method to create a new frame. |