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) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // A MediaStreamComponent is a MediaStreamTrack. | 47 // A MediaStreamComponent is a MediaStreamTrack. |
48 // TODO(hta): Consider merging the two classes. | 48 // TODO(hta): Consider merging the two classes. |
49 | 49 |
50 class PLATFORM_EXPORT MediaStreamComponent final : public GarbageCollectedFinali
zed<MediaStreamComponent> { | 50 class PLATFORM_EXPORT MediaStreamComponent final : public GarbageCollectedFinali
zed<MediaStreamComponent> { |
51 USING_PRE_FINALIZER(MediaStreamComponent, dispose); | 51 USING_PRE_FINALIZER(MediaStreamComponent, dispose); |
52 public: | 52 public: |
53 // This class represents whatever data the Web layer uses to represent | 53 // This class represents whatever data the Web layer uses to represent |
54 // a track. It needs to be able to answer the getSettings question. | 54 // a track. It needs to be able to answer the getSettings question. |
55 class TrackData { | 55 class TrackData { |
| 56 USING_FAST_MALLOC(TrackData); |
56 public: | 57 public: |
57 virtual void getSettings(WebMediaStreamTrack::Settings&) = 0; | 58 virtual void getSettings(WebMediaStreamTrack::Settings&) = 0; |
58 virtual ~TrackData() {} | 59 virtual ~TrackData() {} |
59 }; | 60 }; |
60 | 61 |
61 static MediaStreamComponent* create(MediaStreamSource*); | 62 static MediaStreamComponent* create(MediaStreamSource*); |
62 static MediaStreamComponent* create(const String& id, MediaStreamSource*); | 63 static MediaStreamComponent* create(const String& id, MediaStreamSource*); |
63 | 64 |
64 // |m_trackData| may hold pointers to GC objects indirectly, and it may touc
h | 65 // |m_trackData| may hold pointers to GC objects indirectly, and it may touc
h |
65 // eagerly finalized objects in destruction. | 66 // eagerly finalized objects in destruction. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool m_enabled; | 115 bool m_enabled; |
115 bool m_muted; | 116 bool m_muted; |
116 OwnPtr<TrackData> m_trackData; | 117 OwnPtr<TrackData> m_trackData; |
117 }; | 118 }; |
118 | 119 |
119 typedef HeapVector<Member<MediaStreamComponent>> MediaStreamComponentVector; | 120 typedef HeapVector<Member<MediaStreamComponent>> MediaStreamComponentVector; |
120 | 121 |
121 } // namespace blink | 122 } // namespace blink |
122 | 123 |
123 #endif // MediaStreamComponent_h | 124 #endif // MediaStreamComponent_h |
OLD | NEW |