Bug 147126

Summary: Remove revealing getVideoTracks() and getAudioTracks()
Product: WebKit Reporter: Matthew Daiter <mdaiter>
Component: WebCore Misc.Assignee: Matthew Daiter <mdaiter>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, eric.carlson, jonlee, mdaiter, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Matthew Daiter 2015-07-20 15:21:57 PDT
We need to remove these methods in order to not have to reveal anything we shouldn't be revealing.
Comment 1 Radar WebKit Bug Importer 2015-07-20 15:22:52 PDT
<rdar://problem/21908723>
Comment 2 Matthew Daiter 2015-07-20 15:25:49 PDT
Created attachment 257132 [details]
Patch
Comment 3 Eric Carlson 2015-07-20 17:30:13 PDT
Comment on attachment 257132 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:140
> +        m_MediaStreamPrivate->addTrack(&*track, MediaStreamPrivate::NotifyClientOption::DontNotify);

&*track is strange. If the compiler requires "&*", can you get rid of it by explicitly declaring "type"'s track instead of using auto?

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:174
>          return MediaPlayerPrivateInterface::platformLayer();

MediaPlayerPrivateInterface::platformLayer returns 0, why don't you just return nullptr here instead of calling it.

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:175
> +    return (PlatformLayer*)m_previewLayer;

You should use a C++ style cast here.
Comment 4 Matthew Daiter 2015-07-21 13:29:11 PDT
Comment on attachment 257132 [details]
Patch

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

>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:140
>> +        m_MediaStreamPrivate->addTrack(&*track, MediaStreamPrivate::NotifyClientOption::DontNotify);
> 
> &*track is strange. If the compiler requires "&*", can you get rid of it by explicitly declaring "type"'s track instead of using auto?

Better way of doing this: std::move()

>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:174
>>          return MediaPlayerPrivateInterface::platformLayer();
> 
> MediaPlayerPrivateInterface::platformLayer returns 0, why don't you just return nullptr here instead of calling it.

Just wanted to call this for clarity. I can return a nullptr here.

>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:175
>> +    return (PlatformLayer*)m_previewLayer;
> 
> You should use a C++ style cast here.

Sure. static_cast<> it is.
Comment 5 Matthew Daiter 2015-07-21 13:31:46 PDT
Created attachment 257200 [details]
Patch
Comment 6 WebKit Commit Bot 2015-07-22 10:18:32 PDT
Comment on attachment 257200 [details]
Patch

Clearing flags on attachment: 257200

Committed r187164: <http://trac.webkit.org/changeset/187164>
Comment 7 WebKit Commit Bot 2015-07-22 10:18:42 PDT
All reviewed patches have been landed.  Closing bug.