How to use video method of main Package

Best Selenoid code snippet using main.video

chrome_stack_decoder_verification.go

Source:chrome_stack_decoder_verification.go Github

copy

Full Screen

1// Copyright 2020 The Chromium OS Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4package video5import (6 "context"7 "chromiumos/tast/common/media/caps"8 "chromiumos/tast/local/media/decoding"9 "chromiumos/tast/testing"10 "chromiumos/tast/testing/hwdep"11)12var av1FilesFromBugs = []string{13 "test_vectors/av1/files_from_bugs/b_235138734_test-25fps-one-to-four-tiles.av1.ivf",14}15var av1CommonFiles = []string{16 "test_vectors/av1/8-bit/00000527.ivf",17 "test_vectors/av1/8-bit/00000535.ivf",18 "test_vectors/av1/8-bit/00000548.ivf",19 "test_vectors/av1/8-bit/48_delayed.ivf",20 "test_vectors/av1/8-bit/av1-1-b8-02-allintra.ivf",21 "test_vectors/av1/8-bit/av1-1-b8-03-sizeup.ivf",22 "test_vectors/av1/8-bit/frames_refs_short_signaling.ivf",23 "test_vectors/av1/8-bit/non_uniform_tiling.ivf",24 "test_vectors/av1/8-bit/test-25fps-192x288-only-tile-cols-is-power-of-2.ivf",25 "test_vectors/av1/8-bit/test-25fps-192x288-only-tile-rows-is-power-of-2.ivf",26 "test_vectors/av1/8-bit/test-25fps-192x288-tile-rows-3-tile-cols-3.ivf",27}28var av1FilmGrainFiles = []string{29 "test_vectors/av1/8-bit/av1-1-b8-23-film_grain-50.ivf",30 "test_vectors/av1/8-bit/ccvb_film_grain.ivf",31}32var av110BitCommonFiles = []string{33 "test_vectors/av1/10-bit/00000671.ivf",34 "test_vectors/av1/10-bit/00000672.ivf",35 "test_vectors/av1/10-bit/00000673.ivf",36 "test_vectors/av1/10-bit/00000674.ivf",37 "test_vectors/av1/10-bit/00000675.ivf",38 "test_vectors/av1/10-bit/00000716.ivf",39 "test_vectors/av1/10-bit/00000717.ivf",40 "test_vectors/av1/10-bit/00000718.ivf",41 "test_vectors/av1/10-bit/00000719.ivf",42 "test_vectors/av1/10-bit/00000720.ivf",43 "test_vectors/av1/10-bit/00000761.ivf",44 "test_vectors/av1/10-bit/00000762.ivf",45 "test_vectors/av1/10-bit/00000763.ivf",46 "test_vectors/av1/10-bit/00000764.ivf",47 "test_vectors/av1/10-bit/00000765.ivf",48 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-00.ivf",49 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-10.ivf",50 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-20.ivf",51 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-30.ivf",52 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-40.ivf",53 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-50.ivf",54 "test_vectors/av1/10-bit/av1-1-b10-00-quantizer-60.ivf",55}56var av110BitFilmGrainFiles = []string{57 "test_vectors/av1/10-bit/av1-1-b10-23-film_grain-50.ivf",58}59var h264FilesFromBugs = []string{60 "test_vectors/h264/files_from_bugs/b_149068426_invalid_video_layout_mtk_8183_with_direct_videodecoder.h264",61 "test_vectors/h264/files_from_bugs/b_172838252_pixelated_video_on_rk3399.h264",62 "test_vectors/h264/files_from_bugs/b_174733646_video_with_out_of_order_frames_mtk_8173.h264",63 "test_vectors/h264/files_from_bugs/b_210895987_still-colors-360p.h264",64}65var h2644KFilesFromBugs = []string{66 "test_vectors/h264/files_from_bugs/b_227047778_mtk_8195_artifacts.h264",67}68// These are invalid bistreams one way or another that are decoded correctly69// (no artifacts) with a software decoder but not when using certain hardware70// decoder implementations. These tests are expected to fail long-term, but it's71// interesting to have them to verify that e.g. the driver doesn't crash.72var h264InvalidBitstreams = []string{73 "test_vectors/h264/files_from_bugs/b_234651916_big_buck_bunny_artifacts_rk3399.h264",74 "test_vectors/h264/files_from_bugs/b_184041918_Webex_out_of_order_h264_frames.h264",75}76var h264Files = map[string][]string{77 "baseline": {78 "test_vectors/h264/baseline/AUD_MW_E.h264",79 "test_vectors/h264/baseline/BA1_Sony_D.h264",80 "test_vectors/h264/baseline/BA2_Sony_F.h264",81 "test_vectors/h264/baseline/BAMQ1_JVC_C.h264",82 "test_vectors/h264/baseline/BAMQ2_JVC_C.h264",83 "test_vectors/h264/baseline/BANM_MW_D.h264",84 "test_vectors/h264/baseline/BA_MW_D.h264",85 "test_vectors/h264/baseline/CI_MW_D.h264",86 "test_vectors/h264/baseline/CVSE2_Sony_B.h264",87 "test_vectors/h264/baseline/HCBP1_HHI_A.h264",88 "test_vectors/h264/baseline/HCBP2_HHI_A.h264",89 "test_vectors/h264/baseline/LS_SVA_D.h264",90 "test_vectors/h264/baseline/MIDR_MW_D.h264",91 "test_vectors/h264/baseline/MPS_MW_A.h264",92 "test_vectors/h264/baseline/MR1_MW_A.h264",93 "test_vectors/h264/baseline/MR2_MW_A.h264",94 "test_vectors/h264/baseline/NL1_Sony_D.h264",95 "test_vectors/h264/baseline/NL2_Sony_H.h264",96 "test_vectors/h264/baseline/NLMQ1_JVC_C.h264",97 "test_vectors/h264/baseline/NLMQ2_JVC_C.h264",98 "test_vectors/h264/baseline/NRF_MW_E.h264",99 "test_vectors/h264/baseline/SVA_BA1_B.h264",100 "test_vectors/h264/baseline/SVA_BA2_D.h264",101 "test_vectors/h264/baseline/SVA_NL1_B.h264",102 "test_vectors/h264/baseline/SVA_NL2_E.h264",103 // The following test vectors are disabled because they don't verify that104 // |max_num_reorder_frames| is smaller or equal to the DPB size, see105 // b/216179527.106 //"test_vectors/h264/baseline/MR2_TANDBERG_E.h264",107 //"test_vectors/h264/baseline/MR3_TANDBERG_B.h264",108 //"test_vectors/h264/baseline/MR4_TANDBERG_C.h264",109 //"test_vectors/h264/baseline/MR5_TANDBERG_C.h264",110 },111 "main": {112 "test_vectors/h264/main/CABA1_SVA_B.h264",113 "test_vectors/h264/main/CABA1_Sony_D.h264",114 "test_vectors/h264/main/CABA2_SVA_B.h264",115 "test_vectors/h264/main/CABA2_Sony_E.h264",116 "test_vectors/h264/main/CABA3_SVA_B.h264",117 "test_vectors/h264/main/CABA3_Sony_C.h264",118 "test_vectors/h264/main/CABA3_TOSHIBA_E.h264",119 "test_vectors/h264/main/CACQP3_Sony_D.h264",120 "test_vectors/h264/main/CANL1_SVA_B.h264",121 "test_vectors/h264/main/CANL1_Sony_E.h264",122 "test_vectors/h264/main/CANL1_TOSHIBA_G.h264",123 "test_vectors/h264/main/CANL2_SVA_B.h264",124 "test_vectors/h264/main/CANL2_Sony_E.h264",125 "test_vectors/h264/main/CANL3_SVA_B.h264",126 "test_vectors/h264/main/CANL3_Sony_C.h264",127 "test_vectors/h264/main/CANL4_SVA_B.h264",128 "test_vectors/h264/main/CAPCM1_Sand_E.h264",129 "test_vectors/h264/main/CAPCMNL1_Sand_E.h264",130 "test_vectors/h264/main/CAPM3_Sony_D.h264",131 "test_vectors/h264/main/CAQP1_Sony_B.h264",132 "test_vectors/h264/main/CAWP1_TOSHIBA_E.h264",133 "test_vectors/h264/main/CAWP5_TOSHIBA_E.h264",134 "test_vectors/h264/main/CVBS3_Sony_C.h264",135 "test_vectors/h264/main/CVPCMNL1_SVA_C.h264",136 "test_vectors/h264/main/CVPCMNL2_SVA_C.h264",137 "test_vectors/h264/main/CVSE3_Sony_H.h264",138 "test_vectors/h264/main/CVSEFDFT3_Sony_E.h264",139 "test_vectors/h264/main/CVWP1_TOSHIBA_E.h264",140 "test_vectors/h264/main/CVWP2_TOSHIBA_E.h264",141 "test_vectors/h264/main/CVWP3_TOSHIBA_E.h264",142 "test_vectors/h264/main/CVWP5_TOSHIBA_E.h264",143 "test_vectors/h264/main/NL3_SVA_E.h264",144 "test_vectors/h264/main/camp_mot_frm0_full.h264",145 "test_vectors/h264/main/cvmp_mot_frm0_full_B.h264",146 "test_vectors/h264/main/src19td.IBP.h264",147 "test_vectors/h264/main/HCMP1_HHI_A.h264",148 // The following test vectors are disabled because they don't verify the149 // SPS's |frame_mbs_only_flag|, i.e. they contain interlaced macroblocks150 // which are not supported, see b/216319263.151 //"test_vectors/h264/main/CAMA1_Sony_C.h264",152 //"test_vectors/h264/main/CAMA1_TOSHIBA_B.h264",153 //"test_vectors/h264/main/CAMA3_Sand_E.h264",154 //"test_vectors/h264/main/CAMACI3_Sony_C.h264",155 //"test_vectors/h264/main/CAMANL1_TOSHIBA_B.h264",156 //"test_vectors/h264/main/CAMANL2_TOSHIBA_B.h264",157 //"test_vectors/h264/main/CAMANL3_Sand_E.h264",158 //"test_vectors/h264/main/CAMASL3_Sony_B.h264",159 //"test_vectors/h264/main/CAMP_MOT_MBAFF_L30.h264",160 //"test_vectors/h264/main/CAMP_MOT_MBAFF_L31.h264",161 //"test_vectors/h264/main/CANLMA2_Sony_C.h264",162 //"test_vectors/h264/main/CANLMA3_Sony_C.h264",163 //"test_vectors/h264/main/CVCANLMA2_Sony_C.h264",164 //"test_vectors/h264/main/CVMA1_Sony_D.h264",165 //"test_vectors/h264/main/CVMA1_TOSHIBA_B.h264",166 //"test_vectors/h264/main/CVMANL1_TOSHIBA_B.h264",167 //"test_vectors/h264/main/CVMANL2_TOSHIBA_B.h264",168 //"test_vectors/h264/main/CVMAQP2_Sony_G.h264",169 //"test_vectors/h264/main/CVMAQP3_Sony_D.h264",170 //"test_vectors/h264/main/camp_mot_mbaff0_full.h264",171 //"test_vectors/h264/main/cvmp_mot_mbaff0_full_B.h264",172 },173 // The following test vectors are separated because they don't verify that all174 // slice header's |first_mb_in_slice| is zero, which is not supported by175 // Chromium's parsers (see b/216179527). Stateful decoders, who have their own176 // H.264 parsers, might support them, though.177 "first_mb_in_slice": {178 "test_vectors/h264/baseline/BA1_FT_C.h264",179 "test_vectors/h264/baseline/BASQP1_Sony_C.h264",180 "test_vectors/h264/baseline/CI1_FT_B.h264",181 "test_vectors/h264/baseline/SVA_Base_B.h264",182 "test_vectors/h264/baseline/SVA_CL1_E.h264",183 "test_vectors/h264/baseline/SVA_FM1_E.h264",184 "test_vectors/h264/baseline/MR1_BT_A.h264",185 "test_vectors/h264/main/CABACI3_Sony_B.h264",186 "test_vectors/h264/main/CABAST3_Sony_E.h264",187 "test_vectors/h264/main/CABASTBR3_Sony_B.h264",188 "test_vectors/h264/main/SL1_SVA_B.h264",189 },190}191var vp8ComprehensiveFiles = []string{192 "test_vectors/vp8/vp80-00-comprehensive-001.ivf",193 "test_vectors/vp8/vp80-00-comprehensive-002.ivf",194 "test_vectors/vp8/vp80-00-comprehensive-003.ivf",195 "test_vectors/vp8/vp80-00-comprehensive-004.ivf",196 "test_vectors/vp8/vp80-00-comprehensive-005.ivf",197 "test_vectors/vp8/vp80-00-comprehensive-007.ivf",198 "test_vectors/vp8/vp80-00-comprehensive-008.ivf",199 "test_vectors/vp8/vp80-00-comprehensive-009.ivf",200 "test_vectors/vp8/vp80-00-comprehensive-010.ivf",201 "test_vectors/vp8/vp80-00-comprehensive-011.ivf",202 "test_vectors/vp8/vp80-00-comprehensive-012.ivf",203 "test_vectors/vp8/vp80-00-comprehensive-013.ivf",204 "test_vectors/vp8/vp80-00-comprehensive-015.ivf",205 "test_vectors/vp8/vp80-00-comprehensive-016.ivf",206 "test_vectors/vp8/vp80-00-comprehensive-017.ivf",207 "test_vectors/vp8/vp80-00-comprehensive-018.ivf",208}209var vp8InterFiles = []string{210 "test_vectors/vp8/inter/vp80-02-inter-1402.ivf",211 "test_vectors/vp8/inter/vp80-02-inter-1424.ivf",212 "test_vectors/vp8/inter/vp80-02-inter-1418.ivf",213 "test_vectors/vp8/inter/vp80-02-inter-1412.ivf",214 "test_vectors/vp8/inter/vp80-03-segmentation-1442.ivf",215 "test_vectors/vp8/inter/vp80-03-segmentation-1436.ivf",216 "test_vectors/vp8/inter/vp80-03-segmentation-1432.ivf",217 "test_vectors/vp8/inter/vp80-03-segmentation-1427.ivf",218 "test_vectors/vp8/inter/vp80-03-segmentation-1426.ivf",219 "test_vectors/vp8/inter/vp80-03-segmentation-1435.ivf",220 "test_vectors/vp8/inter/vp80-03-segmentation-1403.ivf",221 "test_vectors/vp8/inter/vp80-03-segmentation-1425.ivf",222 "test_vectors/vp8/inter/vp80-03-segmentation-1441.ivf",223 "test_vectors/vp8/inter/vp80-03-segmentation-1437.ivf",224 "test_vectors/vp8/inter/vp80-05-sharpness-1434.ivf",225 "test_vectors/vp8/inter/vp80-05-sharpness-1430.ivf",226 "test_vectors/vp8/inter/vp80-05-sharpness-1443.ivf",227 "test_vectors/vp8/inter/vp80-05-sharpness-1439.ivf",228 "test_vectors/vp8/inter/vp80-05-sharpness-1428.ivf",229 "test_vectors/vp8/inter/vp80-05-sharpness-1438.ivf",230 "test_vectors/vp8/inter/vp80-05-sharpness-1431.ivf",231 "test_vectors/vp8/inter/vp80-05-sharpness-1440.ivf",232 "test_vectors/vp8/inter/vp80-05-sharpness-1433.ivf",233 "test_vectors/vp8/inter/vp80-05-sharpness-1429.ivf",234}235var vp8InterMultiCoeffFiles = []string{236 "test_vectors/vp8/inter_multi_coeff/vp80-03-segmentation-1409.ivf",237 "test_vectors/vp8/inter_multi_coeff/vp80-03-segmentation-1408.ivf",238 "test_vectors/vp8/inter_multi_coeff/vp80-03-segmentation-1410.ivf",239 "test_vectors/vp8/inter_multi_coeff/vp80-03-segmentation-1413.ivf",240 "test_vectors/vp8/inter_multi_coeff/vp80-04-partitions-1405.ivf",241 "test_vectors/vp8/inter_multi_coeff/vp80-04-partitions-1406.ivf",242 "test_vectors/vp8/inter_multi_coeff/vp80-04-partitions-1404.ivf",243}244var vp8InterSegmentFiles = []string{245 "test_vectors/vp8/inter_segment/vp80-03-segmentation-1407.ivf",246}247var vp8IntraFiles = []string{248 "test_vectors/vp8/intra/vp80-01-intra-1416.ivf",249 "test_vectors/vp8/intra/vp80-01-intra-1417.ivf",250 "test_vectors/vp8/intra/vp80-01-intra-1411.ivf",251 "test_vectors/vp8/intra/vp80-01-intra-1400.ivf",252 "test_vectors/vp8/intra/vp80-03-segmentation-1401.ivf",253}254var vp8IntraMultiCoeffSegmentFiles = []string{255 "test_vectors/vp8/intra_multi_coeff/vp80-03-segmentation-1414.ivf",256}257var vp8IntraSegmentFiles = []string{258 "test_vectors/vp8/intra_segment/vp80-03-segmentation-1415.ivf",259}260var vp9FilesFromBugs = []string{261 "test_vectors/vp9/files_from_bugs/b_177839888__rk3399_vp9_artifacts_with_video_decoder_japanews24.ivf",262}263var vp90Group1Buf = []string{264 "test_vectors/vp9/Profile_0_8bit/buf/crowd_run_256X144_fr15_bd8_8buf_l1.ivf",265 "test_vectors/vp9/Profile_0_8bit/buf/grass_1_256X144_fr15_bd8_8buf_l1.ivf",266 "test_vectors/vp9/Profile_0_8bit/buf/street1_1_256X144_fr15_bd8_8buf_l1.ivf",267 "test_vectors/vp9/Profile_0_8bit/buf/crowd_run_384X192_fr30_bd8_8buf_l11.ivf",268 "test_vectors/vp9/Profile_0_8bit/buf/grass_1_384X192_fr30_bd8_8buf_l11.ivf",269 "test_vectors/vp9/Profile_0_8bit/buf/street1_1_384X192_fr30_bd8_8buf_l11.ivf",270}271var vp90Group1FrmResize = []string{272 "test_vectors/vp9/Profile_0_8bit/frm_resize/crowd_run_256X144_fr15_bd8_frm_resize_l1.ivf",273 "test_vectors/vp9/Profile_0_8bit/frm_resize/grass_1_256X144_fr15_bd8_frm_resize_l1.ivf",274 "test_vectors/vp9/Profile_0_8bit/frm_resize/street1_1_256X144_fr15_bd8_frm_resize_l1.ivf",275 "test_vectors/vp9/Profile_0_8bit/frm_resize/crowd_run_384X192_fr30_bd8_frm_resize_l11.ivf",276 "test_vectors/vp9/Profile_0_8bit/frm_resize/grass_1_384X192_fr30_bd8_frm_resize_l11.ivf",277 "test_vectors/vp9/Profile_0_8bit/frm_resize/street1_1_384X192_fr30_bd8_frm_resize_l11.ivf",278}279var vp90Group1GfDist = []string{280 "test_vectors/vp9/Profile_0_8bit/gf_dist/crowd_run_256X144_fr15_bd8_gf_dist_4_l1.ivf",281 "test_vectors/vp9/Profile_0_8bit/gf_dist/grass_1_256X144_fr15_bd8_gf_dist_4_l1.ivf",282 "test_vectors/vp9/Profile_0_8bit/gf_dist/street1_1_256X144_fr15_bd8_gf_dist_4_l1.ivf",283 "test_vectors/vp9/Profile_0_8bit/gf_dist/crowd_run_384X192_fr30_bd8_gf_dist_4_l11.ivf",284 "test_vectors/vp9/Profile_0_8bit/gf_dist/grass_1_384X192_fr30_bd8_gf_dist_4_l11.ivf",285 "test_vectors/vp9/Profile_0_8bit/gf_dist/street1_1_384X192_fr30_bd8_gf_dist_4_l11.ivf",286}287var vp90Group1OddSize = []string{288 "test_vectors/vp9/Profile_0_8bit/odd_size/crowd_run_248X144_fr15_bd8_odd_size_l1.ivf",289 "test_vectors/vp9/Profile_0_8bit/odd_size/grass_1_248X144_fr15_bd8_odd_size_l1.ivf",290 "test_vectors/vp9/Profile_0_8bit/odd_size/street1_1_248X144_fr15_bd8_odd_size_l1.ivf",291 "test_vectors/vp9/Profile_0_8bit/odd_size/crowd_run_376X184_fr30_bd8_odd_size_l11.ivf",292 "test_vectors/vp9/Profile_0_8bit/odd_size/grass_1_376X184_fr30_bd8_odd_size_l11.ivf",293 "test_vectors/vp9/Profile_0_8bit/odd_size/street1_1_376X184_fr30_bd8_odd_size_l11.ivf",294}295var vp90Group1Sub8x8 = []string{296 "test_vectors/vp9/Profile_0_8bit/sub8X8/crowd_run_256X144_fr15_bd8_sub8X8_l1.ivf",297 "test_vectors/vp9/Profile_0_8bit/sub8X8/grass_1_256X144_fr15_bd8_sub8X8_l1.ivf",298 "test_vectors/vp9/Profile_0_8bit/sub8X8/street1_1_256X144_fr15_bd8_sub8X8_l1.ivf",299 "test_vectors/vp9/Profile_0_8bit/sub8X8/crowd_run_384X192_fr30_bd8_sub8X8_l11.ivf",300 "test_vectors/vp9/Profile_0_8bit/sub8X8/grass_1_384X192_fr30_bd8_sub8X8_l11.ivf",301 "test_vectors/vp9/Profile_0_8bit/sub8X8/street1_1_384X192_fr30_bd8_sub8X8_l11.ivf",302}303var vp90Group1Sub8x8Sf = []string{304 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/crowd_run_256X144_fr15_bd8_sub8x8_sf_l1.ivf",305 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/grass_1_256X144_fr15_bd8_sub8x8_sf_l1.ivf",306 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/street1_1_256X144_fr15_bd8_sub8x8_sf_l1.ivf",307 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/crowd_run_384X192_fr30_bd8_sub8x8_sf_l11.ivf",308 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/grass_1_384X192_fr30_bd8_sub8x8_sf_l11.ivf",309 "test_vectors/vp9/Profile_0_8bit/sub8x8_sf/street1_1_384X192_fr30_bd8_sub8x8_sf_l11.ivf",310}311var vp9SVCFiles = []string{312 "test_vectors/vp9/kSVC/ksvc_3sl_3tl_key100.ivf",313}314func appendJSONFiles(videoFiles []string) []string {315 var tf []string316 for _, file := range videoFiles {317 tf = append(tf, file)318 tf = append(tf, file+".json")319 }320 return tf321}322// chromeStackDecoderVerificationTestParam is used to describe the options used323// to run each test.324type chromeStackDecoderVerificationTestParam struct {325 videoFiles []string // The paths of video files to be tested.326 validatorType decoding.ValidatorType // The frame validation type of video_decode_accelerator_tests.327 // If set, verify that MD5SUM verification is not successful.328 mustFail bool329}330func init() {331 testing.AddTest(&testing.Test{332 Func: ChromeStackDecoderVerification,333 LacrosStatus: testing.LacrosVariantUnneeded,334 Desc: "Verifies video decoding using Chrome's stack (via the video_decode_accelerator_tests binary) and either MD5 or SSIM criteria",335 Contacts: []string{336 "mcasas@chromium.org",337 "hiroh@chromium.org", // Underlying binary author.338 "chromeos-gfx-video@google.com",339 },340 Fixture: "graphicsNoChrome",341 SoftwareDeps: []string{"chrome"},342 Params: []testing.Param{{343 Name: "av1_files_from_bugs",344 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},345 ExtraSoftwareDeps: []string{caps.HWDecodeAV1},346 ExtraData: appendJSONFiles(av1FilesFromBugs),347 Val: chromeStackDecoderVerificationTestParam{348 videoFiles: av1FilesFromBugs,349 validatorType: decoding.MD5,350 },351 }, {352 Name: "av1_common",353 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},354 ExtraSoftwareDeps: []string{caps.HWDecodeAV1},355 ExtraData: appendJSONFiles(av1CommonFiles),356 Val: chromeStackDecoderVerificationTestParam{357 videoFiles: av1CommonFiles,358 validatorType: decoding.MD5,359 },360 }, {361 Name: "av1_film_grain",362 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},363 ExtraSoftwareDeps: []string{caps.HWDecodeAV1},364 // Different decoders may use different film grain synthesis methods while365 // producing a visually correct output (AV1 spec 7.2). Thus we validate366 // the decoding of film-grain streams using SSIM.367 ExtraData: appendJSONFiles(av1FilmGrainFiles),368 Val: chromeStackDecoderVerificationTestParam{369 videoFiles: av1FilmGrainFiles,370 validatorType: decoding.SSIM,371 },372 }, {373 Name: "av1_10bit_common",374 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},375 ExtraSoftwareDeps: []string{caps.HWDecodeAV1_10BPP},376 ExtraData: appendJSONFiles(av110BitCommonFiles),377 Val: chromeStackDecoderVerificationTestParam{378 videoFiles: av110BitCommonFiles,379 validatorType: decoding.MD5,380 },381 }, {382 Name: "av1_10bit_film_grain",383 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},384 ExtraSoftwareDeps: []string{caps.HWDecodeAV1_10BPP},385 // Different decoders may use different film grain synthesis methods while386 // producing a visually correct output (AV1 spec 7.2). Thus, for volteer,387 // don't validate the decoding of film-grain streams using MD5. Instead,388 // validate them using SSIM (see the av1_10bit_ssim test).389 ExtraData: appendJSONFiles(av110BitFilmGrainFiles),390 Val: chromeStackDecoderVerificationTestParam{391 videoFiles: av110BitFilmGrainFiles,392 validatorType: decoding.SSIM,393 },394 }, {395 Name: "h264_files_from_bugs",396 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},397 ExtraSoftwareDeps: []string{caps.HWDecodeH264, "proprietary_codecs"},398 ExtraData: appendJSONFiles(h264FilesFromBugs),399 Val: chromeStackDecoderVerificationTestParam{400 videoFiles: h264FilesFromBugs,401 validatorType: decoding.MD5,402 },403 }, {404 Name: "h264_4k_files_from_bugs",405 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},406 ExtraSoftwareDeps: []string{caps.HWDecodeH264_4K, "proprietary_codecs"},407 ExtraData: appendJSONFiles(h2644KFilesFromBugs),408 Val: chromeStackDecoderVerificationTestParam{409 videoFiles: h2644KFilesFromBugs,410 validatorType: decoding.MD5,411 },412 }, {413 Name: "h264_invalid_bitstreams",414 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},415 ExtraSoftwareDeps: []string{caps.HWDecodeH264, "proprietary_codecs"},416 ExtraData: appendJSONFiles(h264InvalidBitstreams),417 Val: chromeStackDecoderVerificationTestParam{418 videoFiles: h264InvalidBitstreams,419 validatorType: decoding.MD5,420 mustFail: true,421 },422 }, {423 Name: "h264_baseline",424 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},425 ExtraSoftwareDeps: []string{caps.HWDecodeH264, "proprietary_codecs"},426 ExtraData: appendJSONFiles(h264Files["baseline"]),427 Val: chromeStackDecoderVerificationTestParam{428 videoFiles: h264Files["baseline"],429 validatorType: decoding.MD5,430 },431 }, {432 Name: "h264_main",433 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},434 ExtraSoftwareDeps: []string{caps.HWDecodeH264, "proprietary_codecs"},435 ExtraData: appendJSONFiles(h264Files["main"]),436 Val: chromeStackDecoderVerificationTestParam{437 videoFiles: h264Files["main"],438 validatorType: decoding.MD5,439 },440 }, {441 Name: "h264_first_mb_in_slice",442 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},443 ExtraHardwareDeps: hwdep.D(hwdep.SupportsV4L2StatefulVideoDecoding()),444 ExtraSoftwareDeps: []string{caps.HWDecodeH264, "proprietary_codecs"},445 ExtraData: appendJSONFiles(h264Files["first_mb_in_slice"]),446 Val: chromeStackDecoderVerificationTestParam{447 videoFiles: h264Files["first_mb_in_slice"],448 validatorType: decoding.MD5,449 },450 }, {451 Name: "vp8_comprehensive",452 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},453 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},454 ExtraData: appendJSONFiles(vp8ComprehensiveFiles),455 Val: chromeStackDecoderVerificationTestParam{456 videoFiles: vp8ComprehensiveFiles,457 validatorType: decoding.MD5,458 },459 }, {460 Name: "vp8_inter",461 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},462 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},463 ExtraData: appendJSONFiles(vp8InterFiles),464 Val: chromeStackDecoderVerificationTestParam{465 videoFiles: vp8InterFiles,466 validatorType: decoding.MD5,467 },468 }, {469 Name: "vp8_inter_multi_coeff",470 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},471 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},472 ExtraData: appendJSONFiles(vp8InterMultiCoeffFiles),473 Val: chromeStackDecoderVerificationTestParam{474 videoFiles: vp8InterMultiCoeffFiles,475 validatorType: decoding.MD5,476 },477 }, {478 Name: "vp8_inter_segment",479 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},480 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},481 ExtraData: appendJSONFiles(vp8InterSegmentFiles),482 Val: chromeStackDecoderVerificationTestParam{483 videoFiles: vp8InterSegmentFiles,484 validatorType: decoding.MD5,485 },486 }, {487 Name: "vp8_intra",488 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},489 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},490 ExtraData: appendJSONFiles(vp8IntraFiles),491 Val: chromeStackDecoderVerificationTestParam{492 videoFiles: vp8IntraFiles,493 validatorType: decoding.MD5,494 },495 }, {496 Name: "vp8_intra_multi_coeff",497 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},498 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},499 ExtraData: appendJSONFiles(vp8IntraMultiCoeffSegmentFiles),500 Val: chromeStackDecoderVerificationTestParam{501 videoFiles: vp8IntraMultiCoeffSegmentFiles,502 validatorType: decoding.MD5,503 },504 }, {505 Name: "vp8_intra_segment",506 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},507 ExtraSoftwareDeps: []string{caps.HWDecodeVP8},508 ExtraData: appendJSONFiles(vp8IntraSegmentFiles),509 Val: chromeStackDecoderVerificationTestParam{510 videoFiles: vp8IntraSegmentFiles,511 validatorType: decoding.MD5,512 },513 }, {514 Name: "vp9_files_from_bugs",515 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},516 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},517 ExtraData: appendJSONFiles(vp9FilesFromBugs),518 Val: chromeStackDecoderVerificationTestParam{519 videoFiles: vp9FilesFromBugs,520 validatorType: decoding.MD5,521 },522 }, {523 Name: "vp9_0_group1_buf",524 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},525 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},526 ExtraData: appendJSONFiles(vp90Group1Buf),527 Val: chromeStackDecoderVerificationTestParam{528 videoFiles: vp90Group1Buf,529 validatorType: decoding.MD5,530 },531 }, {532 Name: "vp9_0_group1_frm_resize",533 // TODO(b/207057398): Reenable when VideoDecoder supports resolution changes in non keyframes.534 //ExtraAttr: []string{"group:mainline", "informational"},535 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},536 ExtraData: appendJSONFiles(vp90Group1FrmResize),537 Val: chromeStackDecoderVerificationTestParam{538 videoFiles: vp90Group1FrmResize,539 validatorType: decoding.MD5,540 },541 }, {542 Name: "vp9_0_group1_gf_dist",543 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},544 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},545 ExtraData: appendJSONFiles(vp90Group1GfDist),546 Val: chromeStackDecoderVerificationTestParam{547 videoFiles: vp90Group1GfDist,548 validatorType: decoding.MD5,549 },550 }, {551 Name: "vp9_0_group1_odd_size",552 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},553 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},554 ExtraData: appendJSONFiles(vp90Group1OddSize),555 Val: chromeStackDecoderVerificationTestParam{556 videoFiles: vp90Group1OddSize,557 validatorType: decoding.MD5,558 },559 }, {560 Name: "vp9_0_group1_sub8x8",561 ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},562 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},563 ExtraData: appendJSONFiles(vp90Group1Sub8x8),564 Val: chromeStackDecoderVerificationTestParam{565 videoFiles: vp90Group1Sub8x8,566 validatorType: decoding.MD5,567 },568 }, {569 Name: "vp9_0_group1_sub8x8_sf",570 // TODO(b/207057398): Reenable when VideoDecoder supports resolution changes in non keyframes.571 //ExtraAttr: []string{"group:mainline", "informational"},572 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},573 ExtraData: appendJSONFiles(vp90Group1Sub8x8Sf),574 Val: chromeStackDecoderVerificationTestParam{575 videoFiles: vp90Group1Sub8x8Sf,576 validatorType: decoding.MD5,577 },578 }, {579 Name: "vp9_0_svc",580 // TODO(b/210167476): Reenable when it's not failing everywhere.581 //ExtraAttr: []string{"group:graphics", "graphics_video", "graphics_perbuild", "graphics_video_chromestackdecoding"},582 ExtraSoftwareDeps: []string{caps.HWDecodeVP9},583 ExtraData: appendJSONFiles(vp9SVCFiles),584 Val: chromeStackDecoderVerificationTestParam{585 videoFiles: vp9SVCFiles,586 validatorType: decoding.MD5,587 },588 }},589 })590}591func ChromeStackDecoderVerification(ctx context.Context, s *testing.State) {592 var tv []string593 param := s.Param().(chromeStackDecoderVerificationTestParam)594 for _, file := range param.videoFiles {595 tv = append(tv, s.DataPath(file))596 }597 if err := decoding.RunAccelVideoTestWithTestVectors(ctx, s.OutDir(), tv, param.validatorType, param.mustFail); err != nil {598 s.Fatal("test failed: ", err)599 }600}...

