Description Go to top

RT-AV100 contains set of functions and variables for controlling RT-AV100 Capture device. RT-AV100 is a device which performs real-time capturing of audio and video content from the set-top box and its transfer to the PC for further analysis. The device is communicating with the PC through the network interface (Ethernet).

Network connection has to be 1Gbps in order to transfer images in real-time and Maximum Transmission Unit (MTU) should be set to 1500.

The real usage example of the RT-AV100 device can be seen at:

 

Device info Go to top

In order to initialize the RT-AV101 device properly, several parameters must be set. The following example presents the proper definition of the RT-AV101 device instance inside the test_env.ini (test environment description) configuration file.

INITIALIZATION:
[device]
alias = GrabberDevice
name = RT-AV101
config = RT-AV101.ini
  • alias – is a tag name which will be used in the test case or in the API.
  • name – presents a unique identifier for the algorithm and must be set as RT-AV101.
  • config – is the name of the file which contains an additional configuration (macro commands) related to the RT-AV100 device (this parameter is optional but desirable).

These parameters present a device configuration and they are described in the Configuration & Macros (Anatomy of Configuration file) section.

 

Device parameters Go to top

For proper functioning of each device, the following parameters should be set:

  • dut_ip – the ip address of RT-AV100 connected to DUT. The default value is 192.168.2.228.
  • dut_port – the port number of RT-AV100 connected to DUT. The default value is 4040.
  • snapshot_duts – a signal to RT-AV100 to start grabbing video content.
  • gui_duts – indicates should the window with the live preview for RT-AV100 be displayed or not. The default value is 0 (live preview is not showed).

