#NEWLINE# def test_multi_res_record( camera , mode ) : #NEWLINE# #INDENT# ( resolution , framerate ) = mode #NEWLINE# expected_failures ( resolution , 'h264' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# v_stream1 = tempfile . SpooledTemporaryFile ( ) #NEWLINE# v_stream2 = tempfile . SpooledTemporaryFile ( ) #NEWLINE# new_res = ( ( resolution [ 0 ] // 2 ) , ( resolution [ 1 ] // 2 ) ) #NEWLINE# camera . start_recording ( v_stream1 , format = 'h264' ) #NEWLINE# try : #NEWLINE# #INDENT# camera . start_recording ( v_stream2 , format = 'h264' , resize = new_res , splitter_port = 2 ) #NEWLINE# try : #NEWLINE# #INDENT# camera . wait_recording ( 1 ) #NEWLINE# camera . wait_recording ( 1 , splitter_port = 2 ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# camera . stop_recording ( ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# camera . stop_recording ( splitter_port = 2 ) #NEWLINE# #UNINDENT# v_stream1 . seek ( 0 ) #NEWLINE# v_stream2 . seek ( 0 ) #NEWLINE# verify_video ( v_stream1 , 'h264' , resolution ) #NEWLINE# verify_video ( v_stream2 , 'h264' , new_res )