| Index: tools/telemetry/telemetry/core/video.py
|
| diff --git a/tools/telemetry/telemetry/core/video.py b/tools/telemetry/telemetry/core/video.py
|
| index 4eb4cab3bbcf3714d1e69d18644de58d5c24ecd2..9444b509a0d39dcd9468c353e049d16d352fbfd7 100644
|
| --- a/tools/telemetry/telemetry/core/video.py
|
| +++ b/tools/telemetry/telemetry/core/video.py
|
| @@ -4,11 +4,12 @@
|
|
|
| import subprocess
|
|
|
| -from telemetry.core import bitmap
|
| from telemetry.core import platform
|
| +from telemetry.image_processing import image_util
|
| +from telemetry.image_processing import rgba_color
|
| from telemetry.util import cloud_storage
|
|
|
| -HIGHLIGHT_ORANGE_FRAME = bitmap.WEB_PAGE_TEST_ORANGE
|
| +HIGHLIGHT_ORANGE_FRAME = rgba_color.WEB_PAGE_TEST_ORANGE
|
|
|
| class BoundingBoxNotFoundException(Exception):
|
| pass
|
| @@ -38,10 +39,11 @@ class Video(object):
|
| tab content boundaries and then omits all frames displaying the flash.
|
|
|
| Yields:
|
| - (time_ms, bitmap) tuples representing each video keyframe. Only the first
|
| - frame in a run of sequential duplicate bitmaps is typically included.
|
| + (time_ms, image) tuples representing each video keyframe. Only the first
|
| + frame is a run of sequential duplicate bitmaps is typically included.
|
| time_ms is milliseconds since navigationStart.
|
| - bitmap is a telemetry.core.Bitmap.
|
| + image may be a telemetry.core.Bitmap, or a numpy array depending on
|
| + whether numpy is installed.
|
| """
|
| frame_generator = self._FramesFromMp4(self._video_file_obj.name)
|
|
|
| @@ -166,4 +168,4 @@ class Video(object):
|
| raise StopIteration
|
| assert num_read == len(frame_data), 'Unexpected frame size: %d' % num_read
|
| yield (GetFrameTimestampMs(proc.stderr),
|
| - bitmap.Bitmap(3, dimensions[0], dimensions[1], frame_data))
|
| + image_util.FromRGBPixels(dimensions[0], dimensions[1], frame_data))
|
|
|