If the videoflip is part of the pipeline, the appsrc's need-data signal is not triggered, and empty packets are sent out

I am working on creating a pipeline that streams to an RTSP server, but I need to rotate the video by 90°.I tried to use the videoflip element, but I encountered an issue when including it in the pipeline. Specifically, the need-data signal is emitted once when starting the pipeline, but immediately after, the enough-data signal is triggered, and need-data is never called again.

Here is the pipeline I’m using:

appsrc is-live=true name=src do-timestamp=true format=time
    ! video/x-raw,width=1152,height=864,format=YUY2,framerate=30/1,colorimetry=(string)bt601 
    ! queue flush-on-eos=true 
    ! videoflip method=clockwise 
    ! v4l2h264enc extra-controls=controls,video_bitrate=2000000,repeat_sequence_header=1 
    ! video/x-h264,level=(string)4,profile=(string)baseline 
    ! rtspclientsink latency=10 location=rtsp://localhost:8554/mystream

Need-data is not called again after the initial emission. Despite this in the GST_DEBUG logs, it seems that empty packets are being streamed by the rtspclientsink. The RTSP server also detects that something is being published, but no actual data is sent.

Here’s a snippet from the logs:


0:00:09.455822046  8662   0x7f688439e0 INFO              rtspstream rtsp-stream.c:2354:dump_structure: structure: application/x-rtp-source-stats, ssrc=(uint)1539233341, internal=(boolean)true, validated=(boolean)true, received-bye=(boolean)false, is-csrc=(boolean)false, is-sender=(boolean)false, seqnum-base=(int)54401, clock-rate=(int)90000, octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0, packets-received=(guint64)0, bytes-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0, jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0, recv-packet-rate=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0, sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;

Interestingly when I include a timeoverlay element just before the videoflip, the pipeline sometimes works, but other times, it faces the same problem.