Full Screen

Full Screen

main.go

Source:main.go Github

copy

Full Screen

...22 return23 }24 }))25 // Check whether ffmpeg exists on the machine26 var video bool27 if _, err := exec.LookPath("ffmpeg"); err == nil {28 // Execute ffmpeg29 var in io.WriteCloser30 if _, err = astikit.ExecCmd(w, astikit.ExecCmdOptions{31 Args: []string{"-y", "-i", "pipe:0", "example.ts"},32 CmdAdapter: func(cmd *exec.Cmd, h *astikit.ExecHandler) (err error) {33 // Pipe stdin34 if in, err = cmd.StdinPipe(); err != nil {35 err = fmt.Errorf("main: piping stdin failed: %w", err)36 return37 }38 // Handle new video packets39 d.On(astitello.VideoPacketEvent, astitello.VideoPacketEventHandler(func(p []byte) {40 // Check status41 if h.Status() != astikit.ExecStatusRunning {42 return43 }44 // Write the packet in stdin45 if _, err := in.Write(p); err != nil {46 l.Println(fmt.Errorf("main: writing video packet failed: %w", err))47 return48 }49 }))50 return51 },52 Name: "ffmpeg",53 }); err != nil {54 l.Println(fmt.Errorf("main: executing ffmpeg failed: %w", err))55 return56 }57 defer in.Close()58 // Update59 video = true60 } else {61 // Log62 l.Println("main: ffmpeg was not found, video won't be started")63 }64 // Handle take off event65 d.On(astitello.TakeOffEvent, func(interface{}) { l.Println("main: drone has took off!") })66 // Start the drone67 if err := d.Start(); err != nil {68 l.Println(fmt.Errorf("main: starting to the drone failed: %w", err))69 return70 }71 defer d.Close()72 // Execute in a task73 w.NewTask().Do(func() {74 // Start video75 if video {76 if err := d.StartVideo(); err != nil {77 l.Println(fmt.Errorf("main: starting video failed: %w", err))78 return79 }80 }81 // Take off82 if err := d.TakeOff(); err != nil {83 l.Println(fmt.Errorf("main: taking off failed: %w", err))84 return85 }86 // Flip87 if err := d.Flip(astitello.FlipRight); err != nil {88 l.Println(fmt.Errorf("main: flipping failed: %w", err))89 return90 }91 // Log state92 l.Printf("main: state is: %+v\n", d.State())93 // Land94 if err := d.Land(); err != nil {95 l.Println(fmt.Errorf("main: landing failed: %w", err))96 return97 }98 // Stop video99 if video {100 if err := d.StopVideo(); err != nil {101 l.Println(fmt.Errorf("main: stopping video failed: %w", err))102 return103 }104 }105 // Stop worker106 w.Stop()107 })108 // Wait109 w.Wait()110}...

