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 blink { | 37 namespace blink { |
38 | 38 |
39 HTMLVideoElementMediaSource::HTMLVideoElementMediaSource() { } | |
40 | |
41 HTMLVideoElementMediaSource::~HTMLVideoElementMediaSource() { } | |
42 | |
43 VideoPlaybackQuality* HTMLVideoElementMediaSource::getVideoPlaybackQuality(HTMLV
ideoElement& videoElement) | 39 VideoPlaybackQuality* HTMLVideoElementMediaSource::getVideoPlaybackQuality(HTMLV
ideoElement& videoElement) |
44 { | 40 { |
45 unsigned total = 0; | 41 unsigned total = 0; |
46 unsigned dropped = 0; | 42 unsigned dropped = 0; |
47 unsigned corrupted = 0; | 43 unsigned corrupted = 0; |
48 WebMediaPlayer* webMediaPlayer = videoElement.webMediaPlayer(); | 44 WebMediaPlayer* webMediaPlayer = videoElement.webMediaPlayer(); |
49 if (webMediaPlayer) { | 45 if (webMediaPlayer) { |
50 total = webMediaPlayer->decodedFrameCount(); | 46 total = webMediaPlayer->decodedFrameCount(); |
51 dropped = webMediaPlayer->droppedFrameCount(); | 47 dropped = webMediaPlayer->droppedFrameCount(); |
52 corrupted = webMediaPlayer->corruptedFrameCount(); | 48 corrupted = webMediaPlayer->corruptedFrameCount(); |
53 } | 49 } |
54 | 50 |
55 return VideoPlaybackQuality::create(videoElement.document(), total, dropped,
corrupted); | 51 return VideoPlaybackQuality::create(videoElement.document(), total, dropped,
corrupted); |
56 } | 52 } |
57 | 53 |
58 } // namespace blink | 54 } // namespace blink |
OLD | NEW |