Other parameters supported by our RT-AV100 device are:

  • add_dut – establish a connection to RT-AV100 connected to DUT. dut_ip and dut_port variables must be previously set to appropriate values.
  • add_ref – establish a connection to RT-AV100 connected to referent device. ref_ip and ref_port variables must be previously set to appropriate values.
  • amplitude_duts – get average signal value during measurement process on the DUT RT-AV100 device.
  • amplitude_ref – get average signal value during measurement process on the referent RT-AV100 device.
  • audio_encoding_type – stored data about input audio type of encoding on HDMI input. Possible values are PCM, AC3, MPEG1, MP3, MPEG2, AAC, DTS, ATRAC, ONE BIT AUDIO, DOLBY DIGITAL PLUS, DTS HD, MAT MLP, DST, WMA PRO, or UNKNOWN.
  • audio_record_time – represents a time (ms) for audio capturing. The default value is 5000.
  • audio_snapshot_duts – a signal to start grabbing audio data from the selected audio source on the DUT RT-AV100 device and store it to the file. The default value is 0.
  • audio_snapshot_ref – a signal to start grabbing audio data from the selected audio source on the referent RT-AV100 device and store it to the file. The default value is 0.
  • av_format_info – starts to read audio/video information on the HDMI input. After reading has been completed, data will be stored into following variables: video_encoding_type, video_aspect_ratio, video_width, video_height, video_framerate, video_interl_factor, audio_encoding_type.
  • av_sync – starts audio-video synchronization measurement on the selected audio and video interfaces.
  • black_screen – SET – starts the black screen algorithm; the parameter corresponds to the black screen threshold. GET – returns the algorithm result (0 or 1).
  • blocking – SET – starts the blocking algorithm; the parameter corresponds to the blocking threshold. GET – returns the algorithm result (0 or 1).
  • blurring – SET – starts the blurring algorithm; the parameter corresponds to the blurring threshold. GET – returns the algorithm result (0 or 1).
  • calibrate - calibrates a selected source input on the DUT RT-AV100 device. The input signal for the calibration should be a sine wave 1KHz with 1V amplitude.
  • compare – starts to compare referent (previously sent) and captured image on the DUT RT-AV100. Results are sent on every compared frame.
  • compare_bottom – sets the bottom edge for the compare region.
  • compare_left – sets the left edge for the compare region.
  • compare_right – sets the right edge for the compare region.
  • compare_top – sets the top edge for the compare region.
  • crop_video_height – sets the height of the cropped video that will be saved. If set to 0, the current height will be used or maximum possible height. The maximum possible height due to RT-AV100 buffer size is 518400/width.
  • crop_video_pos_x – sets the horizontal position of the start point for the cropped video that will be saved.
  • crop_video_pos_y – sets the vertical position of the start point for the cropped video that will be saved.
  • crop_video_width – sets the width of the cropped video that will be saved. If set to 0 the current width will be used.
  • DUT_snapshot_name – represents the begging of the file name where the pictures from the RT-AV100 device will be saved. The ordinal number of the picture will be appended to this file name, and then the “.bmp” extension. The default value is “DUT”.
  • frame_number – starts the frame number counter. To start the counter, set the message argument to 1; to stop, set the message argument to 0. The algorithm requires specific video stream (WITH FRAME COUNTER CODE) and progressive STB output.
  • freezing – SET – starts the freezing algorithm; start parameter value is 1. GET – returns the algorithm result (0 or 1).
  • frequency_duts – gets the frequency of the signal during the measurement process on the DUT RT-AV100 device.
  • frequency_ref – gets the frequency of the signal during the measurement process on the referent RT-AV100 device.
  • gui_ref – sets the window with the live preview for the referent RT-AV100 to be displayed or not. The default value is 0 (live preview is not displayed).
  • lastError – contains info about last occurred error.
  • max_amplitude_duts – gets the maximal signal value during the measurement process on the DUT RT-AV100 device.
  • max_amplitude_ref – gets the maximal signal value during the measurement process on the referent RT-AV100 device.
  • measure_duts – executes the measurement procedure (i.e. ADC on the selected signal source) on the DUT RT-AV100 device.
  • measure_ref – executes the measurement procedure (i.e. ADC on the selected signal source) on the referent RT-AV100 device.
  • min_amplitude_duts – gets the minimal signal value during the measurement process on the DUT RT-AV100 device.
  • min_amplitude_ref – gets the minimal signal value during the measurement process on the referent RT-AV100 device.
  • packet_loss – SET – starts the packet loss algorithm; a parameter corresponds to the packet loss threshold. GET – returns the algorithm result (0 or 1).
  • play_duts – signals to the DUT RT-AV100 device to start capturing the video from the selected video source. The default value is 0 (not capturing).
  • play_ref – signals to the referent RT-AV100 device to start capturing the video from the selected video source. The default value is 0 (not capturing).
  • psnr – gets the PSNR value for compared images, that was sent from the DUT RT-AV100.
  • rc_command_duts – sends the RC command to transmit over DUT RT-AV100 device, as an alternative to the USB remote controller.
  • rc_command_ref – sends the RC command to transmit over referent RT-AV100 device.
  • rc_config_duts – specifies and sends the RC configuration file to DUT RT-AV100 device.
  • rc_config_ref – specifies and sends the RC configuration file to the referent RT-AV100 device.
  • ref_ip – the ip address of the RT-AV100 connected to the referent device. The default value is 192.168.2.229.
  • ref_port – the ip port number of the RT-AV100 connected to the referent device. The default value is 4040.
  • Ref_snapshot_name – represents the base of the file name under which grabbed picture from the referent RT-AV100 device will be stored. Finally, the ordinal number of the picture will be appended to this base as well as the “.bmp” extension. The default value is REF.
  • remove_duts – removes/disconnects from the last added DUT RT-AV100 device.
  • remove_ref – removes/disconnects from the referent RT-AV100 device.
  • reset_duts – initializes input interfaces of the DUT RT-AV100 device.
  • reset_ref – initializes input interfaces of the referent RT-AV100 device.
  • ringing – SET – starts the ringing algorithm; a parameter corresponds to the ringing threshold. GET – returns the algorithm result (0 or 1).
  • rms_amplitude_duts – gets the RMS value of the signal during the measurement process on the DUT RT-AV100 device.
  • rms_amplitude_ref – gets the RMS value of the signal during the measurement process on the referent RT-AV100 device.
  • saved_preview_name – sets the file name for the saved preview. The name can be set with the extension, and the driver will try to guess the correct video encoding. The default is “mpg”.
  • save_preview – starts/stops the recording preview of the video file. Can be used only when preview is already started.
  • select_duts_asource – selects the audio source on the DUT RT-AV100 device for audio capturing. Values can be: LINEIN, LINEIN2, S/PDIF-COAX, S/PDIF-COAX2, S/PDIF-OPT, S/PDIF-OPT2, SDI, HDMI1 or HDMI2. The default value is HDMI1.
  • select_duts_source – selects the video source on the RT-AV100 device for image capturing. Values can be: COMPONENT, CVBS, CVBS2, S-VIDEO, SDI, HDMI1 or HDMI2. The default value is HDMI1.
  • selected_duts_dfactor – sets the downscale factor for the DUT preview video. Values can be in range from 2 to 10. The default is 4.
  • select_duts_mesure – selects the signal source on the DUT RT-AV100 device for measurement. Values can be: LNB, CVBS, SCART_CVBS, SCART_R, SCART_G, SCART_B, Y, Pb, Pr, SCART_16 or SCART_8. Default value is LNB.
  • select_ref_asource – selects the audio source on the referent RT-AV100 device for audio capturing. Values can be: LINEIN, LINEIN2, S/PDIF-COAX, S/PDIF-COAX2, S/PDIF-OPT, S/PDIF-OPT2, SDI, HDMI1 or HDMI2. Default value is HDMI1.
  • select_ref_source – selects the video source on the referent RT-AV100 device for image capturing. Values can be: COMPONENT, CVBS, CVBS2, S-VIDEO, SDI, HDMI1 or HDMI2. Default value is HDMI1.
  • selected_ref_dfactor – sets the downscale factor for the referent preview video. Values can be in range from 2 to 10. The default is 4.
  • select_ref_mesure – selects the signal source on the referent RT-AV100 device for measurement. Values can be: LNB, CVBS, SCART_CVBS, SCART_R, SCART_G, SCART_B, Y, Pb, Pr, SCART_16 or SCART_8. The default value is LNB.
  • send_ref_bmp – sends the referent bmp image to the DUT RT-AV100 for comparing. The default value is “ref_snapshot.bmp”.
  • set_skip_frames – sets the number of frames that will be skipped. The default value for skip frames is 1.
  • signal_present – checks the presence of the selected source input. The default value is 0 (not present).
  • snapshot – signals to start grabbing image data from the selected video source on the referent and DUT RT-AV100 devices and to store it to the file. The default value is 0.
  • snapshot_duts – signals to start grabbing image data from the selected video source on the DUT RT-AV100 device and to store it to the file. The default value is 0.
  • snapshot_num – sets the number of pictures which will be saved from the RT-AV100 device per one snapshot_duts/snapshot_ref command. The default value is 3.
  • snapshot_ref – signals to start grabbing image data from the selected video source on the referent RT-AV100 device and to store it to the file. The default value is 0.
  • start_audio_duts – signals to start audio recording on the DUT RT-AV100 device.
  • start_audio_ref – signals to start audio recording on the referent RT-AV100 device.
  • stop_audio_duts – signals to stop audio recording on the DUT RT-AV100 device.
  • stop_audio_ref – signals to stop audio recording on the referent RT-AV100 device.
  • stop_duts – signals to the RT-AV100 device to stop capturing video from the selected video source. The default value is 0.
  • stop_ref – signals to the referent RT-AV100 device to stop capturing video from the selected video source. The default value is 0.
  • tearing – SET – starts the tearing algorithm; start parameter is 1. GET – returns the algorithm result (0 or 1).
  • video_aspect_ratio – stores data about video aspect ratio on the HDMI input. Possible values are 4:3, 16:9, Unknown.
  • video_encoding_type – stores data about input video type of encoding on the HDMI input. Possible values are RGB, YCbCr422, YCbCr444, Unknown.
  • video_framerate – stores data about video frame rate on the HDMI input.
  • video_height – stores data about video height on the HDMI input.
  • video_interl_factor – stores data about interlace factor on the HDMI input. Possible values are PROGRESSIVE, INTERLACE.
  • video_width – stores data about video width on the HDMI input.
  • zap_time_audio – starts to measure audio zapping time. A parameter represents the remote controller key code sent to DUT.
  • zap_time_ladelay – measured value for the left audio channel until audio absence start after remote controller command.
  • zap_time_laudio – measured value for the left channel audio zap time.
  • zap_time_radelay – measured value for right audio channel until audio absence start after remote controller command.
  • zap_time_raudio – measured value for the right channel audio zap time.
  • zap_time_vdelay – measured value for the video until became black after sending the remote controller command.
  • zap_time_video – starts to measure video zapping time. A parameter represents the remote controller key code sent to DUT. The return value represents the measured video zap time.
  • single_grab – sets the flag if the captured pictures should have only given name by the user, or if the system should add a system prefix. Possible values 1/0. The default is 0.
 

