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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_audio_track_host.h

Issue 857093002: Set audio format before adding pepper sink to audio track. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void EnqueueBuffer(int32_t index); 46 void EnqueueBuffer(int32_t index);
47 47
48 // This function is called on the main thread. 48 // This function is called on the main thread.
49 int32_t Configure(int32_t number_of_buffers, int32_t duration, 49 int32_t Configure(int32_t number_of_buffers, int32_t duration,
50 const ppapi::host::ReplyMessageContext& context); 50 const ppapi::host::ReplyMessageContext& context);
51 51
52 // Send a reply to the currently pending |Configure()| request. 52 // Send a reply to the currently pending |Configure()| request.
53 void SendConfigureReply(int32_t result); 53 void SendConfigureReply(int32_t result);
54 54
55 private: 55 private:
56 // To allow |DidConnectPendingHostToResource()| to call |OnSetFormat()|.
57 friend class PepperMediaStreamAudioTrackHost;
dmichael (off chromium) 2015/01/20 17:07:03 I think I'd rather you either: 1) Make OnSetFormat
Anand Mistry (off Chromium) 2015/01/27 02:12:10 Done #1.
58
56 // Initializes buffers on the main thread. 59 // Initializes buffers on the main thread.
57 void SetFormatOnMainThread(int bytes_per_second, int bytes_per_frame); 60 void SetFormatOnMainThread(int bytes_per_second, int bytes_per_frame);
58 61
59 void InitBuffers(); 62 void InitBuffers();
60 63
61 // Send enqueue buffer message on the main thread. 64 // Send enqueue buffer message on the main thread.
62 void SendEnqueueBufferMessageOnMainThread(int32_t index, 65 void SendEnqueueBufferMessageOnMainThread(int32_t index,
63 int32_t buffers_generation); 66 int32_t buffers_generation);
64 67
65 // MediaStreamAudioSink overrides: 68 // MediaStreamAudioSink overrides:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool connected_; 165 bool connected_;
163 166
164 AudioSink audio_sink_; 167 AudioSink audio_sink_;
165 168
166 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamAudioTrackHost); 169 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamAudioTrackHost);
167 }; 170 };
168 171
169 } // namespace content 172 } // namespace content
170 173
171 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ 174 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698