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

Side by Side Diff: services/media/audio/audio_track_impl.h

Issue 2097953002: Motown: Rename MediaProducer/Consumer to MediaPacketProducer/Consumer (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixed #ifndef guards Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_ 5 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_
6 #define SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_ 6 #define SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 InterfaceRequest<MediaRenderer> renderer_request, 61 InterfaceRequest<MediaRenderer> renderer_request,
62 AudioServerImpl* owner); 62 AudioServerImpl* owner);
63 63
64 // Implementation of AudioTrack interface. 64 // Implementation of AudioTrack interface.
65 void SetGain(float db_gain) override; 65 void SetGain(float db_gain) override;
66 66
67 // MediaRenderer implementation. 67 // MediaRenderer implementation.
68 void GetSupportedMediaTypes( 68 void GetSupportedMediaTypes(
69 const GetSupportedMediaTypesCallback& callback) override; 69 const GetSupportedMediaTypesCallback& callback) override;
70 void SetMediaType(MediaTypePtr media_type) override; 70 void SetMediaType(MediaTypePtr media_type) override;
71 void GetConsumer(InterfaceRequest<MediaConsumer> consumer_request) override; 71 void GetPacketConsumer(InterfaceRequest<MediaPacketConsumer> consumer_request)
72 override;
72 void GetTimelineControlPoint( 73 void GetTimelineControlPoint(
73 InterfaceRequest<MediaTimelineControlPoint> control_point_request) 74 InterfaceRequest<MediaTimelineControlPoint> control_point_request)
74 override; 75 override;
75 76
76 // Methods called by our AudioPipe. 77 // Methods called by our AudioPipe.
77 // 78 //
78 // TODO(johngro): MI is banned by style, but multiple interface inheritance 79 // TODO(johngro): MI is banned by style, but multiple interface inheritance
79 // (inheriting for one or more base classes consisting only of pure virtual 80 // (inheriting for one or more base classes consisting only of pure virtual
80 // methods) is allowed. Consider defining an interface for AudioPipe 81 // methods) is allowed. Consider defining an interface for AudioPipe
81 // encapsulation so that AudioPipe does not have to know that we are an 82 // encapsulation so that AudioPipe does not have to know that we are an
82 // AudioTrackImpl (just that we implement its interface). 83 // AudioTrackImpl (just that we implement its interface).
83 void OnPacketReceived(AudioPipe::AudioPacketRefPtr packet); 84 void OnPacketReceived(AudioPipe::AudioPacketRefPtr packet);
84 bool OnFlushRequested(const MediaConsumer::FlushCallback& cbk); 85 bool OnFlushRequested(const MediaPacketConsumer::FlushCallback& cbk);
85 86
86 AudioTrackImplWeakPtr weak_this_; 87 AudioTrackImplWeakPtr weak_this_;
87 AudioServerImpl* owner_; 88 AudioServerImpl* owner_;
88 Binding<AudioTrack> track_binding_; 89 Binding<AudioTrack> track_binding_;
89 Binding<MediaRenderer> renderer_binding_; 90 Binding<MediaRenderer> renderer_binding_;
90 AudioPipe pipe_; 91 AudioPipe pipe_;
91 TimelineControlPoint timeline_control_point_; 92 TimelineControlPoint timeline_control_point_;
92 TimelineRate frames_per_ns_; 93 TimelineRate frames_per_ns_;
93 LinearTransform::Ratio frame_to_media_ratio_; 94 LinearTransform::Ratio frame_to_media_ratio_;
94 uint32_t bytes_per_frame_ = 1; 95 uint32_t bytes_per_frame_ = 1;
95 AudioMediaTypeDetailsPtr format_; 96 AudioMediaTypeDetailsPtr format_;
96 AudioTrackToOutputLinkSet outputs_; 97 AudioTrackToOutputLinkSet outputs_;
97 float db_gain_ = 0.0; 98 float db_gain_ = 0.0;
98 }; 99 };
99 100
100 } // namespace audio 101 } // namespace audio
101 } // namespace media 102 } // namespace media
102 } // namespace mojo 103 } // namespace mojo
103 104
104 #endif // SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_ 105 #endif // SERVICES_MEDIA_AUDIO_AUDIO_TRACK_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/media/core/interfaces/media_type_converter.mojom ('k') | services/media/audio/audio_track_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698