I have to support VideoConfiguration,(1280 X 720, 800 X 480) Our car display size is 1024 X 600. After android auto is started , the cellphone(or MD) is sending the video output of 1280X 720px. Based on the HUIG doc calculation we need to set margin since we cannot downscale the video. After setting the width Margin of 256 and height margin of 120 , arbitary content is visible and touch coordinate are not working properly. My question is, how can I adjust my parameters so that the video contents from MD is rendered properly.
Car Display size =1024x600
To support 1280 x720 width Margin =1280-1024=256 height Margin=720-600=120
Found this answer https://stackoverflow.com/a/68028928/4722613 , but need some code snippet or detailed explanation.