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

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

Issue 10083064: Revert 132842 - If we are using blocking write, when the renderer stop getting the data without not… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_sync_reader.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 (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 #pragma once 7 #pragma once
8 8
9 #include "base/file_descriptor_posix.h" 9 #include "base/file_descriptor_posix.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 base::SharedMemory* shared_memory_; 45 base::SharedMemory* shared_memory_;
46 base::Time previous_call_time_; 46 base::Time previous_call_time_;
47 47
48 // Socket for transmitting audio data. 48 // Socket for transmitting audio data.
49 scoped_ptr<base::CancelableSyncSocket> socket_; 49 scoped_ptr<base::CancelableSyncSocket> socket_;
50 50
51 // Socket to be used by the renderer. The reference is released after 51 // Socket to be used by the renderer. The reference is released after
52 // PrepareForeignSocketHandle() is called and ran successfully. 52 // PrepareForeignSocketHandle() is called and ran successfully.
53 scoped_ptr<base::CancelableSyncSocket> foreign_socket_; 53 scoped_ptr<base::CancelableSyncSocket> foreign_socket_;
54 54
55 // Protect socket_ access by lock to prevent race condition when audio
56 // controller thread closes the reader and hardware audio thread is reading
57 // data. This way we know that socket would not be deleted while we are
58 // writing data to it.
59 base::Lock lock_;
60
55 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); 61 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
56 }; 62 };
57 63
58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 64 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
OLDNEW
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_sync_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698