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

Side by Side Diff: media/tools/omx_test/omx_test.cc

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: And again, this time with working tests... Created 9 years, 10 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // A test program that drives an OpenMAX video decoder module. This program 5 // A test program that drives an OpenMAX video decoder module. This program
6 // will take video in elementary stream and read into the decoder. 6 // will take video in elementary stream and read into the decoder.
7 // 7 //
8 // Run the following command to see usage: 8 // Run the following command to see usage:
9 // ./omx_test 9 // ./omx_test
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return false; 294 return false;
295 } 295 }
296 // TODO(jiesun): assume constant bitrate now. 296 // TODO(jiesun): assume constant bitrate now.
297 av_stream->codec->bit_rate = GetIntSwitch("bitrate"); 297 av_stream->codec->bit_rate = GetIntSwitch("bitrate");
298 298
299 // TODO(wjia): add more configurations needed by encoder 299 // TODO(wjia): add more configurations needed by encoder
300 return true; 300 return true;
301 } 301 }
302 302
303 static bool InitFFmpeg() { 303 static bool InitFFmpeg() {
304 if (!media::InitializeMediaLibrary(FilePath())) 304 media::InitializeMediaLibrary(FilePath());
305 if (!media::IsMediaLibraryInitialized())
305 return false; 306 return false;
306 avcodec_init(); 307 avcodec_init();
307 av_register_all(); 308 av_register_all();
308 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol)); 309 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol));
309 return true; 310 return true;
310 } 311 }
311 312
312 static void PrintHelp() { 313 static void PrintHelp() {
313 printf("Using for decoding...\n"); 314 printf("Using for decoding...\n");
314 printf("\n"); 315 printf("\n");
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 if (!test->Initialize()) { 415 if (!test->Initialize()) {
415 LOG(ERROR) << "can't initialize this application"; 416 LOG(ERROR) << "can't initialize this application";
416 return -1; 417 return -1;
417 } 418 }
418 419
419 // This will run the decoder until EOS is reached or an error 420 // This will run the decoder until EOS is reached or an error
420 // is encountered. 421 // is encountered.
421 test->Run(); 422 test->Run();
422 return 0; 423 return 0;
423 } 424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698