urisourcebin: confused if source exposes raw and unraw pads
I have a source exposing two pads:
-
audio_src
which is not raw (application/ogg
) -
video_src
which is raw (video/x-raw
)
This confuses urisourcebin
which pretends that the source provides all raw data:
0:00:00.526182280 590868 0xa25530 DEBUG urisourcebin gsturisourcebin.c:1637:has_all_raw_caps:<spotifybin0:audio_src> have not all raw caps application/ogg
0:00:00.526255586 590868 0xa25530 DEBUG urisourcebin gsturisourcebin.c:1637:has_all_raw_caps:<spotifybin0:video_src> have all raw caps video/x-raw, format=(string){ ABGR64_LE, BGRA64_LE, AYUV64, ARGB64_LE, ARGB64, RGBA64_LE, ABGR64_BE, BGRA64_BE, ARGB64_BE, RGBA64_BE, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, AV12, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }
0:00:00.526330335 590868 0xa25530 DEBUG urisourcebin gsturisourcebin.c:1278:create_output_pad:<urisourcebin0> Created output pad '':src_0 for pad spotifybin0:video_src
0:00:00.526345119 590868 0xa25530 DEBUG urisourcebin gsturisourcebin.c:1297:expose_output_pad:<urisourcebin0> Exposing pad '':src_0
0:00:00.526367561 590868 0xa25530 DEBUG uridecodebin3 gsturidecodebin3.c:737:src_pad_added_cb:<uridecodebin3-0> New pad <urisourcebin0:src_0> from source <urisourcebin0>
0:00:00.526399888 590868 0xa25530 DEBUG uridecodebin3 gsturidecodebin3.c:756:src_pad_added_cb:<uridecodebin3-0> Linking <urisourcebin0:src_0> to <decodebin3-0:sink>
0:00:00.526630568 590868 0xa25530 DEBUG urisourcebin gsturisourcebin.c:2267:setup_source:<urisourcebin0> Source provides all raw data
The error is quite obvious in the code: analyse_source
claims to check if all pads are raw data but return the check of the last pad instead of aggregating them.
This specific bug is trivial to fix but I'm not sure how fixing it would fit with the general design and logic of urisourcebin
as it's unclear how it should handle such mixed elements.