va: caps: Make the template raw video caps classified by features.
The current output of raw video caps is not good. When we have multi profiles and each profile support different formats, the output of gst-inspect may like:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw(memory:VAMemory)
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: NV12
video/x-raw
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: NV12
video/x-raw(memory:VAMemory)
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: P010_10LE
video/x-raw
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: P010_10LE
video/x-raw(memory:VAMemory)
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: P012_LE
video/x-raw
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: P012_LE
The gst_caps_simplify does not classify the caps by same features, but just leave them interweaved. We need to handle them manually here, the result should be:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }
video/x-raw(memory:VAMemory)
width: [ 1, 16384 ]
height: [ 1, 16384 ]
format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }
Edited by Víctor Manuel Jáquez Leal