Title: [246212] trunk/Source/WebCore
- Revision
- 246212
- Author
- you...@apple.com
- Date
- 2019-06-07 13:08:38 -0700 (Fri, 07 Jun 2019)
Log Message
A MediaStreamTrack cannot modify whether being a capture track or not
https://bugs.webkit.org/show_bug.cgi?id=198669
Reviewed by Eric Carlson.
Add a boolean in MediaStreamTrack to store whether a track is a capture one or not.
This removes the need to always go through the private and its source.
As a track might change of source (for non capture track cases), this
also removes the possibility for a track to be capture and then no
longer capture.
No change of behavior.
See also rdar://problem/49444622.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
* Modules/mediastream/MediaStreamTrack.h:
(WebCore::MediaStreamTrack::isCaptureTrack const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246211 => 246212)
--- trunk/Source/WebCore/ChangeLog 2019-06-07 20:07:55 UTC (rev 246211)
+++ trunk/Source/WebCore/ChangeLog 2019-06-07 20:08:38 UTC (rev 246212)
@@ -1,5 +1,25 @@
2019-06-07 Youenn Fablet <you...@apple.com>
+ A MediaStreamTrack cannot modify whether being a capture track or not
+ https://bugs.webkit.org/show_bug.cgi?id=198669
+
+ Reviewed by Eric Carlson.
+
+ Add a boolean in MediaStreamTrack to store whether a track is a capture one or not.
+ This removes the need to always go through the private and its source.
+ As a track might change of source (for non capture track cases), this
+ also removes the possibility for a track to be capture and then no
+ longer capture.
+ No change of behavior.
+ See also rdar://problem/49444622.
+
+ * Modules/mediastream/MediaStreamTrack.cpp:
+ (WebCore::MediaStreamTrack::MediaStreamTrack):
+ * Modules/mediastream/MediaStreamTrack.h:
+ (WebCore::MediaStreamTrack::isCaptureTrack const):
+
+2019-06-07 Youenn Fablet <you...@apple.com>
+
Add a RELEASE_ASSERT that removeAudioProducer should always be done in the main thread
https://bugs.webkit.org/show_bug.cgi?id=198668
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (246211 => 246212)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2019-06-07 20:07:55 UTC (rev 246211)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2019-06-07 20:08:38 UTC (rev 246212)
@@ -63,6 +63,7 @@
, m_logIdentifier(uniqueLogIdentifier())
#endif
, m_taskQueue(context)
+ , m_isCaptureTrack(m_private->isCaptureTrack())
{
ALWAYS_LOG(LOGIDENTIFIER);
suspendIfNeeded();
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h (246211 => 246212)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h 2019-06-07 20:07:55 UTC (rev 246211)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h 2019-06-07 20:08:38 UTC (rev 246212)
@@ -93,7 +93,7 @@
enum class StopMode { Silently, PostEvent };
void stopTrack(StopMode = StopMode::Silently);
- bool isCaptureTrack() const { return m_private->isCaptureTrack(); }
+ bool isCaptureTrack() const { return m_isCaptureTrack; }
struct TrackSettings {
Optional<int> width;
@@ -202,6 +202,7 @@
GenericTaskQueue<Timer> m_eventTaskQueue;
bool m_ended { false };
+ bool m_isCaptureTrack { false };
};
typedef Vector<RefPtr<MediaStreamTrack>> MediaStreamTrackVector;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes