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

Side by Side Diff: media/filters/ffmpeg_video_decoder.cc

Issue 2640113004: Introduce Dolby Vision video codec and Demuxer support (Closed)
Patch Set: fix build break on Android Created 3 years, 9 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
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/ffmpeg_video_decoder.h" 5 #include "media/filters/ffmpeg_video_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 std::string threads(cmd_line->GetSwitchValueASCII(switches::kVideoThreads)); 52 std::string threads(cmd_line->GetSwitchValueASCII(switches::kVideoThreads));
53 if (threads.empty() || !base::StringToInt(threads, &decode_threads)) { 53 if (threads.empty() || !base::StringToInt(threads, &decode_threads)) {
54 // Some ffmpeg codecs don't actually benefit from using more threads. 54 // Some ffmpeg codecs don't actually benefit from using more threads.
55 // Only add more threads for those codecs that we know will benefit. 55 // Only add more threads for those codecs that we know will benefit.
56 switch (config.codec()) { 56 switch (config.codec()) {
57 case kUnknownVideoCodec: 57 case kUnknownVideoCodec:
58 case kCodecVC1: 58 case kCodecVC1:
59 case kCodecMPEG2: 59 case kCodecMPEG2:
60 case kCodecHEVC: 60 case kCodecHEVC:
61 case kCodecVP9: 61 case kCodecVP9:
62 case kCodecDolbyVision:
62 // We do not compile ffmpeg with support for any of these codecs. 63 // We do not compile ffmpeg with support for any of these codecs.
63 break; 64 break;
64 65
65 case kCodecTheora: 66 case kCodecTheora:
66 // No extra threads for these codecs. 67 // No extra threads for these codecs.
67 break; 68 break;
68 69
69 case kCodecH264: 70 case kCodecH264:
70 case kCodecMPEG4: 71 case kCodecMPEG4:
71 case kCodecVP8: 72 case kCodecVP8:
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { 428 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
428 ReleaseFFmpegResources(); 429 ReleaseFFmpegResources();
429 return false; 430 return false;
430 } 431 }
431 432
432 av_frame_.reset(av_frame_alloc()); 433 av_frame_.reset(av_frame_alloc());
433 return true; 434 return true;
434 } 435 }
435 436
436 } // namespace media 437 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698