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

Side by Side Diff: media/cast/test/utility/generate_barcode_video.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cstdio> 5 #include <cstdio>
6 #include <cstdlib> 6 #include <cstdlib>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 #include "media/cast/test/utility/barcode.h" 10 #include "media/cast/test/utility/barcode.h"
(...skipping 11 matching lines...) Expand all
22 22
23 int main(int argc, char **argv) { 23 int main(int argc, char **argv) {
24 if (argc < 5) { 24 if (argc < 5) {
25 fprintf(stderr, "Usage: generate_barcode_video " 25 fprintf(stderr, "Usage: generate_barcode_video "
26 "<width> <height> <fps> <frames> >output.y4m\n"); 26 "<width> <height> <fps> <frames> >output.y4m\n");
27 exit(1); 27 exit(1);
28 } 28 }
29 int width = atoi(argv[1]); 29 int width = atoi(argv[1]);
30 int height = atoi(argv[2]); 30 int height = atoi(argv[2]);
31 int fps = atoi(argv[3]); 31 int fps = atoi(argv[3]);
32 uint16 wanted_frames = atoi(argv[4]); 32 uint16_t wanted_frames = atoi(argv[4]);
33 scoped_refptr<media::VideoFrame> frame = 33 scoped_refptr<media::VideoFrame> frame =
34 media::VideoFrame::CreateBlackFrame(gfx::Size(width, height)); 34 media::VideoFrame::CreateBlackFrame(gfx::Size(width, height));
35 printf("YUV4MPEG2 W%d H%d F%d:1 Ip C420mpeg2\n", width, height, fps); 35 printf("YUV4MPEG2 W%d H%d F%d:1 Ip C420mpeg2\n", width, height, fps);
36 for (uint16 frame_id = 1; frame_id <= wanted_frames; frame_id++) { 36 for (uint16_t frame_id = 1; frame_id <= wanted_frames; frame_id++) {
37 CHECK(media::cast::test::EncodeBarcode(frame_id, frame)); 37 CHECK(media::cast::test::EncodeBarcode(frame_id, frame));
38 printf("FRAME\n"); 38 printf("FRAME\n");
39 DumpPlane(frame, media::VideoFrame::kYPlane); 39 DumpPlane(frame, media::VideoFrame::kYPlane);
40 DumpPlane(frame, media::VideoFrame::kUPlane); 40 DumpPlane(frame, media::VideoFrame::kUPlane);
41 DumpPlane(frame, media::VideoFrame::kVPlane); 41 DumpPlane(frame, media::VideoFrame::kVPlane);
42 } 42 }
43 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698