After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586180 - RTSP improvements
RTSP improvements
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-17 22:39 UTC by Peter Kjellerstedt
Modified: 2009-08-24 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Git log with diffs (80.18 KB, patch)
2009-06-17 22:40 UTC, Peter Kjellerstedt
none Details | Review
Git log with diffs (80.18 KB, text/plain)
2009-06-17 22:44 UTC, Peter Kjellerstedt
  Details
The final gstrtspconnection.c (82.17 KB, text/plain)
2009-06-17 22:45 UTC, Peter Kjellerstedt
  Details
Git log with diffs (95.53 KB, text/plain)
2009-08-17 17:05 UTC, Peter Kjellerstedt
  Details
The final gstrtspconnection.c (89.64 KB, text/plain)
2009-08-17 17:07 UTC, Peter Kjellerstedt
  Details
Git log with diffs (110.20 KB, text/plain)
2009-08-24 10:00 UTC, Peter Kjellerstedt
  Details
The final gstrtspconnection.c (92.05 KB, text/plain)
2009-08-24 10:01 UTC, Peter Kjellerstedt
  Details

Description Peter Kjellerstedt 2009-06-17 22:39:41 UTC
As requested by Wim I add a report with my suggested improvements to the RTSP code. The original discussion concerned commit 8ed062f (support for HTTP messages), but I have included all my intended changes here for review as I believe it will better show the ratinale for adding simple HTTP support to the RTSP code.

The patch contains the following commits:

e326849... rtsp: Add initial buffer support.
c6de461... rtsp: Added gst_rtsp_connection_create_from_fd().
8ed062f... rtsp: Added support for HTTP messages
d0b5b51... rtsp: Improved parsing of messages.
b97d6c7... rtsp: Made parse_string() return a result.
9ae3686... rtsp: Normalize lines (remove extra whitespace) before parsing.
a033959... rtsp: Ignore the Content-Length for POST requests.
b32db61... rtsp: Rewrote gen_tunnel_reply().
7784a77... rtsp: Rewrote setup_tunneling().
b052009... rtsp: Improve parse_line().
27345f4... rtsp: Add error_full callback to GstRTSPWatchFuncs.
ebfb315... rtsp: Add message_blocked to GstRTSPWatchFuncs.
1a946fc... rtsp: Write as much as possible in gst_rtsp_source_dispatch().
a21e495... rtsp: Allow gst_rtsp_connection_do_tunnel() to just setup decoding co
ntext.
6fc6010... rtsp: Added gst_rtsp_connection_set_http_mode().

I have also provided the final gstrtspconnection.c file as it can sometimes be hard to tell from the diffs what's actually going on.

I have tried my utmost to main compatibility with the current code (including what I believe to be a number of bugs in setup_tunneling()), but as I only use the code for an RTSP server the code is only partially tested for client support.
Comment 1 Peter Kjellerstedt 2009-06-17 22:40:53 UTC
Created attachment 136876 [details] [review]
Git log with diffs
Comment 2 Peter Kjellerstedt 2009-06-17 22:44:29 UTC
Created attachment 136877 [details]
Git log with diffs
Comment 3 Peter Kjellerstedt 2009-06-17 22:45:41 UTC
Created attachment 136878 [details]
The final gstrtspconnection.c
Comment 4 Peter Kjellerstedt 2009-08-17 17:05:39 UTC
Created attachment 140984 [details]
Git log with diffs

Updated the patches to match my latest development. This removes ebfb315 which is no longer needed and instead adds b1cada8, ef4226a and f420e7e. With these patches applied I can finally run our complete RTSP test suite without any errors.

aff964d... rtsp: Add initial buffer support.
012d03c... rtsp: Added gst_rtsp_connection_create_from_fd().
e4c253d... rtsp: Added support for HTTP messages
d34b996... rtsp: Improved parsing of messages.
d52b3eb... rtsp: Made parse_string() return a result.
98ed7ad... rtsp: Normalize lines (remove extra whitespace) before parsing.
9424dc1... rtsp: Ignore the Content-Length for POST requests.
810aa3f... rtsp: Rewrote gen_tunnel_reply().
fc0c58f... rtsp: Rewrote setup_tunneling().
6a1ebff... rtsp: Improve parse_line().
3bdcc74... rtsp: Add error_full callback to GstRTSPWatchFuncs.
98c41b7... rtsp: Write as much as possible in gst_rtsp_source_dispatch().
cef407d... rtsp: Allow gst_rtsp_connection_do_tunnel() to just setup decoding 
                 context.
0c45d76... rtsp: Added gst_rtsp_connection_set_http_mode().
b1cada8... rtsp: Made gst_rtsp_watch_queue_data() thread safe.
ef4226a... rtsp: Added new API for sending using GstRTSPWatch.
f420e7e... rtsp: Made read_line() support LWS.
Comment 5 Peter Kjellerstedt 2009-08-17 17:07:25 UTC
Created attachment 140985 [details]
The final gstrtspconnection.c

Updated gstrtspconnection.c to match my latest development.
Comment 6 Peter Kjellerstedt 2009-08-24 10:00:11 UTC
Created attachment 141534 [details]
Git log with diffs

Updated the patches after having tested the code with rtspsrc (a couple of minor fixes required). Also added support for correct parsing of WWW-Authenticate headers (63f7376) and for not splitting headers which should not be split (a5c3520).

de8c427... rtsp: Add initial buffer support.
c3ec2c1... rtsp: Added gst_rtsp_connection_create_from_fd().
88da260... rtsp: Added support for HTTP messages
41d582a... rtsp: Improved parsing of messages.
a51948d... rtsp: Made parse_string() return a result.
f272a47... rtsp: Normalize lines (remove extra whitespace) before parsing.
0fd5139... rtsp: Ignore the Content-Length for POST requests.
27e25c9... rtsp: Rewrote gen_tunnel_reply().
4db1ca1... rtsp: Rewrote setup_tunneling().
b59748c... rtsp: Improve parse_line().
63f7376... rtsp: Parse WWW-Authenticate headers correctly.
a5c3520... rtsp: Do not split headers which should not be split.
0ae63e6... rtsp: Made read_line() support LWS.
c63653e... rtsp: Add error_full callback to GstRTSPWatchFuncs.
60118e2... rtsp: Write as much as possible in gst_rtsp_source_dispatch().
ac5c5f4... rtsp: Allow gst_rtsp_connection_do_tunnel() to just setup decoding
                 context.
c7f7531... rtsp: Added gst_rtsp_connection_set_http_mode().
cd0891f... rtsp: Made gst_rtsp_watch_queue_data() thread safe.
1fb73d0... rtsp: Added new API for sending using GstRTSPWatch.
Comment 7 Peter Kjellerstedt 2009-08-24 10:01:36 UTC
Created attachment 141535 [details]
The final gstrtspconnection.c

Updated gstrtspconnection.c to match my latest development.
Comment 8 Peter Kjellerstedt 2009-08-24 11:42:49 UTC
This has now been pushed...