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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void removeRemoteTrack(MediaStreamComponent*); | 98 void removeRemoteTrack(MediaStreamComponent*); |
99 | 99 |
100 bool active() const { return m_active; } | 100 bool active() const { return m_active; } |
101 void setActive(bool active) { m_active = active; } | 101 void setActive(bool active) { m_active = active; } |
102 | 102 |
103 ExtraData* getExtraData() const { return m_extraData.get(); } | 103 ExtraData* getExtraData() const { return m_extraData.get(); } |
104 void setExtraData(std::unique_ptr<ExtraData> extraData) { | 104 void setExtraData(std::unique_ptr<ExtraData> extraData) { |
105 m_extraData = std::move(extraData); | 105 m_extraData = std::move(extraData); |
106 } | 106 } |
107 | 107 |
108 // |m_extraData| may hold pointers to GC objects, and it may touch them in des
truction. | 108 // |m_extraData| may hold pointers to GC objects, and it may touch them in |
109 // So this class is eagerly finalized to finalize |m_extraData| promptly. | 109 // destruction. So this class is eagerly finalized to finalize |m_extraData| |
| 110 // promptly. |
110 EAGERLY_FINALIZE(); | 111 EAGERLY_FINALIZE(); |
111 DECLARE_TRACE(); | 112 DECLARE_TRACE(); |
112 | 113 |
113 private: | 114 private: |
114 MediaStreamDescriptor(const String& id, | 115 MediaStreamDescriptor(const String& id, |
115 const MediaStreamSourceVector& audioSources, | 116 const MediaStreamSourceVector& audioSources, |
116 const MediaStreamSourceVector& videoSources); | 117 const MediaStreamSourceVector& videoSources); |
117 MediaStreamDescriptor(const String& id, | 118 MediaStreamDescriptor(const String& id, |
118 const MediaStreamComponentVector& audioComponents, | 119 const MediaStreamComponentVector& audioComponents, |
119 const MediaStreamComponentVector& videoComponents); | 120 const MediaStreamComponentVector& videoComponents); |
120 | 121 |
121 Member<MediaStreamDescriptorClient> m_client; | 122 Member<MediaStreamDescriptorClient> m_client; |
122 String m_id; | 123 String m_id; |
123 HeapVector<Member<MediaStreamComponent>> m_audioComponents; | 124 HeapVector<Member<MediaStreamComponent>> m_audioComponents; |
124 HeapVector<Member<MediaStreamComponent>> m_videoComponents; | 125 HeapVector<Member<MediaStreamComponent>> m_videoComponents; |
125 bool m_active; | 126 bool m_active; |
126 | 127 |
127 std::unique_ptr<ExtraData> m_extraData; | 128 std::unique_ptr<ExtraData> m_extraData; |
128 }; | 129 }; |
129 | 130 |
130 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector; | 131 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector; |
131 | 132 |
132 } // namespace blink | 133 } // namespace blink |
133 | 134 |
134 #endif // MediaStreamDescriptor_h | 135 #endif // MediaStreamDescriptor_h |
OLD | NEW |