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

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

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (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_adapter.h" 5 #include "media/mojo/services/mojo_demuxer_stream_adapter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "media/base/decoder_buffer.h" 9 #include "media/base/decoder_buffer.h"
10 #include "media/mojo/services/media_type_converters.h" 10 #include "media/mojo/services/media_type_converters.h"
(...skipping 30 matching lines...) Expand all
41 41
42 VideoDecoderConfig MojoDemuxerStreamAdapter::video_decoder_config() { 42 VideoDecoderConfig MojoDemuxerStreamAdapter::video_decoder_config() {
43 NOTREACHED(); 43 NOTREACHED();
44 return VideoDecoderConfig(); 44 return VideoDecoderConfig();
45 } 45 }
46 46
47 media::DemuxerStream::Type MojoDemuxerStreamAdapter::type() { 47 media::DemuxerStream::Type MojoDemuxerStreamAdapter::type() {
48 return media::DemuxerStream::AUDIO; 48 return media::DemuxerStream::AUDIO;
49 } 49 }
50 50
51 media::DemuxerStream::Liveness MojoDemuxerStreamAdapter::liveness() {
52 return media::DemuxerStream::LIVENESS_UNKNOWN;
wolenetz 2014/11/11 23:48:07 nit: this is essentially a duplicate of the defaul
xhwang 2014/11/14 06:38:04 Done.
53 }
54
51 void MojoDemuxerStreamAdapter::EnableBitstreamConverter() { 55 void MojoDemuxerStreamAdapter::EnableBitstreamConverter() {
52 NOTREACHED(); 56 NOTREACHED();
53 } 57 }
54 58
55 bool MojoDemuxerStreamAdapter::SupportsConfigChanges() { 59 bool MojoDemuxerStreamAdapter::SupportsConfigChanges() {
56 return true; 60 return true;
57 } 61 }
58 62
59 VideoRotation MojoDemuxerStreamAdapter::video_rotation() { 63 VideoRotation MojoDemuxerStreamAdapter::video_rotation() {
60 NOTIMPLEMENTED(); 64 NOTIMPLEMENTED();
61 return VIDEO_ROTATION_0; 65 return VIDEO_ROTATION_0;
62 } 66 }
63 67
68 // TODO(xhwang): Pass liveness here.
64 void MojoDemuxerStreamAdapter::OnStreamReady( 69 void MojoDemuxerStreamAdapter::OnStreamReady(
65 mojo::ScopedDataPipeConsumerHandle pipe) { 70 mojo::ScopedDataPipeConsumerHandle pipe) {
66 DVLOG(1) << __FUNCTION__; 71 DVLOG(1) << __FUNCTION__;
67 // TODO(tim): We don't support pipe streaming yet. 72 // TODO(tim): We don't support pipe streaming yet.
68 DCHECK(!pipe.is_valid()); 73 DCHECK(!pipe.is_valid());
69 DCHECK(!config_queue_.empty()); 74 DCHECK(!config_queue_.empty());
70 stream_ready_cb_.Run(); 75 stream_ready_cb_.Run();
71 } 76 }
72 77
73 void MojoDemuxerStreamAdapter::OnAudioDecoderConfigChanged( 78 void MojoDemuxerStreamAdapter::OnAudioDecoderConfigChanged(
(...skipping 25 matching lines...) Expand all
99 // If the |config_queue_| is empty we need to wait for 104 // If the |config_queue_| is empty we need to wait for
100 // OnAudioDecoderConfigChanged before invoking |read_cb|. 105 // OnAudioDecoderConfigChanged before invoking |read_cb|.
101 if (config_queue_.empty()) 106 if (config_queue_.empty())
102 return; 107 return;
103 } 108 }
104 read_cb_.Run(media_status, media_buffer); 109 read_cb_.Run(media_status, media_buffer);
105 read_cb_.Reset(); 110 read_cb_.Reset();
106 } 111 }
107 112
108 } // namespace media 113 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698