GNOME Bugzilla – Bug 684955
rtpjpegpay doesn't support width or height greater than 2040
Last modified: 2012-12-22 16:28:03 UTC
GST_DEBUG=2 gst-launch-1.0 videotesrc ! jpegenc ! image/jpeg,framerate=30/1,width=2048,height=2040 ! rtpjpegpay ! fakesink 0:00:00.177544450 31506 0x627720 ERROR rtpjpegpay gstrtpjpegpay.c:317:gst_rtp_jpeg_pay_setcaps:<rtpjpegpay0> Invalid width/height from caps 0:00:00.177608085 31506 0x627720 ERROR rtpjpegpay gstrtpjpegpay.c:317:gst_rtp_jpeg_pay_setcaps:<rtpjpegpay0> Invalid width/height from caps 0:00:00.177645918 31506 0x627720 ERROR rtpjpegpay gstrtpjpegpay.c:317:gst_rtp_jpeg_pay_setcaps:<rtpjpegpay0> Invalid width/height from caps ... It would be nicer to set width and height to 0 in the rtp-header and send it out-of-band, for example using a=x-dimensions:width,height in SDP.
Created attachment 225262 [details] [review] set width and height in rtp header to zero and add x-dimensions to outcaps Set width and height in rtp header to zero and add x-dimensions to outcaps.
That's sounds very non-standard, but I guess the depayloader already supports that. Wouldn't it be better to change the sink's caps template to width=[1,2040],height=[1,2040] ?
Yes, this is how clients like mplayer, vlc and the streamer depayloader works. So it's not in any RFC (afaik) but it works in the clients I tried if x-dimensions is also in SDP.
This works: gst-launch-1.0 videotestsrc ! jpegenc ! image/jpeg,framerate=30/1,width=4096,height=4096 ! rtpjpegpay ! rtpjpegdepay ! jpegdec ! xvimagesink sync=false
commit e12457f1388459f421008463af6722f15ff20a29 Author: Jonas Holmberg <jonashg@axis.com> Date: Thu Sep 27 15:42:56 2012 +0200 rtpjpegpay: handle width and height > 2040 If width or height is greater than 2040 set width and height to zero in the rtp header and add x-dimensions to outcaps. Solves #684955
Created attachment 231990 [details] [review] set width and height in rtp header to zero and add x-dimensions to outcaps Added unit testa.
commit 60fa4536e293a121f6f550b4efca193da16c4245 Author: Jonas Holmberg <jonashg@axis.com> Date: Thu Dec 20 16:15:13 2012 +0100 tests: add jpegpay unit test See also https://bugzilla.gnome.org/show_bug.cgi?id=684955