Device usage Go to top

When configuring and controlling devices from the test itself, such tests often become less readable as well as too large and very complicated for maintenance. To avoid this situation, the macros are used.  User can use previously prepared macro definitions (set of commands which will be sent to the RT-AV101 device) which are stored in the RT-AV101.ini file. This kind of device control makes test cases shorter and clearer (more readable), particularly when macros are intuitively named ([INIT_RTAV], [ACTIVATE_VIDEO_HDMI1]…). Also, this approach allows easy adjustment of large number of test cases without changing test scripts by simple modification of macro definitions (modification will affect all test scripts where particular macro is used).

One example of the macro that can be used with the RT-AV100 device is given here:

[CHANNEL_INFO_BOOTING] "compare_left 1572" "compare_top 0" "compare_right 1920" "compare_bottom 120"

You can note here that only some of the all available parameters are used in this macro. This particular macro will set the region that should RT-AV100 monitor for the change on screen.

 

RT-AV100.ini Go to top

Here you can find a full example of the macro configuration file that is created for the previously described device.

#################################################################################################################################
###////////////////////////////////////////    STB FUNCTIONAL TEST SUITE MACROS       ///////////////////////////////////////////
#################################################################################################################################
[INIT_RTAV]                      "dut_ip 172.16.0.215 0" "dut_port 4040 0" "add_dut 1 500"

[PLAY_DEVICE_HDMI1_VIDEO]       "snapshot_num 1 100" "select_duts_source HDMI1 500" "play_duts 1 600" "gui_duts 1 500"
[PLAY_DEVICE_HDMI1_VIDEO_WITHOUT_PREVIEW]       "snapshot_num 1 100" "select_duts_source HDMI1 500" "play_duts 1 600"
[PLAY_DEVICE_HDMI1_AV]          "snapshot_num 1 100" "select_duts_source HDMI1 500" "select_duts_asource HDMI1 100" "play_duts 1 600" "start_audio_duts 1 600" "gui_duts 1 500"
[PLAY_DEVICE_HDMI1_AV_WITHOUT_PREVIEW]  "snapshot_num 1 100" "select_duts_source HDMI1 500" "select_duts_asource HDMI1 100" "play_duts 1 600" "start_audio_duts 1 600" "gui_duts 0 500"
[PLAY_DEVICE_HDMI1_AUDIO]       "snapshot_num 1 100" "select_duts_asource HDMI1 300" "start_audio_duts 1 800"
[PLAY_DEVICE_SPDIF_AUDIO]       "snapshot_num 1 100" "select_duts_asource S/PDIF-OPT 100" "start_audio_duts 1 100"
[PLAY_DEVICE_HDMI1_VIDEO_SPDIF_AUDIO]   "snapshot_num 1 100" "select_duts_source HDMI1 500" "play_duts 1 600" "select_duts_asource S/PDIF-OPT 100" "start_audio_duts 1 100" "gui_duts 1 500"
[PLAY_DEVICE_HDMI1_VIDEO_SPDIF_AUDIO_WITHOUT_PREVIEW]   "snapshot_num 1 100" "select_duts_source HDMI1 500" "play_duts 1 600" "select_duts_asource S/PDIF-OPT 100" "start_audio_duts 1 100" "gui_duts 0 500"

[STOP_AV]                       "gui_duts 0 1000" "stop_duts 1 1000" "stop_audio_duts 1 1000"
[STOP_VIDEO]                    "gui_duts 0 100" "stop_duts 1 100"
[STOP_AUDIO]                    "stop_audio_duts 1 1000"
[REMOVE_DUTS]                   "remove_duts 1 1000"

[HOME_TOP]                      "compare_left 13" "compare_top 6" "compare_right 1908" "compare_bottom 42"