OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 void setConstraints(WebMediaConstraints constraints) { m_constraints = const
raints; } | 88 void setConstraints(WebMediaConstraints constraints) { m_constraints = const
raints; } |
89 WebMediaConstraints constraints() { return m_constraints; } | 89 WebMediaConstraints constraints() { return m_constraints; } |
90 | 90 |
91 void setAudioFormat(size_t numberOfChannels, float sampleRate); | 91 void setAudioFormat(size_t numberOfChannels, float sampleRate); |
92 void consumeAudio(AudioBus*, size_t numberOfFrames); | 92 void consumeAudio(AudioBus*, size_t numberOfFrames); |
93 | 93 |
94 bool requiresAudioConsumer() const { return m_requiresConsumer; } | 94 bool requiresAudioConsumer() const { return m_requiresConsumer; } |
95 void addAudioConsumer(AudioDestinationConsumer*); | 95 void addAudioConsumer(AudioDestinationConsumer*); |
96 bool removeAudioConsumer(AudioDestinationConsumer*); | 96 bool removeAudioConsumer(AudioDestinationConsumer*); |
97 const HeapHashSet<Member<AudioDestinationConsumer> >& audioConsumers() { ret
urn m_audioConsumers; } | 97 const HeapHashSet<Member<AudioDestinationConsumer>>& audioConsumers() { retu
rn m_audioConsumers; } |
98 | 98 |
99 private: | 99 private: |
100 MediaStreamSource(const String& id, Type, const String& name, bool remote, b
ool readonly, ReadyState, bool requiresConsumer); | 100 MediaStreamSource(const String& id, Type, const String& name, bool remote, b
ool readonly, ReadyState, bool requiresConsumer); |
101 | 101 |
102 String m_id; | 102 String m_id; |
103 Type m_type; | 103 Type m_type; |
104 String m_name; | 104 String m_name; |
105 bool m_remote; | 105 bool m_remote; |
106 bool m_readonly; | 106 bool m_readonly; |
107 ReadyState m_readyState; | 107 ReadyState m_readyState; |
108 bool m_requiresConsumer; | 108 bool m_requiresConsumer; |
109 Vector<Observer*> m_observers; | 109 Vector<Observer*> m_observers; |
110 Mutex m_audioConsumersLock; | 110 Mutex m_audioConsumersLock; |
111 PersistentHeapHashSet<Member<AudioDestinationConsumer> > m_audioConsumers; | 111 PersistentHeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers; |
112 OwnPtr<ExtraData> m_extraData; | 112 OwnPtr<ExtraData> m_extraData; |
113 WebMediaConstraints m_constraints; | 113 WebMediaConstraints m_constraints; |
114 }; | 114 }; |
115 | 115 |
116 typedef Vector<RefPtr<MediaStreamSource> > MediaStreamSourceVector; | 116 typedef Vector<RefPtr<MediaStreamSource>> MediaStreamSourceVector; |
117 | 117 |
118 } // namespace blink | 118 } // namespace blink |
119 | 119 |
120 #endif // MediaStreamSource_h | 120 #endif // MediaStreamSource_h |
OLD | NEW |