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 525313002: SyncSocket Transit Descriptor - refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 6 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_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 "base/process/process.h" 8 #include "base/process/process.h"
9 #include "base/sync_socket.h" 9 #include "base/sync_socket.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 21 matching lines...) Expand all
32 const media::AudioParameters& params); 32 const media::AudioParameters& params);
33 33
34 virtual ~AudioSyncReader(); 34 virtual ~AudioSyncReader();
35 35
36 // media::AudioOutputController::SyncReader implementations. 36 // media::AudioOutputController::SyncReader implementations.
37 virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE; 37 virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE;
38 virtual void Read(media::AudioBus* dest) OVERRIDE; 38 virtual void Read(media::AudioBus* dest) OVERRIDE;
39 virtual void Close() OVERRIDE; 39 virtual void Close() OVERRIDE;
40 40
41 bool Init(); 41 bool Init();
42 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, 42 bool PrepareForeignSocket(base::ProcessHandle process_handle,
43 #if defined(OS_WIN) 43 base::SyncSocket::TransitDescriptor * descriptor);
no longer working on chromium 2014/09/01 14:56:18 remove the space between base::SyncSocket::Transit
burnik 2014/09/01 14:59:34 Nit done.
44 base::SyncSocket::Handle* foreign_handle);
45 #else
46 base::FileDescriptor* foreign_handle);
47 #endif
48 44
49 private: 45 private:
50 // Blocks until data is ready for reading or a timeout expires. Returns false 46 // Blocks until data is ready for reading or a timeout expires. Returns false
51 // if an error or timeout occurs. 47 // if an error or timeout occurs.
52 bool WaitUntilDataIsReady(); 48 bool WaitUntilDataIsReady();
53 49
54 const base::SharedMemory* const shared_memory_; 50 const base::SharedMemory* const shared_memory_;
55 51
56 // Mutes all incoming samples. This is used to prevent audible sound 52 // Mutes all incoming samples. This is used to prevent audible sound
57 // during automated testing. 53 // during automated testing.
(...skipping 24 matching lines...) Expand all
82 // The index of the audio buffer we're expecting to be sent from the renderer; 78 // The index of the audio buffer we're expecting to be sent from the renderer;
83 // used to block with timeout for audio data. 79 // used to block with timeout for audio data.
84 uint32 buffer_index_; 80 uint32 buffer_index_;
85 81
86 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); 82 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
87 }; 83 };
88 84
89 } // namespace content 85 } // namespace content
90 86
91 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 87 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698