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

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

Issue 2873089: media: gpu process ipc video decoder implementation (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: remove mft Created 10 years, 4 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
« no previous file with comments | « media/base/media_switches.cc ('k') | no next file » | 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) 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 #include "base/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 stream->codec->codec_id != CODEC_ID_VORBIS)) { 419 stream->codec->codec_id != CODEC_ID_VORBIS)) {
420 packet_streams_.push_back(NULL); 420 packet_streams_.push_back(NULL);
421 continue; 421 continue;
422 } 422 }
423 423
424 FFmpegDemuxerStream* demuxer_stream 424 FFmpegDemuxerStream* demuxer_stream
425 = new FFmpegDemuxerStream(this, stream); 425 = new FFmpegDemuxerStream(this, stream);
426 426
427 // Initialize the bitstream if OpenMAX is enabled. 427 // Initialize the bitstream if OpenMAX is enabled.
428 // TODO(hclam): Should be enabled by the decoder. 428 // TODO(hclam): Should be enabled by the decoder.
429 if (CommandLine::ForCurrentProcess()->HasSwitch( 429 CommandLine* cmd = CommandLine::ForCurrentProcess();
430 switches::kEnableOpenMax)) { 430 if (cmd->HasSwitch(switches::kEnableAcceleratedDecoding)) {
431 // TODO(ajwong): Unittest this branch of the if statement. 431 // TODO(ajwong): Unittest this branch of the if statement.
432 // TODO(hclam): In addition to codec we should also check the container. 432 // TODO(hclam): In addition to codec we should also check the container.
433 const char* filter_name = NULL; 433 const char* filter_name = NULL;
434 if (stream->codec->codec_id == CODEC_ID_H264) { 434 if (stream->codec->codec_id == CODEC_ID_H264) {
435 filter_name = "h264_mp4toannexb"; 435 filter_name = "h264_mp4toannexb";
436 } else if (stream->codec->codec_id == CODEC_ID_MPEG4) { 436 } else if (stream->codec->codec_id == CODEC_ID_MPEG4) {
437 filter_name = "mpeg4video_es"; 437 filter_name = "mpeg4video_es";
438 } else if (stream->codec->codec_id == CODEC_ID_WMV3) { 438 } else if (stream->codec->codec_id == CODEC_ID_WMV3) {
439 filter_name = "vc1_asftorcv"; 439 filter_name = "vc1_asftorcv";
440 } else if (stream->codec->codec_id == CODEC_ID_VC1) { 440 } else if (stream->codec->codec_id == CODEC_ID_VC1) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 read_event_.Wait(); 614 read_event_.Wait();
615 return last_read_bytes_; 615 return last_read_bytes_;
616 } 616 }
617 617
618 void FFmpegDemuxer::SignalReadCompleted(size_t size) { 618 void FFmpegDemuxer::SignalReadCompleted(size_t size) {
619 last_read_bytes_ = size; 619 last_read_bytes_ = size;
620 read_event_.Signal(); 620 read_event_.Signal();
621 } 621 }
622 622
623 } // namespace media 623 } // namespace media
OLDNEW
« no previous file with comments | « media/base/media_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698