| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "platform/mediastream/MediaStreamDescriptor.h" | 33 #include "platform/mediastream/MediaStreamDescriptor.h" |
| 34 #include "platform/mediastream/MediaStreamSource.h" | 34 #include "platform/mediastream/MediaStreamSource.h" |
| 35 #include "public/platform/WebMediaConstraints.h" | 35 #include "public/platform/WebMediaConstraints.h" |
| 36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 37 #include <memory> | 37 #include <memory> |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class AudioSourceProvider; | 41 class AudioSourceProvider; |
| 42 class ExceptionState; | 42 class ExceptionState; |
| 43 class ImageCapture; |
| 44 class MediaTrackCapabilities; |
| 43 class MediaTrackConstraints; | 45 class MediaTrackConstraints; |
| 44 class MediaStream; | 46 class MediaStream; |
| 45 class MediaTrackSettings; | 47 class MediaTrackSettings; |
| 46 class ScriptState; | 48 class ScriptState; |
| 47 | 49 |
| 48 class MODULES_EXPORT MediaStreamTrack | 50 class MODULES_EXPORT MediaStreamTrack |
| 49 : public EventTargetWithInlineData, | 51 : public EventTargetWithInlineData, |
| 50 public ActiveScriptWrappable<MediaStreamTrack>, | 52 public ActiveScriptWrappable<MediaStreamTrack>, |
| 51 public ContextLifecycleObserver, | 53 public ContextLifecycleObserver, |
| 52 public MediaStreamSource::Observer { | 54 public MediaStreamSource::Observer { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 73 | 75 |
| 74 void stopTrack(ExceptionState&); | 76 void stopTrack(ExceptionState&); |
| 75 virtual MediaStreamTrack* clone(ScriptState*); | 77 virtual MediaStreamTrack* clone(ScriptState*); |
| 76 | 78 |
| 77 void getConstraints(MediaTrackConstraints&); | 79 void getConstraints(MediaTrackConstraints&); |
| 78 | 80 |
| 79 // This function is called when constrains have been successfully applied. | 81 // This function is called when constrains have been successfully applied. |
| 80 // Called from UserMediaRequest when it succeeds. It is not IDL-exposed. | 82 // Called from UserMediaRequest when it succeeds. It is not IDL-exposed. |
| 81 void setConstraints(const WebMediaConstraints&); | 83 void setConstraints(const WebMediaConstraints&); |
| 82 | 84 |
| 85 void getCapabilities(MediaTrackCapabilities&); |
| 83 void getSettings(MediaTrackSettings&); | 86 void getSettings(MediaTrackSettings&); |
| 84 | 87 |
| 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(mute); | 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(mute); |
| 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute); | 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute); |
| 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(ended); | 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(ended); |
| 88 | 91 |
| 89 MediaStreamComponent* component() { return m_component; } | 92 MediaStreamComponent* component() { return m_component; } |
| 90 bool ended() const; | 93 bool ended() const; |
| 91 | 94 |
| 92 void registerMediaStream(MediaStream*); | 95 void registerMediaStream(MediaStream*); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 115 void sourceChangedState() override; | 118 void sourceChangedState() override; |
| 116 | 119 |
| 117 void propagateTrackEnded(); | 120 void propagateTrackEnded(); |
| 118 | 121 |
| 119 MediaStreamSource::ReadyState m_readyState; | 122 MediaStreamSource::ReadyState m_readyState; |
| 120 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams; | 123 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams; |
| 121 bool m_isIteratingRegisteredMediaStreams; | 124 bool m_isIteratingRegisteredMediaStreams; |
| 122 bool m_stopped; | 125 bool m_stopped; |
| 123 Member<MediaStreamComponent> m_component; | 126 Member<MediaStreamComponent> m_component; |
| 124 WebMediaConstraints m_constraints; | 127 WebMediaConstraints m_constraints; |
| 128 Member<ImageCapture> m_imageCapture; |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector; | 131 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector; |
| 128 | 132 |
| 129 } // namespace blink | 133 } // namespace blink |
| 130 | 134 |
| 131 #endif // MediaStreamTrack_h | 135 #endif // MediaStreamTrack_h |
| OLD | NEW |