<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:bfulgham@webkit.org" title="Brent Fulgham <bfulgham@webkit.org>"> <span class="fn">Brent Fulgham</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context."
href="https://bugs.webkit.org/show_bug.cgi?id=150941">bug 150941</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #265074 Flags</td>
<td>review?
</td>
<td>review+, commit-queue-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context."
href="https://bugs.webkit.org/show_bug.cgi?id=150941#c16">Comment # 16</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context."
href="https://bugs.webkit.org/show_bug.cgi?id=150941">bug 150941</a>
from <span class="vcard"><a class="email" href="mailto:bfulgham@webkit.org" title="Brent Fulgham <bfulgham@webkit.org>"> <span class="fn">Brent Fulgham</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=265074&action=diff" name="attach_265074" title="Patch">attachment 265074</a> <a href="attachment.cgi?id=265074&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=265074&action=review">https://bugs.webkit.org/attachment.cgi?id=265074&action=review</a>
This looks great! I have a few suggestions before landing, but I think it looks good.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:834
> +ULONG STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::AddRef()</span >
Please remove the STDMETHODCALLTYPE stuff from the *.cpp file.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:840
> +ULONG STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Release()</span >
Ditto.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1081
> + *ppv = static_cast<IMFVideoPresenter*>(this);</span >
We should be checking for null ppv before dereferencing it.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1678
> +static HRESULT GetVideoDisplayArea(IMFMediaType *type, MFVideoArea *area)</span >
Do we need type and area null checks? Maybe we know that all uses have been null checked. The spacing looks wrong, since this isn't Objective C (i.e., "IMFMediaType *type" -> "IMFMediaType* type", "MFVideoArea *area" -> "MFVideoArea* area".
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1684
> + bPanScan = MFGetAttributeUINT32(type, MF_MT_PAN_SCAN_ENABLED, FALSE);</span >
I prefer "BOOL bPanScan = ..." since nothing happens between declaring the BOOL and initializing it.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1779
> + if (!sample)</span >
So we do check nulls in some of these functions. I feel like this should be consistent, unless we are in an especially tight loop that can't afford the test.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1880
> + hr = m_mixer->ProcessOutput(0, 1, &dataBuffer, &status);</span >
Are there conditions where m_mixer can be null? If not, maybe we should access it through a reference instead.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1957
> + HRESULT hr = sample->QueryInterface(__uuidof(IMFTrackedSample), (void**)&tracked);</span >
Do we ever have SUCCEEDED(hr) with a null "tracked"?
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1979
> +HRESULT MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::onSampleFree(IMFAsyncResult* result)</span >
Can 'result' ever be null?
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:2043
> + m_videoSampleQueue.append(sample);</span >
Is it OK to append null samples?
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:2749
> + &device</span >
This should really be reduced to a few lines. We don't typically use these vertically-extended MS-style formats.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>