Bug 151145

Summary: [MediaStream] Reflect media stream tracks as HTMLMediaElement tracks
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch for the bots.
none
Patch for landing.
none
Updated patch for landing none

Description Eric Carlson 2015-11-11 11:45:37 PST
Reflect media stream tracks as HTMLMediaElement tracks according to the spec rules.
Comment 1 Radar WebKit Bug Importer 2015-11-11 11:46:15 PST
<rdar://problem/23503175>
Comment 2 Eric Carlson 2015-11-11 14:17:50 PST
Created attachment 265319 [details]
Patch for the bots.
Comment 3 Jer Noble 2015-11-11 15:16:13 PST
Comment on attachment 265319 [details]
Patch for the bots.

View in context: https://bugs.webkit.org/attachment.cgi?id=265319&action=review

r=me, with nits. Also, fails to apply.

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:418
> +void updateTracksOfType(HashMap<String, RefT>& trackMap, RealtimeMediaSource::Type trackType, MediaStreamTrackPrivateVector& currentTracks, RefT (*itemFactory)(MediaStreamTrackPrivate&), MediaPlayer* player, void (MediaPlayer::*removedFunction)(PassRefT), void (MediaPlayer::*addedFunction)(PassRefT), std::function<void(RefT, int)> congigureCallback)

SP(congigureCallback).

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:449
> +        congigureCallback(track, index++);

Ditto.

> Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:247
>  
>  RefPtr<Image> MediaStreamPrivate::currentFrameImage()
>  {
> -    if (!active() && !m_activeVideoTrack)
> +    if (!active() || !m_activeVideoTrack)
>          return nullptr;
>  
>      return m_activeVideoTrack->source()->currentFrameImage();

You should probably add a ChangeLog entry for this.
Comment 4 Eric Carlson 2015-11-12 07:44:43 PST
Created attachment 265391 [details]
Patch for landing.
Comment 5 WebKit Commit Bot 2015-11-12 07:46:25 PST
Attachment 265391 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediastream/VideoTrackPrivateMediaStream.h:31:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:31:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:450:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:466:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:472:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 5 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Eric Carlson 2015-11-12 08:22:07 PST
Created attachment 265394 [details]
Updated patch for landing
Comment 7 WebKit Commit Bot 2015-11-12 10:03:09 PST
Comment on attachment 265394 [details]
Updated patch for landing

Clearing flags on attachment: 265394

Committed r192365: <http://trac.webkit.org/changeset/192365>