Changeset 246212 in webkit


Ignore:
Timestamp:
Jun 7, 2019 1:08:38 PM (5 years ago)
Author:
youenn@apple.com
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246211 r246212  
     12019-06-07  Youenn Fablet  <youenn@apple.com>
     2
     3        A MediaStreamTrack cannot modify whether being a capture track or not
     4        https://bugs.webkit.org/show_bug.cgi?id=198669
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add a boolean in MediaStreamTrack to store whether a track is a capture one or not.
     9        This removes the need to always go through the private and its source.
     10        As a track might change of source (for non capture track cases), this
     11        also removes the possibility for a track to be capture and then no
     12        longer capture.
     13        No change of behavior.
     14        See also rdar://problem/49444622.
     15
     16        * Modules/mediastream/MediaStreamTrack.cpp:
     17        (WebCore::MediaStreamTrack::MediaStreamTrack):
     18        * Modules/mediastream/MediaStreamTrack.h:
     19        (WebCore::MediaStreamTrack::isCaptureTrack const):
     20
    1212019-06-07  Youenn Fablet  <youenn@apple.com>
    222
  • trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp

    r244225 r246212  
    6464#endif
    6565    , m_taskQueue(context)
     66    , m_isCaptureTrack(m_private->isCaptureTrack())
    6667{
    6768    ALWAYS_LOG(LOGIDENTIFIER);
  • trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h

    r244815 r246212  
    9494    void stopTrack(StopMode = StopMode::Silently);
    9595
    96     bool isCaptureTrack() const { return m_private->isCaptureTrack(); }
     96    bool isCaptureTrack() const { return m_isCaptureTrack; }
    9797
    9898    struct TrackSettings {
     
    203203
    204204    bool m_ended { false };
     205    bool m_isCaptureTrack { false };
    205206};
    206207
Note: See TracChangeset for help on using the changeset viewer.