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

Side by Side Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.h

Issue 2344993003: [Chromecast] Fade in after a mixer input stream has skipped (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_ 6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_
7 7
8 #include <alsa/asoundlib.h> 8 #include <alsa/asoundlib.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual int MaxReadSize() = 0; 86 virtual int MaxReadSize() = 0;
87 87
88 // Pulls data from the input stream. The input stream should populate |dest| 88 // Pulls data from the input stream. The input stream should populate |dest|
89 // with |frames| frames of data to be mixed. The mixer expects data to be 89 // with |frames| frames of data to be mixed. The mixer expects data to be
90 // at a sample rate of |output_samples_per_second()|, so each input stream 90 // at a sample rate of |output_samples_per_second()|, so each input stream
91 // should resample as necessary before returning. |frames| is guaranteed to 91 // should resample as necessary before returning. |frames| is guaranteed to
92 // be no larger than the value returned by the most recent call to 92 // be no larger than the value returned by the most recent call to
93 // MaxReadSize(), and |dest->frames()| shall be >= |frames|. 93 // MaxReadSize(), and |dest->frames()| shall be >= |frames|.
94 virtual void GetResampledData(::media::AudioBus* dest, int frames) = 0; 94 virtual void GetResampledData(::media::AudioBus* dest, int frames) = 0;
95 95
96 // Called when this input has been skipped for output due to not having any
97 // data available. This indicates that there will be a gap in the playback
98 // from this stream.
99 virtual void OnSkipped() = 0;
100
96 // This is called for every InputQueue when the mixer writes data to ALSA 101 // This is called for every InputQueue when the mixer writes data to ALSA
97 // for any of its input streams. 102 // for any of its input streams.
98 virtual void AfterWriteFrames( 103 virtual void AfterWriteFrames(
99 const MediaPipelineBackendAlsa::RenderingDelay& 104 const MediaPipelineBackendAlsa::RenderingDelay&
100 mixer_rendering_delay) = 0; 105 mixer_rendering_delay) = 0;
101 106
102 // This will be called when a fatal error occurs in the mixer. 107 // This will be called when a fatal error occurs in the mixer.
103 virtual void SignalError(StreamMixerAlsaInput::MixerError error) = 0; 108 virtual void SignalError(StreamMixerAlsaInput::MixerError error) = 0;
104 109
105 // Notifies the input that it is being removed by the upper layers, and 110 // Notifies the input that it is being removed by the upper layers, and
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 std::unique_ptr<AudioFilterInterface> pre_loopback_filter_; 243 std::unique_ptr<AudioFilterInterface> pre_loopback_filter_;
239 std::unique_ptr<AudioFilterInterface> post_loopback_filter_; 244 std::unique_ptr<AudioFilterInterface> post_loopback_filter_;
240 245
241 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsa); 246 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsa);
242 }; 247 };
243 248
244 } // namespace media 249 } // namespace media
245 } // namespace chromecast 250 } // namespace chromecast
246 251
247 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_ 252 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698