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

Side by Side Diff: media/mojo/services/mojo_demuxer_stream_impl.cc

Issue 728553002: Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "media/mojo/services/mojo_demuxer_stream_impl.h" 5 #include "media/mojo/services/mojo_demuxer_stream_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "media/base/audio_decoder_config.h" 9 #include "media/base/audio_decoder_config.h"
10 #include "media/base/video_decoder_config.h" 10 #include "media/base/video_decoder_config.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 mojo::VideoDecoderConfig::From(stream_->video_decoder_config())); 44 mojo::VideoDecoderConfig::From(stream_->video_decoder_config()));
45 } 45 }
46 } 46 }
47 47
48 // TODO(tim): Once using DataPipe, fill via the producer handle and then 48 // TODO(tim): Once using DataPipe, fill via the producer handle and then
49 // read more to keep the pipe full. 49 // read more to keep the pipe full.
50 callback.Run(static_cast<mojo::DemuxerStream::Status>(status), 50 callback.Run(static_cast<mojo::DemuxerStream::Status>(status),
51 mojo::MediaDecoderBuffer::From(buffer)); 51 mojo::MediaDecoderBuffer::From(buffer));
52 } 52 }
53 53
54 void MojoDemuxerStreamImpl::OnConnectionEstablished() { 54 void MojoDemuxerStreamImpl::DidConnect() {
55 // This is called when our DemuxerStreamClient has connected itself and is 55 // This is called when our DemuxerStreamClient has connected itself and is
56 // ready to receive messages. Send an initial config and notify it that 56 // ready to receive messages. Send an initial config and notify it that
57 // we are now ready for business. 57 // we are now ready for business.
58 if (stream_->type() == media::DemuxerStream::AUDIO) { 58 if (stream_->type() == media::DemuxerStream::AUDIO) {
59 client()->OnAudioDecoderConfigChanged( 59 client()->OnAudioDecoderConfigChanged(
60 mojo::AudioDecoderConfig::From(stream_->audio_decoder_config())); 60 mojo::AudioDecoderConfig::From(stream_->audio_decoder_config()));
61 } else if (stream_->type() == media::DemuxerStream::VIDEO) { 61 } else if (stream_->type() == media::DemuxerStream::VIDEO) {
62 client()->OnVideoDecoderConfigChanged( 62 client()->OnVideoDecoderConfigChanged(
63 mojo::VideoDecoderConfig::From(stream_->video_decoder_config())); 63 mojo::VideoDecoderConfig::From(stream_->video_decoder_config()));
64 } 64 }
65 65
66 // TODO(tim): Create a DataPipe, hold the producer handle, and pass the 66 // TODO(tim): Create a DataPipe, hold the producer handle, and pass the
67 // consumer handle here. 67 // consumer handle here.
68 client()->OnStreamReady(mojo::ScopedDataPipeConsumerHandle()); 68 client()->OnStreamReady(mojo::ScopedDataPipeConsumerHandle());
69 } 69 }
70 70
71 } // namespace media 71 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_demuxer_stream_impl.h ('k') | media/mojo/services/mojo_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698