• Dorcas Anono Litunya's avatar
    media: vivid: Add 'Is Connected To' menu controls · d7c969f3
    Dorcas Anono Litunya authored
    The video loopback functionality in vivid is very crude. What we really
    want is to be able to emulate connecting an HDMI or S-Video input to
    an HDMI or S-Video output, and the input and output can be in different
    vivid instances.
    
    Effectively this emulates what happens when you physically connect an
    HDMI or S-Video cable between two devices.
    
    In particular, this makes prototyping with vivid much more realistic.
    
    This patch creates a menu control for each HDMI or S-Video input. The
    menu control starts with "Test Pattern Generator" and "None" (i.e.
    disconnected). After that up to 62 HDMI or S-Video outputs are listed
    that you can connect the input to.
    
    If there are more than 62 HDMI or S-Video outputs, then those will not
    be included in the menu (currently menucontrols have max 64 entries).
    
    If an input is connected to an output, then all other 'Connected To'
    controls are updated to exclude that output to avoid having multiple
    inputs connected to the same output.
    Signed-off-by: default avatarDorcas Anono Litunya <anonolitunya@gmail.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    [hverkuil: use u8 in loops in vivid_create_controls() to avoid truncate warning]
    d7c969f3
vivid-ctrls.c 66 KB