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

Side by Side Diff: media/audio/clockless_audio_sink.h

Issue 1260193005: Fix incorrect opus seek preroll and flaky pre-skip removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mojo renderer. Created 5 years, 4 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 | media/audio/clockless_audio_sink.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 5 #ifndef MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 22 matching lines...) Expand all
33 void Start() override; 33 void Start() override;
34 void Stop() override; 34 void Stop() override;
35 void Pause() override; 35 void Pause() override;
36 void Play() override; 36 void Play() override;
37 bool SetVolume(double volume) override; 37 bool SetVolume(double volume) override;
38 OutputDevice* GetOutputDevice() override; 38 OutputDevice* GetOutputDevice() override;
39 39
40 // Returns the time taken to consume all the audio. 40 // Returns the time taken to consume all the audio.
41 base::TimeDelta render_time() { return playback_time_; } 41 base::TimeDelta render_time() { return playback_time_; }
42 42
43 // Enables audio frame hashing. Must be called prior to Initialize().
44 void StartAudioHashForTesting();
45
46 // Returns the hash of all audio frames seen since construction.
47 std::string GetAudioHashForTesting();
48
43 protected: 49 protected:
44 ~ClocklessAudioSink() override; 50 ~ClocklessAudioSink() override;
45 51
46 private: 52 private:
47 scoped_ptr<ClocklessAudioSinkThread> thread_; 53 scoped_ptr<ClocklessAudioSinkThread> thread_;
48 bool initialized_; 54 bool initialized_;
49 bool playing_; 55 bool playing_;
56 bool hashing_;
50 57
51 // Time taken in last set of Render() calls. 58 // Time taken in last set of Render() calls.
52 base::TimeDelta playback_time_; 59 base::TimeDelta playback_time_;
53 60
54 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); 61 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink);
55 }; 62 };
56 63
57 } // namespace media 64 } // namespace media
58 65
59 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 66 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698