[MSE][Mac] Report the intrinsic size of the media element from MediaPlayerPrivateMediaSourceAVFObjC::naturalSize().
Created attachment 220699 [details] Patch
Comment on attachment 220699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220699&action=review A test case would be useful. > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:331 > + auto videoTrack = VideoTrackPrivateMediaSourceAVFObjC::create(track, this); This seems like one if the cases where "auto" is not helpful because someone reading the code can't know what style of ref-ptr VideoTrackPrivateMediaSourceAVFObjC::create returns. > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:338 > + auto audioTrack = AudioTrackPrivateMediaSourceAVFObjC::create(track, this); Ditto.
(In reply to comment #2) > (From update of attachment 220699 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=220699&action=review > > A test case would be useful. Unfortunately, this isn't really testable at the moment; we could add a Mock test, but that wouldn't test this change. > > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:331 > > + auto videoTrack = VideoTrackPrivateMediaSourceAVFObjC::create(track, this); > > This seems like one if the cases where "auto" is not helpful because someone reading the code can't know what style of ref-ptr VideoTrackPrivateMediaSourceAVFObjC::create returns. I wonder if "RefPtr<auto>" would be valid syntax? > > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:338 > > + auto audioTrack = AudioTrackPrivateMediaSourceAVFObjC::create(track, this); > > Ditto. Ditto.
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 220699 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=220699&action=review > > > > A test case would be useful. > > Unfortunately, this isn't really testable at the moment; we could add a Mock test, but that wouldn't test this change. > > > > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:331 > > > + auto videoTrack = VideoTrackPrivateMediaSourceAVFObjC::create(track, this); > > > > This seems like one if the cases where "auto" is not helpful because someone reading the code can't know what style of ref-ptr VideoTrackPrivateMediaSourceAVFObjC::create returns. > > I wonder if "RefPtr<auto>" would be valid syntax? > Nope. "error: 'auto' not allowed in template argument". I'll switch these back to non-auto types.
Committed r161612: <http://trac.webkit.org/changeset/161612>
Comment on attachment 220699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220699&action=review > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:648 > + for (auto videoTrack : m_videoTracks) { Here auto is causing reference count churn. You could use auto& or const auto& to avoid that.