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 71 matching lines...) Loading... |
82 | 82 |
83 void addRemoteTrack(MediaStreamComponent*); | 83 void addRemoteTrack(MediaStreamComponent*); |
84 void removeRemoteTrack(MediaStreamComponent*); | 84 void removeRemoteTrack(MediaStreamComponent*); |
85 | 85 |
86 bool active() const { return m_active; } | 86 bool active() const { return m_active; } |
87 void setActive(bool active) { m_active = active; } | 87 void setActive(bool active) { m_active = active; } |
88 | 88 |
89 bool ended() const { return m_ended; } | 89 bool ended() const { return m_ended; } |
90 void setEnded() { m_ended = true; } | 90 void setEnded() { m_ended = true; } |
91 | 91 |
92 ExtraData* extraData() const { return m_extraData.get(); } | 92 ExtraData* getExtraData() const { return m_extraData.get(); } |
93 void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = std::move
(extraData); } | 93 void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = std::move
(extraData); } |
94 | 94 |
95 // |m_extraData| may hold pointers to GC objects, and it may touch them in d
estruction. | 95 // |m_extraData| may hold pointers to GC objects, and it may touch them in d
estruction. |
96 // So this class is eagerly finalized to finalize |m_extraData| promptly. | 96 // So this class is eagerly finalized to finalize |m_extraData| promptly. |
97 EAGERLY_FINALIZE(); | 97 EAGERLY_FINALIZE(); |
98 DECLARE_TRACE(); | 98 DECLARE_TRACE(); |
99 | 99 |
100 private: | 100 private: |
101 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio
Sources, const MediaStreamSourceVector& videoSources); | 101 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio
Sources, const MediaStreamSourceVector& videoSources); |
102 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au
dioComponents, const MediaStreamComponentVector& videoComponents); | 102 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au
dioComponents, const MediaStreamComponentVector& videoComponents); |
103 | 103 |
104 Member<MediaStreamDescriptorClient> m_client; | 104 Member<MediaStreamDescriptorClient> m_client; |
105 String m_id; | 105 String m_id; |
106 HeapVector<Member<MediaStreamComponent>> m_audioComponents; | 106 HeapVector<Member<MediaStreamComponent>> m_audioComponents; |
107 HeapVector<Member<MediaStreamComponent>> m_videoComponents; | 107 HeapVector<Member<MediaStreamComponent>> m_videoComponents; |
108 bool m_active; | 108 bool m_active; |
109 bool m_ended; | 109 bool m_ended; |
110 | 110 |
111 OwnPtr<ExtraData> m_extraData; | 111 OwnPtr<ExtraData> m_extraData; |
112 }; | 112 }; |
113 | 113 |
114 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector; | 114 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector; |
115 | 115 |
116 } // namespace blink | 116 } // namespace blink |
117 | 117 |
118 #endif // MediaStreamDescriptor_h | 118 #endif // MediaStreamDescriptor_h |
OLD | NEW |