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

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

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added implementation for ALSA. Created 4 years, 5 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 10
(...skipping 21 matching lines...) Expand all
32 // transmitting audio packets between the browser process and the renderer 32 // transmitting audio packets between the browser process and the renderer
33 // process. 33 // process.
34 class AudioSyncReader : public media::AudioOutputController::SyncReader { 34 class AudioSyncReader : public media::AudioOutputController::SyncReader {
35 public: 35 public:
36 AudioSyncReader(base::SharedMemory* shared_memory, 36 AudioSyncReader(base::SharedMemory* shared_memory,
37 const media::AudioParameters& params); 37 const media::AudioParameters& params);
38 38
39 ~AudioSyncReader() override; 39 ~AudioSyncReader() override;
40 40
41 // media::AudioOutputController::SyncReader implementations. 41 // media::AudioOutputController::SyncReader implementations.
42 void UpdatePendingBytes(uint32_t bytes, uint32_t frames_skipped) override; 42 void UpdatePendingBytes(
43 uint32_t bytes,
44 uint32_t frames_skipped,
45 const media::AudioTimestamp& timestamp) override;
43 void Read(media::AudioBus* dest) override; 46 void Read(media::AudioBus* dest) override;
44 void Close() override; 47 void Close() override;
45 48
46 bool Init(); 49 bool Init();
47 bool PrepareForeignSocket(base::ProcessHandle process_handle, 50 bool PrepareForeignSocket(base::ProcessHandle process_handle,
48 base::SyncSocket::TransitDescriptor* descriptor); 51 base::SyncSocket::TransitDescriptor* descriptor);
49 52
50 private: 53 private:
51 // Blocks until data is ready for reading or a timeout expires. Returns false 54 // Blocks until data is ready for reading or a timeout expires. Returns false
52 // if an error or timeout occurs. 55 // if an error or timeout occurs.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // The index of the audio buffer we're expecting to be sent from the renderer; 87 // The index of the audio buffer we're expecting to be sent from the renderer;
85 // used to block with timeout for audio data. 88 // used to block with timeout for audio data.
86 uint32_t buffer_index_; 89 uint32_t buffer_index_;
87 90
88 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); 91 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
89 }; 92 };
90 93
91 } // namespace content 94 } // namespace content
92 95
93 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ 96 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698