I'm trying to write gstreamer plugin for `RGBA bitmap -> DVB Subtitles`
encoding. First of all I wrote simple stub: element just emulate encoding by
producing static dvb subtitles from file on every input buffer.
If run this pipeline:
On a src pad, time is only updated for first few buffers. It looks like
mpegtsmux (more precisely, GstAggregator) blocks `queue:src` thread and
`queue` can't push data. Information about that this stream is sparse, as
well as gap events, are supplied by the demuxer (pad with teletext) and just
forwarded by other elements to `mpegtsmux`.
In GstAggregator logs:
0:00:08.413923203 912 0x55cf6a40c5e0 DEBUG aggregator gstaggregator.c:1624:gst_aggregator_default_sink_event:<mux:sink_1> Eating event: segment event: 0x7f8a4035c340, time 99:99:99.999999999, seq-num 61, GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)time, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";
0:00:08.413949065 912 0x55cf6a40c5e0 LOG aggregator gstaggregator.c:850:gst_aggregator_do_events_and_queries:<mux:sink_1> Signaling buffer consumed from thread 0x55cf6a40c5e0
0:00:08.413993045 912 0x55cf6a40c5e0 LOG aggregator gstaggregator.c:493:gst_aggregator_check_pads_ready:<mux:sink_1> pad not ready to be aggregated yet
0:00:08.414790452 912 0x55cf6a2f9ed0 DEBUG aggregator gstaggregator.c:2888:gst_aggregator_pad_chain_internal:<mux:sink_1> Done chaining
0:00:08.418916670 912 0x7f8a50002e80 DEBUG aggregator gstaggregator.c:2099:gst_aggregator_event_forward_func:<mux:sink_1> return of event push is 1
"Done chaining" prints only for first few buffers, and then:
0:00:18.395623508 912 0x55cf6a2f9ed0 DEBUG aggregator gstaggregator.c:2830:gst_aggregator_pad_chain_internal:<mux:sink_1> Waiting for buffer to be consumed
0:00:18.395670089 912 0x55cf6a2f9ed0 LOG aggregator gstaggregator.c:2833:gst_aggregator_pad_chain_internal:<mux:sink_1> Waiting for buffer to be consumed thread 0x55cf6a2f9ed0
0:00:18.397272236 912 0x55cf6a40c5e0 LOG aggregator gstaggregator.c:493:gst_aggregator_check_pads_ready:<mux:sink_1> pad not ready to be aggregated yet
Line "pad not ready to be consumed yet" are repeated endlessly. And after
that, the time on the queue src pad ceases to be updated.
I am using the latest version of Gstreamer compiled from source code. Can anyone explain what is happening and what am I doing wrong?
Code and file with subtitles:
gstdvbsubenc.h gstdvbsubenc.c dvb-dump.bin