[webkit-reviews] review denied: [Bug 44539] API changes for Video Frame sharing between WebKit and Chromium : [Attachment 65439] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 25 11:47:00 PDT 2010
Darin Fisher (:fishd, Google) <fishd at chromium.org> has denied Victoria
<vrk at google.com>'s request for review:
Bug 44539: API changes for Video Frame sharing between WebKit and Chromium
https://bugs.webkit.org/show_bug.cgi?id=44539
Attachment 65439: Patch
https://bugs.webkit.org/attachment.cgi?id=65439&action=review
------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
WebCore/platform/graphics/chromium/VideoFrameChromium.h:38
+
nit: extra new line here
WebCore/platform/graphics/chromium/VideoFrameChromium.h:71
+ public:
nit: no need for the redundant 'public:' section
WebCore/platform/graphics/chromium/VideoFrameProvider.h:39
+
nit: extra new line here
WebCore/platform/graphics/chromium/VideoFrameProvider.h:41
+ virtual VideoFrameChromium* getCurrentFrame() = 0;
please document the ownership model. who owns the VideoFrameChromium?
how do I free it? it looks like i have to call putCurrentFrame to
free it, but is that the only way? it might help if these methods
were more fully documented.
WebKit/chromium/public/WebMediaPlayer.h:133
+ // FIXME: Will be made pure virtual when API changes are fully landed.
WebKit API interfaces implemented by the embedder are intended to have
non-pure virtual methods. so this FIXME is backwards. the other methods
should have empty implementations :)
WebKit/chromium/public/WebVideoFrame.h:40
+
nit: kill the extra new line here
WebKit/chromium/public/WebVideoFrame.h:43
+ enum Format {
nit: our convention for enums at the WebKit API level is to use the following
format:
enum Foo {
FooBar,
FooBaz,
...
};
So, I'd expect to see:
enum Format {
FormatInvalid,
FormatRGB555,
...
};
enum SurfaceType {
SurfaceTypeSystemMemory,
...
};
WebKit/chromium/public/WebVideoFrame.h:66
+ virtual SurfaceType type() const = 0;
nit: type should be surfaceType to match the type name SurfaceType
WebKit/chromium/public/WebVideoFrame.h:71
+ virtual int stride(unsigned plane) const = 0;
why does stride return signed instead of unsigned?
WebKit/chromium/public/WebVideoFrame.h:72
+ virtual void* data(unsigned plane) const = 0;
can this pointer be a |const void*| instead? it should be const
if you only expect the caller to get read access to the buffer.
otherwise, non-const implies mutability. i think you only want
to provide read access, right?
WebKit/chromium/src/VideoFrameChromiumImpl.cpp:55
+ VideoFrameChromiumImpl::VideoFrameChromiumImpl(WebVideoFrame*
webVideoFrame) :
nit: the colon should be on the next line
WebKit/chromium/src/VideoFrameChromiumImpl.h:42
+
nit: no new line here
WebKit/chromium/src/VideoFrameChromiumImpl.cpp:47
+ WebVideoFrame*
VideoFrameChromiumImpl::toWebVideoFrame(WebCore::VideoFrameChromium*
videoFrame)
nit: i recommend adding a 'using namespace WebCore' at the top of this file,
and then remove the WebCore:: prefixes in the body of this file.
WebKit/chromium/src/VideoFrameChromiumImpl.cpp:56
+ m_webVideoFrame(webVideoFrame)
what is the ownership model for m_webVideoFrame? it looks like
VideoFrameChromiumImpl
is not responsible for deleting m_webVideoFrame. should it?
WebKit/chromium/src/WebMediaPlayerClientImpl.h:119
+ // This function returns a pointer to a VideoFrameChromium, which is
this looks like documentation that should be in VideoFrameProvider.h instead of
here.
More information about the webkit-reviews
mailing list