Bug 151145 - [MediaStream] Reflect media stream tracks as HTMLMediaElement tracks
Summary: [MediaStream] Reflect media stream tracks as HTMLMediaElement tracks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-11 11:45 PST by Eric Carlson
Modified: 2016-01-04 13:14 PST (History)
3 users (show)

See Also:


Attachments
Patch for the bots. (47.68 KB, patch)
2015-11-11 14:17 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing. (43.52 KB, patch)
2015-11-12 07:44 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch for landing (41.12 KB, patch)
2015-11-12 08:22 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>