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

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

Issue 7831050: Revert 99236 - Very short-term change: while working on proper long-term solution, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "base/sync_socket.h" 11 #include "base/sync_socket.h"
12 #include "base/time.h"
13 #include "media/audio/audio_output_controller.h" 12 #include "media/audio/audio_output_controller.h"
14 13
15 namespace base { 14 namespace base {
16 class SharedMemory; 15 class SharedMemory;
17 } 16 }
18 17
19 // A AudioOutputController::SyncReader implementation using SyncSocket. This 18 // A AudioOutputController::SyncReader implementation using SyncSocket. This
20 // is used by AudioOutputController to provide a low latency data source for 19 // is used by AudioOutputController to provide a low latency data source for
21 // transmitting audio packets between the browser process and the renderer 20 // transmitting audio packets between the browser process and the renderer
22 // process. 21 // process.
(...skipping 11 matching lines...) Expand all
34 bool Init(); 33 bool Init();
35 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, 34 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle,
36 #if defined(OS_WIN) 35 #if defined(OS_WIN)
37 base::SyncSocket::Handle* foreign_handle); 36 base::SyncSocket::Handle* foreign_handle);
38 #else 37 #else
39 base::FileDescriptor* foreign_handle); 38 base::FileDescriptor* foreign_handle);
40 #endif 39 #endif
41 40
42 private: 41 private:
43 base::SharedMemory* shared_memory_; 42 base::SharedMemory* shared_memory_;
44 base::Time previous_call_time_;
45 43
46 // A pair of SyncSocket for transmitting audio data. 44 // A pair of SyncSocket for transmitting audio data.
47 scoped_ptr<base::SyncSocket> socket_; 45 scoped_ptr<base::SyncSocket> socket_;
48 46
49 // SyncSocket to be used by the renderer. The reference is released after 47 // SyncSocket to be used by the renderer. The reference is released after
50 // PrepareForeignSocketHandle() is called and ran successfully. 48 // PrepareForeignSocketHandle() is called and ran successfully.
51 scoped_ptr<base::SyncSocket> foreign_socket_; 49 scoped_ptr<base::SyncSocket> foreign_socket_;
52 50
53 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); 51 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
54 }; 52 };
55 53
56 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 54 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_sync_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698