This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

V4l2: Change display position of video window.

Hi,

I am using DM8168 EZSDK_5_03 and want to display video on the video window (/dev/video1) at some x,y position instead of default position (0,0). I am able to do this for framebuffer (saLoopFbDev example, /dev/fb0).

To do this I am using sample application saLoopBack that comes with the PSP release. Referring to the VPSS driver user guide (S_FMT ioctl of v4l2, http://processors.wiki.ti.com/index.php/DM816X_AM389X_VPSS_Video_Driver_User_Guide#V4L2_IOCTL_2) I have modified the application to display video on location(100,100).

For some reason the video is displayed on the location (0,0) and not on (100,100).

  1. Is this feature of VPSS tested for video window (/dev/video1)?
  2. I could not find any sample application to demonstrate this. Is there any example available?
  3. Other than S_FMT ioctl am I suppose to change anything else?

Regards,

Krunal

  • Hi,

    You have to do S_FMT with using buf.type as V4L2_BUF_TYPE_VIDEO_OVERLAY. If you are doing this than this should be okay. Following should be your sequence.

    1. get_fmt buf.type=V4L2_BUF_TYPE_VIDEO_OUTPUT

    2. get_fmt buf.type = V4L2_BUF_TYPE_VIDEO_OVERLAY

    3. set_fmt buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT (Change parameters here)

    4. set_fmt buf.type = V4L2_BUF_TYPE_VIDEO_OVERLAY (Change parameters here)

    Please let me know if above works.

    Regards,

    Hardik Shah

  • Hi Hardik,

    I will check my implementation (I think it is same) according to your comments and let you know.

    Is this feature tested?

    Regards,

    Krunal

  • Hi Krunal,

    I am facing the same issue, did you manage to solve the issue.

    I did

    set_cop with V4L2_BUF_TYPE_VIDEO_OUTPUT

    followed by get_fmt with V4L2_BUF_TYPE_VIDEO_OVERLAY

    followed by set_fmt with V4L2_BUF_TYPE_VIDEO_OVERLAY

    But video is always centered on the screen. Would you like to share your finidngs?

    I am using EZSDK05_04_00_11

    Thanks and

    Kindest Regards,

    Salim

  • Hi Salim,

    Its been a long time I tried this and left the activity due to change in the priority.

    I don't remember the last status, I will check and let you know.

    Regards,

    Krunal

  • Hi Salim,

    I am able to change position of the displayed image.

    However the overlay is not supported due to which if there are two video windows displayed I am not able to see the lower window/layer.

    Regards,

    Krunal

  • HI Kunal,

    My use case involves only one video and graphics (HMI). I wish to display video inside the HMI window at desired position on the screen.

    For the moment I do not have the use case for two videos, but your information will be handy if such use case arises.

    I would be grateful, if you would be able to share with me, how did you achieve display pf 1 video at desired position.

    Regards,
    Salim