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

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

Issue 1302423006: Ensure that data is not overwritten in the audio input shared memory ring buffer that sits on the b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review + rebase. Created 5 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
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_INPUT_SYNC_WRITER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // The time of the last Write call. 64 // The time of the last Write call.
65 base::Time last_write_time_; 65 base::Time last_write_time_;
66 66
67 // Size in bytes of each audio bus. 67 // Size in bytes of each audio bus.
68 const int audio_bus_memory_size_; 68 const int audio_bus_memory_size_;
69 69
70 // Increasing ID used for audio buffers correct sequence at read side. 70 // Increasing ID used for audio buffers correct sequence at read side.
71 uint32_t next_buffer_id_; 71 uint32_t next_buffer_id_;
72 72
73 // Keeps track of number of expected buffer reads on the renderer side.
74 int expected_buffer_reads_;
75
76 // Counts the total number of buffer read verifictions and the number of
77 // timeouts when verifying.
tommi (sloooow) - chröme 2015/08/28 13:43:06 is it possible to point to some design? As is, it
78 size_t read_verification_count_;
79 size_t read_verification_timeout_count_;
80
73 // Vector of audio buses allocated during construction and deleted in the 81 // Vector of audio buses allocated during construction and deleted in the
74 // destructor. 82 // destructor.
75 ScopedVector<media::AudioBus> audio_buses_; 83 ScopedVector<media::AudioBus> audio_buses_;
76 84
77 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); 85 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter);
78 }; 86 };
79 87
80 } // namespace content 88 } // namespace content
81 89
82 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ 90 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698