OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... | |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "modules/mediasource/HTMLVideoElementMediaSource.h" | 32 #include "modules/mediasource/HTMLVideoElementMediaSource.h" |
33 | 33 |
34 #include "core/html/HTMLVideoElement.h" | 34 #include "core/html/HTMLVideoElement.h" |
35 #include "modules/mediasource/VideoPlaybackQuality.h" | 35 #include "modules/mediasource/VideoPlaybackQuality.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 using blink::WebMediaPlayer; | |
acolwell GONE FROM CHROMIUM
2014/05/20 16:40:21
nit: No need for using since there is only one ins
| |
40 | |
39 HTMLVideoElementMediaSource::HTMLVideoElementMediaSource() { } | 41 HTMLVideoElementMediaSource::HTMLVideoElementMediaSource() { } |
40 | 42 |
41 HTMLVideoElementMediaSource::~HTMLVideoElementMediaSource() { } | 43 HTMLVideoElementMediaSource::~HTMLVideoElementMediaSource() { } |
42 | 44 |
43 VideoPlaybackQuality* HTMLVideoElementMediaSource::getVideoPlaybackQuality(HTMLV ideoElement& videoElement) | 45 VideoPlaybackQuality* HTMLVideoElementMediaSource::getVideoPlaybackQuality(HTMLV ideoElement& videoElement) |
44 { | 46 { |
45 unsigned total = 0; | 47 unsigned total = 0; |
46 unsigned dropped = 0; | 48 unsigned dropped = 0; |
47 unsigned corrupted = 0; | 49 unsigned corrupted = 0; |
48 MediaPlayer* player = videoElement.player(); | 50 WebMediaPlayer* webMediaPlayer = videoElement.webMediaPlayer(); |
49 if (player) { | 51 if (webMediaPlayer) { |
50 total = player->decodedFrameCount(); | 52 total = webMediaPlayer->decodedFrameCount(); |
51 dropped = player->droppedFrameCount(); | 53 dropped = webMediaPlayer->droppedFrameCount(); |
52 corrupted = player->corruptedFrameCount(); | 54 corrupted = webMediaPlayer->corruptedFrameCount(); |
53 } | 55 } |
54 | 56 |
55 return VideoPlaybackQuality::create(videoElement.document(), total, dropped, corrupted); | 57 return VideoPlaybackQuality::create(videoElement.document(), total, dropped, corrupted); |
56 } | 58 } |
57 | 59 |
58 } | 60 } |
OLD | NEW |