Full Screen

Full Screen

service.go

Source:service.go Github

copy

Full Screen

...3 "context"4 "go-common/app/interface/main/favorite/conf"5 musicDao "go-common/app/interface/main/favorite/dao/music"6 topicDao "go-common/app/interface/main/favorite/dao/topic"7 videoDao "go-common/app/interface/main/favorite/dao/video"8 arcrpc "go-common/app/service/main/archive/api/gorpc"9 favpb "go-common/app/service/main/favorite/api"10 "go-common/library/log"11 "go-common/library/stat/prom"12 "go-common/library/sync/pipeline/fanout"13)14// Service define fav service15type Service struct {16 conf *conf.Config17 // dao18 videoDao *videoDao.Dao19 topicDao *topicDao.Dao20 musicDao *musicDao.Dao21 // cache chan22 cache *fanout.Fanout23 // prom24 prom *prom.Prom25 // rpc26 favClient favpb.FavoriteClient27 arcRPC *arcrpc.Service228}29// New return fav service30func New(c *conf.Config) (s *Service) {31 s = &Service{32 conf: c,33 // dao34 videoDao: videoDao.New(c),35 topicDao: topicDao.New(c),36 musicDao: musicDao.New(c),37 // cache38 cache: fanout.New("cache"),39 // prom40 prom: prom.New().WithTimer("fav_add_video", []string{"method"}),41 // rpc42 arcRPC: arcrpc.New2(c.RPCClient2.Archive),43 }44 favClient, err := favpb.New(c.RPCClient2.FavClient)45 if err != nil {46 panic(err)47 }48 s.favClient = favClient49 return50}51// Ping check service health52func (s *Service) Ping(c context.Context) (err error) {53 return s.videoDao.Ping(c)54}55// Close close service56func (s *Service) Close() {57 s.videoDao.Close()58}59// PromError stat and log.60func (s *Service) PromError(name string, format string, args ...interface{}) {61 prom.BusinessErrCount.Incr(name)62 log.Error(format, args...)63}

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fontBytes, err := ioutil.ReadFile("./fonts/arial.ttf")4 if err != nil {5 log.Fatal(err)6 }7 f, err := freetype.ParseFont(fontBytes)8 if err != nil {9 log.Fatal(err)10 }11 fc := freetype.NewContext()12 fc.SetDPI(72)13 fc.SetFont(f)14 fc.SetFontSize(12)15 fc.SetClip(image.Rect(0, 0, 256, 256))16 fc.SetDst(image.NewUniform(color.Black))17 fc.SetSrc(image.NewUniform(color.White))18 fc.SetClip(image.Rect(0, 0, 256, 256))19 fc.SetDst(image.NewUniform(color.Black))20 fc.SetSrc(image.NewUniform(color.White))21 img := image.NewRGBA(image.Rect(0, 0, 256, 256))22 draw.Draw(img, img.Bounds(), &image.Uniform{color.White}, image.ZP, draw.Src)23 fc.SetSrc(image.NewUniform(color.Black))24 pt := freetype.Pt(10, 10+int(fc.PointToFixed(12)>>6))25 _, err = fc.DrawString("Hello, World!", pt)26 if err != nil {27 log.Fatal(err)

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import "fmt"2type video struct {3}4func (v video) play() {5 fmt.Println("Playing Video")6}7func (v video) stop() {8 fmt.Println("Stopping Video")9}10func (v video) pause() {11 fmt.Println("Pausing Video")12}13func (v video) resume() {14 fmt.Println("Resuming Video")15}16func (v video) info() {17 fmt.Println("Video Name: ", v.name)18 fmt.Println("Video Size: ", v.size)19 fmt.Println("Video Duration: ", v.duration)20}21func main() {22 v.play()23 v.pause()24 v.resume()25 v.stop()26 v.info()27}28import "fmt"29type video struct {30}31func (v video) play() {32 fmt.Println("Playing Video")33}34func (v video) stop() {35 fmt.Println("Stopping Video")36}37func (v video) pause() {38 fmt.Println("Pausing Video")39}40func (v video) resume() {41 fmt.Println("Resuming Video")42}43func (v video) info() {44 fmt.Println("Video Name: ", v.name)45 fmt.Println("Video Size: ", v.size)46 fmt.Println("Video Duration: ", v.duration)47}48func main() {49 v.play()50 v.pause()51 v.resume()52 v.stop()53 v.info()54}55import "fmt"56type video struct {57}

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2type main struct {3}4func main() {5 m.video()6}7func (m *main) video() {8 fmt.Println("video")9}10import (11type main struct {12}13func main() {14 m.audio()15}16func (m *main) audio() {17 fmt.Println("audio")18}19I have tried to do this by creating a package for main struct in main.go file and then importing that package in 1.go and 2.go file but I am not able to do that too. I am getting an error: cannot find package "main" in any of:20I have tried to do this by creating a package for main struct in main.go file and then importing that package in 1.go and 2.go file but I am not able to do that too. I am getting an error: cannot find package "main" in any of:21I have tried to do this by creating a package for main struct in main.go file and then importing that package in 1.go and 2.go file but I am not able to do that too. I am getting an error: cannot find package "main" in any of:22I have tried to do this by creating a package for main struct in main.go file and then importing that package in 1.go and 2.go file but I am not able to do that too. I am getting an error: cannot find package "main" in any of:23I have tried to do this by creating a package for main struct in main.go file and then importing that package in

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println("Hello, playground")4 time.Sleep(100 * time.Millisecond)5}6import (7func main() {8 fmt.Println("Hello, playground")9 time.Sleep(100 * time.Millisecond)10}11import (12func main() {13 fmt.Println("Hello, playground")14 time.Sleep(100 * time.Millisecond)15}16import (17func main() {18 fmt.Println("Hello, playground")19 time.Sleep(100 * time.Millisecond)20}21import (22func main() {23 fmt.Println("Hello, playground")24 time.Sleep(100 * time.Millisecond)25}26import (27func main() {28 fmt.Println("Hello, playground")29 time.Sleep(100 * time.Millisecond)30}31import (32func main() {33 fmt.Println("Hello, playground")34 time.Sleep(100 * time.Millisecond)35}36import (37func main() {38 fmt.Println("Hello, playground")39 time.Sleep(100 * time.Millisecond)40}41import (42func main() {43 fmt.Println("Hello, playground")44 time.Sleep(100 * time.Millisecond)45}46import (47func main() {

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 v := video.NewVideo("My Video")4 v.Play()5 v.Pause()6 v.Stop()7 fmt.Println(v)8}9import (10func main() {11 v := video.NewVideo("My Video")12 v.Play()13 v.Pause()14 v.Stop()15 fmt.Println(v)16}17import "fmt"18type Video struct {19}20func NewVideo(name string) *Video {21 return &Video{name: name}22}23func (v *Video) Play() {24 fmt.Println("Playing video")25}26func (v *Video) Pause() {27 fmt.Println("Pausing video")28}29func (v *Video) Stop() {30 fmt.Println("Stopping video")31}32func (v *Video) String() string {33 return fmt.Sprintf("Video: %s", v.name)34}35import (36func TestVideo(t *testing.T) {37 v := NewVideo("My Video")38 v.Play()39 v.Pause()40 v.Stop()41 fmt.Println(v)42}43import (44func TestVideo(t *testing.T) {45 v := NewVideo("My Video")46 v.Play()47 v.Pause()48 v.Stop()49 fmt.Println(v)50}51import (52func TestVideo(t *testing.T) {53 v := NewVideo("My Video")54 v.Play()55 v.Pause()56 v.Stop()57 fmt.Println(v)58}59import (60func TestVideo(t *testing.T) {61 v := NewVideo("My Video")62 v.Play()63 v.Pause()64 v.Stop()65 fmt.Println(v)66}67import (

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2type Video struct {3}4func (v Video) Play() {5 fmt.Println("Playing", v.Name)6}7func main() {8 v := Video{"The Matrix", 200}9 v.Play()10}

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 v = video.Video{Title: "Golang", Duration: 30}4 fmt.Println(v)5}6type Video struct {7}8{Golang 30}9import (10func main() {11 v = video.Video{Title: "Golang", Duration: 30}12 fmt.Println(v)13}14type Video struct {15}16{Golang 30}17import (18func main() {19 v = video.Video{Title: "Golang", Duration: 30}20 fmt.Println(v)21}22type Video struct {23}24{Golang 30}25import (26func main() {27 v = video.Video{Title: "Golang", Duration: 30}28 fmt.Println(v)29}30type Video struct {31}32{Golang 30}33import (34func main() {35 v = video.Video{Title: "Golang", Duration: 30}36 fmt.Println(v)37}38type Video struct {39}40{Golang 30}41import (42func main() {43 v = video.Video{Title: "Golang", Duration: 30}44 fmt.Println(v)45}46type Video struct {47}48{Golang 30}49import (50func main() {51 v = video.Video{Title: "Golang", Duration: 30}52 fmt.Println(v)53}54type Video struct {55}56{Golang 30}57import (58func main() {

Full Screen

Full Screen

video

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println("hello world")4 main.Video()5}6import (7func main() {8 fmt.Println("hello world")9 main.Video()10}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Selenoid automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful