Bug 147126 - Remove revealing getVideoTracks() and getAudioTracks()
Summary: Remove revealing getVideoTracks() and getAudioTracks()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthew Daiter
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2015-07-20 15:21 PDT by Matthew Daiter
Modified: 2015-07-22 10:18 PDT (History)
7 users (show)

See Also:


Attachments
Patch (11.47 KB, patch)
2015-07-20 15:25 PDT, Matthew Daiter
no flags Details | Formatted Diff | Diff
Patch (11.52 KB, patch)
2015-07-21 13:31 PDT, Matthew Daiter
no flags Details | Formatted Diff | Diff

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