typefind can't find SVG when fed from appsrc
Consider following SVG:
<svg width='100' height='100' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><rect width='100%' height='100%' style='fill:#0000ff;'/><rect width='100%' height='100%' rx='50' ry='50' style='fill:#ffffff;'/></svg>
With pipeline that contains appsrc do-timestamp=true ! typefind
, typefind
for some reason can't find that this is an SVG (I have sent EOS to it):
0:00:06.268460234 27540 0x7f49c817ac10 DEBUG typefind gsttypefindelement.c:409:gst_type_find_handle_src_query:<typefind_image> Handling src query caps
0:00:06.268472858 27540 0x7f49c817ac10 DEBUG typefind gsttypefindelement.c:419:gst_type_find_handle_src_query:<typefind_image> Got caps query, our caps are (NULL)
0:00:06.268502163 27540 0x7f49c817ac10 DEBUG typefind gsttypefindelement.c:409:gst_type_find_handle_src_query:<typefind_image> Handling src query caps
0:00:06.268506241 27540 0x7f49c817ac10 DEBUG typefind gsttypefindelement.c:419:gst_type_find_handle_src_query:<typefind_image> Got caps query, our caps are (NULL)
0:00:06.269762143 27540 0x7f49c817ac10 DEBUG typefind gsttypefindelement.c:579:start_typefinding:<typefind_image> starting typefinding
0:00:06.269852253 27540 0x7f49c8061d20 DEBUG typefind gsttypefindelement.c:666:gst_type_find_element_sink_event:<typefind_image> got stream-start event in mode 1
0:00:06.269894202 27540 0x7f49c8061d20 DEBUG typefind gsttypefindelement.c:666:gst_type_find_element_sink_event:<typefind_image> got eos event in mode 1
0:00:06.269900113 27540 0x7f49c8061d20 INFO typefind gsttypefindelement.c:699:gst_type_find_element_sink_event:<typefind_image> Got EOS and no type found yet
0:00:06.269909742 27540 0x7f49c8061d20 WARN typefind gsttypefindelement.c:990:gst_type_find_element_chain_do_typefinding:<typefind_image> error: Stream doesn't contain enough data.
0:00:06.269916454 27540 0x7f49c8061d20 WARN typefind gsttypefindelement.c:990:gst_type_find_element_chain_do_typefinding:<typefind_image> error: Can't typefind stream
I see that there is a minimum of 2kiB for something called chain-mode
, but I don't know what that is unfortunately.
UPD: Padding with spaces to the minimum, obviously, works, but not ideal.