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

Unified Diff: media/tools/player_wtl/view.h

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month 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/filters/video_renderer_base_unittest.cc ('k') | media/tools/player_x11/gl_video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/player_wtl/view.h
diff --git a/media/tools/player_wtl/view.h b/media/tools/player_wtl/view.h
index b0e47374b66d33ad2ba6418d3c5c84ac694720b5..cc34aa88e8e838e625e320f77b9206491e9034eb 100644
--- a/media/tools/player_wtl/view.h
+++ b/media/tools/player_wtl/view.h
@@ -144,11 +144,12 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
uint8 *movie_dib_bits = reinterpret_cast<uint8 *>(bm.bmBits) +
bm.bmWidthBytes * (bm.bmHeight - 1);
int dibrowbytes = -bm.bmWidthBytes;
- int clipped_width = video_frame->data_size().width();
+ // Not accounting for cropping presently.
+ int clipped_width = video_frame->coded_size().width();
if (dibwidth < clipped_width) {
clipped_width = dibwidth;
}
- int clipped_height = video_frame->data_size().height();
+ int clipped_height = video_frame->coded_size().height();
if (dibheight < clipped_height) {
clipped_height = dibheight;
}
@@ -243,7 +244,7 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
if (frame) {
// Size the window the first time we get a frame.
if (!last_frame_)
- SetSize(frame->data_size().width(), frame->data_size().height());
+ SetSize(frame->coded_size().width(), frame->coded_size().height());
base::TimeDelta frame_timestamp = frame->GetTimestamp();
if (frame != last_frame_ || frame_timestamp != last_timestamp_) {
@@ -436,24 +437,24 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
if (file_yuv != NULL) {
fseek(file_yuv, 0, SEEK_END);
const int frame_size =
- video_frame->data_size().width() * video_frame->data_size().height();
- for (int y = 0; y < video_frame->data_size().height(); ++y)
+ video_frame->coded_size().width() * video_frame->coded_size().height();
+ for (int y = 0; y < video_frame->coded_size().height(); ++y)
fwrite(video_frame->data(0) + video_frame->stride(0)*y,
- video_frame->data_size().width(), sizeof(uint8), file_yuv);
- for (int y = 0; y < video_frame->data_size().height()/2; ++y)
+ video_frame->coded_size().width(), sizeof(uint8), file_yuv);
+ for (int y = 0; y < video_frame->coded_size().height()/2; ++y)
fwrite(video_frame->data(1) + video_frame->stride(1)*y,
- video_frame->data_size().width() / 2, sizeof(uint8), file_yuv);
- for (int y = 0; y < video_frame->data_size().height()/2; ++y)
+ video_frame->coded_size().width() / 2, sizeof(uint8), file_yuv);
+ for (int y = 0; y < video_frame->coded_size().height()/2; ++y)
fwrite(video_frame->data(2) + video_frame->stride(2)*y,
- video_frame->data_size().width() / 2, sizeof(uint8), file_yuv);
+ video_frame->coded_size().width() / 2, sizeof(uint8), file_yuv);
fclose(file_yuv);
#if TESTING
static int frame_dump_count = 0;
char outputbuf[512];
_snprintf_s(outputbuf, sizeof(outputbuf), "yuvdump %4d %dx%d stride %d\n",
- frame_dump_count, video_frame->data_size().width(),
- video_frame->data_size().height(),
+ frame_dump_count, video_frame->coded_size().width(),
+ video_frame->coded_size().height(),
video_frame->stride(0));
OutputDebugStringA(outputbuf);
++frame_dump_count;
« no previous file with comments | « media/filters/video_renderer_base_unittest.cc ('k') | media/tools/player_x11/gl_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698