Bug 54580

Summary: [chromium] Enable media elements statistics support in chromium
Product: WebKit Reporter: Steve Lacey <sjl>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dglazkov, fishd, jamesr, scherkus, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Steve Lacey 2011-02-16 13:11:56 PST
The implementation of media elements has landed in chromium. This patch wires up the webkit and chromium parts.
Comment 1 Steve Lacey 2011-02-16 13:19:54 PST
Created attachment 82683 [details]
Patch
Comment 2 WebKit Review Bot 2011-02-16 13:36:31 PST
Attachment 82683 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/7926374
Comment 3 Steve Lacey 2011-02-16 14:12:58 PST
cr-* failures due to chromium DEPS needing to be bumped. Will look into this.
Comment 4 Steve Lacey 2011-02-17 10:11:07 PST
Created attachment 82828 [details]
Patch
Comment 5 Steve Lacey 2011-02-17 10:11:29 PST
New patch to kick ews bots.
Comment 6 David Levin 2011-02-17 17:55:44 PST
+fishd (chromium public change)
Comment 7 Darin Fisher (:fishd, Google) 2011-02-17 23:41:38 PST
Comment on attachment 82828 [details]
Patch

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

> Source/WebKit/chromium/public/WebMediaPlayer.h:132
> +    virtual unsigned long decodedFrames() const = 0;

nit: webkit style is to just use "unsigned" instead of "unsigned long"

nit: are "decodedFrames" and "droppedFrames" meant to return counts of {decoded,dropped}Frames?
if so, the names of these methods could be improved.  as is, it sounds like the methods should
be returning sets of frames--one set of decoded frames and one set of dropped frames, but clearly
that's not what they do since they return integers.

How about one of these names?

  {count,number}Of{Decoded,Dropped}Frames
  {decoded,dropped}FrameCount

> Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:453
> +unsigned long WebMediaPlayerClientImpl::decodedFrames() const

looks like the WebCore interfaces have the same naming problem.
Comment 8 Steve Lacey 2011-02-18 10:45:54 PST
(In reply to comment #7)
> (From update of attachment 82828 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82828&action=review
> 
> > Source/WebKit/chromium/public/WebMediaPlayer.h:132
> > +    virtual unsigned long decodedFrames() const = 0;
> 
> nit: webkit style is to just use "unsigned" instead of "unsigned long"

Will fix.

> 
> nit: are "decodedFrames" and "droppedFrames" meant to return counts of {decoded,dropped}Frames?
> if so, the names of these methods could be improved.  as is, it sounds like the methods should
> be returning sets of frames--one set of decoded frames and one set of dropped frames, but clearly
> that's not what they do since they return integers.
> 
> How about one of these names?
> 
>   {count,number}Of{Decoded,Dropped}Frames
>   {decoded,dropped}FrameCount

I like the second ({decoded,dropped}FrameCount). Note that this is mirrored in the idl (HTML{Video,Media}Element.idl.

WebCore/html idl style seems to be to use "unsigned long" rather than "unsigned" though, yes? And the implementation HTML*Element.{cpp,h} is to use "unsigned"?

As I introduced this a couple of weeks ago, I think I should change the actual core APIs to match this (nothing depends on this as no port supports this yet).

I.e. I will:

1) Change WebCore to reflect the API change.
2) Make the changes to chromium
3) Fix up this patch that wires 1 and 2 together.

Sound like a plan? Will cc you on the changes.

> 
> > Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:453
> > +unsigned long WebMediaPlayerClientImpl::decodedFrames() const
> 
> looks like the WebCore interfaces have the same naming problem.

Yup - will fix as detailed above.
Comment 9 Darin Fisher (:fishd, Google) 2011-02-18 10:53:52 PST
Sounds good, thanks!!
Comment 10 Steve Lacey 2011-02-28 10:39:58 PST
Created attachment 84082 [details]
Patch
Comment 11 Steve Lacey 2011-02-28 10:41:53 PST
Latest patch includes new naming.
Will turn on in chromium (build/features_override.gypi) after this...
Comment 12 Steve Lacey 2011-03-01 09:13:31 PST
Ping! :-)
Comment 13 Steve Lacey 2011-03-01 14:33:14 PST
Hey Darin - wondering if you could look at this?
Comment 14 Steve Lacey 2011-03-02 10:05:29 PST
Hey James - could you take a look at this?
Comment 15 WebKit Commit Bot 2011-03-03 01:33:28 PST
Comment on attachment 84082 [details]
Patch

Clearing flags on attachment: 84082

Committed r80215: <http://trac.webkit.org/changeset/80215>
Comment 16 WebKit Commit Bot 2011-03-03 01:33:34 PST
All reviewed patches have been landed.  Closing bug.
Comment 17 WebKit Commit Bot 2011-03-03 02:06:10 PST
The commit-queue encountered the following flaky tests while processing attachment 84082 [details]:

http/tests/media/video-load-twice.html bug 51304 (authors: eric.carlson@apple.com and jamesr@chromium.org)
The commit-queue is continuing to process your patch.