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

Side by Side Diff: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h

Issue 2651353002: Get the device ID in getSettings() (Closed)
Patch Set: Created 3 years, 10 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 /* 1 /*
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef MediaStreamSource_h 32 #ifndef MediaStreamSource_h
33 #define MediaStreamSource_h 33 #define MediaStreamSource_h
34 34
35 #include "platform/PlatformExport.h" 35 #include "platform/PlatformExport.h"
36 #include "platform/audio/AudioDestinationConsumer.h" 36 #include "platform/audio/AudioDestinationConsumer.h"
37 #include "public/platform/WebMediaConstraints.h" 37 #include "public/platform/WebMediaConstraints.h"
38 #include "public/platform/WebMediaStreamTrack.h"
38 #include "wtf/Allocator.h" 39 #include "wtf/Allocator.h"
39 #include "wtf/ThreadingPrimitives.h" 40 #include "wtf/ThreadingPrimitives.h"
40 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
41 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
42 #include <memory> 43 #include <memory>
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class PLATFORM_EXPORT MediaStreamSource final 47 class PLATFORM_EXPORT MediaStreamSource final
47 : public GarbageCollectedFinalized<MediaStreamSource> { 48 : public GarbageCollectedFinalized<MediaStreamSource> {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 87
87 ExtraData* getExtraData() const { return m_extraData.get(); } 88 ExtraData* getExtraData() const { return m_extraData.get(); }
88 void setExtraData(std::unique_ptr<ExtraData> extraData) { 89 void setExtraData(std::unique_ptr<ExtraData> extraData) {
89 m_extraData = std::move(extraData); 90 m_extraData = std::move(extraData);
90 } 91 }
91 92
92 void setConstraints(WebMediaConstraints constraints) { 93 void setConstraints(WebMediaConstraints constraints) {
93 m_constraints = constraints; 94 m_constraints = constraints;
94 } 95 }
95 WebMediaConstraints constraints() { return m_constraints; } 96 WebMediaConstraints constraints() { return m_constraints; }
97 void getSettings(WebMediaStreamTrack::Settings&);
96 98
97 void setAudioFormat(size_t numberOfChannels, float sampleRate); 99 void setAudioFormat(size_t numberOfChannels, float sampleRate);
98 void consumeAudio(AudioBus*, size_t numberOfFrames); 100 void consumeAudio(AudioBus*, size_t numberOfFrames);
99 101
100 bool requiresAudioConsumer() const { return m_requiresConsumer; } 102 bool requiresAudioConsumer() const { return m_requiresConsumer; }
101 void addAudioConsumer(AudioDestinationConsumer*); 103 void addAudioConsumer(AudioDestinationConsumer*);
102 bool removeAudioConsumer(AudioDestinationConsumer*); 104 bool removeAudioConsumer(AudioDestinationConsumer*);
103 const HeapHashSet<Member<AudioDestinationConsumer>>& audioConsumers() { 105 const HeapHashSet<Member<AudioDestinationConsumer>>& audioConsumers() {
104 return m_audioConsumers; 106 return m_audioConsumers;
105 } 107 }
(...skipping 23 matching lines...) Expand all
129 HeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers; 131 HeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers;
130 std::unique_ptr<ExtraData> m_extraData; 132 std::unique_ptr<ExtraData> m_extraData;
131 WebMediaConstraints m_constraints; 133 WebMediaConstraints m_constraints;
132 }; 134 };
133 135
134 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector; 136 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector;
135 137
136 } // namespace blink 138 } // namespace blink
137 139
138 #endif // MediaStreamSource_h 140 #endif // MediaStreamSource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698