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

Unified Diff: media/base/video_frame.cc

Issue 8897022: Revert 113895 - <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_frame.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
===================================================================
--- media/base/video_frame.cc (revision 113907)
+++ media/base/video_frame.cc (working copy)
@@ -17,8 +17,9 @@
base::TimeDelta duration) {
DCHECK(width > 0 && height > 0);
DCHECK(width * height < 100000000);
- scoped_refptr<VideoFrame> frame(new VideoFrame(
- format, width, height, timestamp, duration));
+ scoped_refptr<VideoFrame> frame(new VideoFrame(format, width, height));
+ frame->SetTimestamp(timestamp);
+ frame->SetDuration(duration);
switch (format) {
case VideoFrame::RGB555:
case VideoFrame::RGB565:
@@ -46,25 +47,8 @@
}
// static
-scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
- uint32 texture_id,
- size_t width,
- size_t height,
- base::TimeDelta timestamp,
- base::TimeDelta duration,
- const base::Closure& no_longer_needed) {
- scoped_refptr<VideoFrame> frame(
- new VideoFrame(NATIVE_TEXTURE, width, height, timestamp, duration));
- frame->planes_ = 0;
- frame->texture_id_ = texture_id;
- frame->texture_no_longer_needed_ = no_longer_needed;
- return frame;
-}
-
-// static
scoped_refptr<VideoFrame> VideoFrame::CreateEmptyFrame() {
- return new VideoFrame(
- VideoFrame::EMPTY, 0, 0, base::TimeDelta(), base::TimeDelta());
+ return new VideoFrame(VideoFrame::EMPTY, 0, 0);
}
// static
@@ -154,26 +138,16 @@
VideoFrame::VideoFrame(VideoFrame::Format format,
size_t width,
- size_t height,
- base::TimeDelta timestamp,
- base::TimeDelta duration)
+ size_t height)
: format_(format),
width_(width),
height_(height),
- planes_(0),
- texture_id_(0) {
- SetTimestamp(timestamp);
- SetDuration(duration);
+ planes_(0) {
memset(&strides_, 0, sizeof(strides_));
memset(&data_, 0, sizeof(data_));
}
VideoFrame::~VideoFrame() {
- if (format_ == NATIVE_TEXTURE && !texture_no_longer_needed_.is_null()) {
- texture_no_longer_needed_.Run();
- texture_no_longer_needed_.Reset();
- }
-
// In multi-plane allocations, only a single block of memory is allocated
// on the heap, and other |data| pointers point inside the same, single block
// so just delete index 0.
@@ -193,10 +167,6 @@
case YV16:
return plane == kYPlane || plane == kUPlane || plane == kVPlane;
- case NATIVE_TEXTURE:
- NOTREACHED() << "NATIVE_TEXTUREs don't use plane-related methods!";
- return false;
-
default:
break;
}
@@ -266,12 +236,6 @@
return data_[plane];
}
-uint32 VideoFrame::texture_id() const {
- DCHECK_EQ(format_, NATIVE_TEXTURE);
- DCHECK_EQ(planes_, 0U);
- return texture_id_;
-}
-
bool VideoFrame::IsEndOfStream() const {
return format_ == VideoFrame::EMPTY;
}
Property changes on: media/base/video_frame.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « media/base/video_frame.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698