1# Copyright 2016 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5from autotest_lib.server import utils
6
7AUTHOR = 'chromeos-chameleon'
8NAME = 'audiovideo_AVSyncInternalDisplayAudioJack'
9PURPOSE = 'Measure audio/video sync from internal display and audio jack.'
10ATTRIBUTES = "suite:chameleon_audiovideo"
11TIME = 'SHORT'
12TEST_CATEGORY = 'Performance'
13TEST_CLASS = 'audiovideo'
14TEST_TYPE = 'server'
15DEPENDENCIES = 'chameleon:avsync_probe'
16JOB_RETRIES = 2
17
18DOC = """
19This test measure the audio/video synchronization quality while playing a
201080p 30fps MP4 video.
21"""
22
23VIDEO_URL = ('http://commondatastorage.googleapis.com/'
24        'chromiumos-test-assets-public/chameleon/'
25        'audiovideo_AVSyncInternalDisplayAudioJack/'
26        'testvideo.mp4')
27
28args_dict = utils.args_to_dict(args)
29chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict)
30
31def run(machine):
32    host = hosts.create_host(machine, chameleon_args=chameleon_args)
33    job.run_test("audiovideo_AVSyncInternalDisplayAudioJack", host=host,
34                 video_url=VIDEO_URL, capture_seconds=12, video_fps=30,
35                 sound_interval_frames=30, perf_prefix='1080_30fps')
36
37parallel_simple(run, machines)
38