Bug 146939

Summary: Create bindings so that MediaStreamTrackPrivate can be cast to either VideoTrackPrivate or AudioTrackPrivate
Product: WebKit Reporter: Matthew Daiter <mdaiter>
Component: WebCore Misc.Assignee: Matthew Daiter <mdaiter>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, eric.carlson, jonlee, mdaiter, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146906    
Attachments:
Description Flags
Patch
none
Patch
none
Patch eric.carlson: review-

Description Matthew Daiter 2015-07-14 14:01:14 PDT
Need to do this in order to make sure that the MediaStreamTrackPrivate can be interpreted by the MediaStream Engine
Comment 1 Radar WebKit Bug Importer 2015-07-14 14:02:56 PDT
<rdar://problem/21821125>
Comment 2 Matthew Daiter 2015-07-15 09:47:23 PDT
Created attachment 256842 [details]
Patch
Comment 3 Matthew Daiter 2015-07-15 09:58:12 PDT
Created attachment 256843 [details]
Patch
Comment 4 Matthew Daiter 2015-07-15 11:35:25 PDT
Created attachment 256847 [details]
Patch
Comment 5 Eric Carlson 2015-07-15 20:16:58 PDT
Comment on attachment 256847 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Reviewed by NOBODY (OOPS!).
> +

Please add tests.

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:197
> +    return true;

Only "main" should return true.

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:203
> +    return emptyAtom;

The spec says: 

    AudioTrack.kind and VideoTrack.kind be "main"

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:241
> +    setLanguage(language);

The spec says:

    AudioTrack.language and VideoTrack.language be the empty string

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:247
> +    // Still haven't dealt with enabling MediaStreamTracks and whether to treat as separate objects inside of HTMLMediaElement yet.
> +    notImplemented();

The spec says:

    If a MediaStreamTrack is removed from a MediaStream, played by a media element, the corresponding AudioTrack or VideoTrack must be removed as well.

> Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h:91
> +

Nit: you don't need this extra blank line
Comment 6 Jon Lee 2016-01-25 14:14:07 PST
This was done elsewhere.