How to decode a still-image bitstream in MS bitmap format?

Zhou Weidong weidong.zhou at hotmail.com
Sat Jan 5 05:00:07 UTC 2019


Hello, All

I am a software engineer from NXElec and working in a project with bitstream in MS bitmap format.

Our target board receives a bitmap bitstream from USB port and we want to use gstreamer/decodebin3 to decode it.  The problem/issue we currently facing is that decodebin3 hang when the bitstream sent from the USB Host, and the log messages:
----------------------------------------------------------------------------------------------------
0:00:21.624243669  1105 0x73301c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x733026b0 stream-start​
0:00:21.624541002  1105 0x73301c90 DEBUG             decodebin3 gstdecodebin3.c:1435:multiqueue_src_probe:<multiqueue0:src_0> Stream Start 'ce2a59a63435545d216d8dd3bf664d90b820d2e142b9991a4302ac38f839713f'​
0:00:21.629673335  1105 0x73301c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x7f0ee8 segment​
0:00:21.630191002  1105 0x73301c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x733025d8 stream-collection​
0:00:21.630709002  1105 0x73301c90 DEBUG             decodebin3 gstdecodebin3.c:1758:keyframe_waiter_probe:<multiqueue0:src_0> Buffer is keyframe or header, letting through and removing probe​
0:00:21.646895335  1105   0x9508f0 DEBUG             decodebin3 gstdecodebin3-parse.c:285:parse_chain_output_probe:<parsebin0:src_0> Seeing query allocation
-----------------------------------------------------------------------------------------------------

To compare with a similar situation, we save  an unique still image to a bitmap file and use gstreamer filesrc to decode it.
This time, decode success. The log messages as below:
-----------------------------------------------------------------------------------------------------
42334   963  0x1e728f0 DEBUG             decodebin3 gstdecodebin3-parse.c:206:parse_chain_output_probe:<parsebin0:src_0> Got event segment
0:00:00.995926000   963  0x1e728f0 DEBUG             decodebin3 gstdecodebin3-parse.c:206:parse_chain_output_probe:<parsebin0:src_0> Got event stream-collection​
0:00:00.996847334   963  0x1e728f0 DEBUG             decodebin3 gstdecodebin3-parse.c:285:parse_chain_output_probe:<parsebin0:src_0> Seeing query allocation​
0:00:00.663242333   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1215:gst_decodebin3_handle_message:<decodebin3-0> Got Message stream-status​
0:00:00.998781334   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x73202620 stream-start​
0:00:00.999220000   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1435:multiqueue_src_probe:<multiqueue0:src_0> Stream Start 'ce2a59a63435545d216d8dd3bf664d90b820d2e142b9991a4302ac38f839713f'​
0:00:00.999591667   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x732026b0 stream-start​
0:00:00.999895667   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1435:multiqueue_src_probe:<multiqueue0:src_0> Stream Start 'ce2a59a63435545d216d8dd3bf664d90b820d2e142b9991a4302ac38f839713f'​
0:00:01.000341334   963 0x73201c90 DEBUG             decodebin3 gstdecodebin3.c:1421:multiqueue_src_probe:<multiqueue0:src_0> Got event 0x1d12f30 caps
----------------------------------------------------------------------------------------------------

I noticed the difference between 2 scenarios is that decodebin3 detects an EOS signal when it read from a bitmap file. And in USB device mode, there is no EOS signal detecting and this leads decodebin3 hang...

So the question is how can we use decodebin3 to decode a bitmap bitstream?
Bitmap bitstream here means a bitstream that contents consequent still images in MS Bitmap format. Currently we send this bitmap stream from Windows Host, I guess add some tags/delimiters among images in bitstream will let decodebin3 recognize and decode it properly. But I do not know how.

Thanks in advance if any suggestions/clues come. The current gstreamer/decodebin3 version we are using is 1.10.4.

Regards
Weidong
www.nxelec.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190105/b2338645/attachment-0001.html>


More information about the gstreamer-devel mailing list