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

Side by Side Diff: content/browser/renderer_host/media/audio_sync_reader.h

Issue 2822123002: Avoid log spam in AudioSyncReader. (Closed)
Patch Set: Fix awkward comment phrasing. Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <memory> 10 #include <memory>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Blocks until data is ready for reading or a timeout expires. Returns false 60 // Blocks until data is ready for reading or a timeout expires. Returns false
61 // if an error or timeout occurs. 61 // if an error or timeout occurs.
62 bool WaitUntilDataIsReady(); 62 bool WaitUntilDataIsReady();
63 63
64 std::unique_ptr<base::SharedMemory> shared_memory_; 64 std::unique_ptr<base::SharedMemory> shared_memory_;
65 65
66 // Mutes all incoming samples. This is used to prevent audible sound 66 // Mutes all incoming samples. This is used to prevent audible sound
67 // during automated testing. 67 // during automated testing.
68 const bool mute_audio_; 68 const bool mute_audio_;
69 69
70 // Denotes that the most recent socket error has been logged. Used to avoid
71 // log spam.
72 bool had_socket_error_;
73
70 // Socket for transmitting audio data. 74 // Socket for transmitting audio data.
71 std::unique_ptr<base::CancelableSyncSocket> socket_; 75 std::unique_ptr<base::CancelableSyncSocket> socket_;
72 76
73 // Socket to be used by the renderer. 77 // Socket to be used by the renderer.
74 std::unique_ptr<base::CancelableSyncSocket> foreign_socket_; 78 std::unique_ptr<base::CancelableSyncSocket> foreign_socket_;
75 79
76 // Shared memory wrapper used for transferring audio data to Read() callers. 80 // Shared memory wrapper used for transferring audio data to Read() callers.
77 std::unique_ptr<media::AudioBus> output_bus_; 81 std::unique_ptr<media::AudioBus> output_bus_;
78 82
79 // Maximum amount of audio data which can be transferred in one Read() call. 83 // Maximum amount of audio data which can be transferred in one Read() call.
(...skipping 12 matching lines...) Expand all
92 // The index of the audio buffer we're expecting to be sent from the renderer; 96 // The index of the audio buffer we're expecting to be sent from the renderer;
93 // used to block with timeout for audio data. 97 // used to block with timeout for audio data.
94 uint32_t buffer_index_; 98 uint32_t buffer_index_;
95 99
96 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); 100 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
97 }; 101 };
98 102
99 } // namespace content 103 } // namespace content
100 104
101 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 105 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698