summaryrefslogtreecommitdiffstats
path: root/media/tools/player_wtl/view.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/tools/player_wtl/view.h')
-rw-r--r--media/tools/player_wtl/view.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/media/tools/player_wtl/view.h b/media/tools/player_wtl/view.h
index 7519b09..b0e4737 100644
--- a/media/tools/player_wtl/view.h
+++ b/media/tools/player_wtl/view.h
@@ -144,11 +144,11 @@ 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->width();
+ int clipped_width = video_frame->data_size().width();
if (dibwidth < clipped_width) {
clipped_width = dibwidth;
}
- int clipped_height = video_frame->height();
+ int clipped_height = video_frame->data_size().height();
if (dibheight < clipped_height) {
clipped_height = dibheight;
}
@@ -243,7 +243,7 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
if (frame) {
// Size the window the first time we get a frame.
if (!last_frame_)
- SetSize(frame->width(), frame->height());
+ SetSize(frame->data_size().width(), frame->data_size().height());
base::TimeDelta frame_timestamp = frame->GetTimestamp();
if (frame != last_frame_ || frame_timestamp != last_timestamp_) {
@@ -435,25 +435,25 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
FILE * file_yuv = fopen("raw.yuv", "ab+"); // Open for append binary.
if (file_yuv != NULL) {
fseek(file_yuv, 0, SEEK_END);
- const size_t frame_size =
- video_frame->width() * video_frame->height();
- for (size_t y = 0; y < video_frame->height(); ++y)
+ 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)
fwrite(video_frame->data(0) + video_frame->stride(0)*y,
- video_frame->width(), sizeof(uint8), file_yuv);
- for (size_t y = 0; y < video_frame->height()/2; ++y)
+ video_frame->data_size().width(), sizeof(uint8), file_yuv);
+ for (int y = 0; y < video_frame->data_size().height()/2; ++y)
fwrite(video_frame->data(1) + video_frame->stride(1)*y,
- video_frame->width() / 2, sizeof(uint8), file_yuv);
- for (size_t y = 0; y < video_frame->height()/2; ++y)
+ video_frame->data_size().width() / 2, sizeof(uint8), file_yuv);
+ for (int y = 0; y < video_frame->data_size().height()/2; ++y)
fwrite(video_frame->data(2) + video_frame->stride(2)*y,
- video_frame->width() / 2, sizeof(uint8), file_yuv);
+ video_frame->data_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->width(),
- video_frame->height(),
+ frame_dump_count, video_frame->data_size().width(),
+ video_frame->data_size().height(),
video_frame->stride(0));
OutputDebugStringA(outputbuf);
++frame_dump_count;