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

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: Add test cases. 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') | media/audio/clockless_audio_sink.cc » ('J')
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 23 matching lines...) Expand all
34 void Pause() override; 34 void Pause() override;
35 void Play() override; 35 void Play() override;
36 bool SetVolume(double volume) override; 36 bool SetVolume(double volume) override;
37 void SwitchOutputDevice(const std::string& device_id, 37 void SwitchOutputDevice(const std::string& device_id,
38 const GURL& security_origin, 38 const GURL& security_origin,
39 const SwitchOutputDeviceCB& callback) override; 39 const SwitchOutputDeviceCB& callback) override;
40 40
41 // Returns the time taken to consume all the audio. 41 // Returns the time taken to consume all the audio.
42 base::TimeDelta render_time() { return playback_time_; } 42 base::TimeDelta render_time() { return playback_time_; }
43 43
44 // Enables audio frame hashing. Must be called prior to Initialize().
45 void StartAudioHashForTesting();
46
47 // Returns the hash of all audio frames seen since construction.
48 std::string GetAudioHashForTesting();
49
44 protected: 50 protected:
45 ~ClocklessAudioSink() override; 51 ~ClocklessAudioSink() override;
46 52
47 private: 53 private:
48 scoped_ptr<ClocklessAudioSinkThread> thread_; 54 scoped_ptr<ClocklessAudioSinkThread> thread_;
49 bool initialized_; 55 bool initialized_;
50 bool playing_; 56 bool playing_;
57 bool hashing_;
51 58
52 // Time taken in last set of Render() calls. 59 // Time taken in last set of Render() calls.
53 base::TimeDelta playback_time_; 60 base::TimeDelta playback_time_;
54 61
55 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); 62 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink);
56 }; 63 };
57 64
58 } // namespace media 65 } // namespace media
59 66
60 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 67 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/clockless_audio_sink.cc » ('j') | media/audio/clockless_audio_sink.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698