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

Side by Side Diff: media/base/pipeline.cc

Issue 363813002: Update to Pipeline Metadata and Decoder Stream for Orientation Data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: VideoRotation enum added Created 6 years, 5 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) 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/base/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); 385 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER);
386 return; 386 return;
387 } 387 }
388 388
389 { 389 {
390 PipelineMetadata metadata; 390 PipelineMetadata metadata;
391 metadata.has_audio = audio_renderer_; 391 metadata.has_audio = audio_renderer_;
392 metadata.has_video = video_renderer_; 392 metadata.has_video = video_renderer_;
393 metadata.timeline_offset = demuxer_->GetTimelineOffset(); 393 metadata.timeline_offset = demuxer_->GetTimelineOffset();
394 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); 394 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO);
395 if (stream) 395 if (stream) {
396 metadata.natural_size = stream->video_decoder_config().natural_size(); 396 metadata.natural_size = stream->video_decoder_config().natural_size();
397 metadata.rotation = stream->video_decoder_config().rotation();
398 }
397 metadata_cb_.Run(metadata); 399 metadata_cb_.Run(metadata);
398 } 400 }
399 401
400 return DoInitialPreroll(done_cb); 402 return DoInitialPreroll(done_cb);
401 403
402 case kPlaying: 404 case kPlaying:
403 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); 405 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK);
404 406
405 if (audio_renderer_) 407 if (audio_renderer_)
406 audio_renderer_->StartPlayingFrom(start_timestamp_); 408 audio_renderer_->StartPlayingFrom(start_timestamp_);
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 930 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
929 lock_.AssertAcquired(); 931 lock_.AssertAcquired();
930 if (clock_state_ != CLOCK_WAITING_FOR_AUDIO_TIME_UPDATE) 932 if (clock_state_ != CLOCK_WAITING_FOR_AUDIO_TIME_UPDATE)
931 return; 933 return;
932 934
933 clock_state_ = CLOCK_PLAYING; 935 clock_state_ = CLOCK_PLAYING;
934 clock_->Play(); 936 clock_->Play();
935 } 937 }
936 938
937 } // namespace media 939 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698