summaryrefslogtreecommitdiffstats
path: root/gst/rtsp/rtspconnection.c
Commit message (Collapse)AuthorAgeFilesLines
* gst/rtsp/: Use shiny new RTSP and SDP library.Wim Taymans2007-07-251-1125/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/base64.c: * gst/rtsp/base64.h: * gst/rtsp/gstrtspext.c: (gst_rtsp_ext_list_filter), (gst_rtsp_ext_list_init), (gst_rtsp_ext_list_get), (gst_rtsp_ext_list_detect_server), (gst_rtsp_ext_list_before_send), (gst_rtsp_ext_list_after_send), (gst_rtsp_ext_list_parse_sdp), (gst_rtsp_ext_list_setup_media), (gst_rtsp_ext_list_configure_stream), (gst_rtsp_ext_list_get_transports), (gst_rtsp_ext_list_stream_select): * gst/rtsp/gstrtspext.h: * gst/rtsp/gstrtspsrc.c: (gst_rtsp_lower_trans_get_type), (gst_rtspsrc_class_init), (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_create_stream), (gst_rtspsrc_parse_rtpmap), (gst_rtspsrc_media_to_caps), (gst_rtspsrc_flush), (gst_rtspsrc_do_seek), (gst_rtspsrc_sink_chain), (gst_rtspsrc_stream_configure_manager), (gst_rtspsrc_stream_configure_tcp), (gst_rtspsrc_stream_configure_mcast), (gst_rtspsrc_stream_configure_udp), (gst_rtspsrc_stream_configure_udp_sink), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_handle_request), (gst_rtspsrc_send_keep_alive), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_loop_send_cmd), (gst_rtsp_auth_method_to_string), (gst_rtspsrc_parse_auth_hdr), (gst_rtspsrc_setup_auth), (gst_rtspsrc_try_send), (gst_rtspsrc_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_create_transports_string), (gst_rtspsrc_prepare_transports), (gst_rtspsrc_setup_streams), (gst_rtspsrc_parse_range), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_pause), (gst_rtspsrc_change_state), (gst_rtspsrc_uri_set_uri): * gst/rtsp/gstrtspsrc.h: * gst/rtsp/rtsp.h: * gst/rtsp/rtspconnection.c: * gst/rtsp/rtspconnection.h: * gst/rtsp/rtspdefs.c: * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspext.h: * gst/rtsp/rtspextwms.c: * gst/rtsp/rtspextwms.h: * gst/rtsp/rtspmessage.c: * gst/rtsp/rtspmessage.h: * gst/rtsp/rtsprange.c: * gst/rtsp/rtsprange.h: * gst/rtsp/rtsptransport.c: * gst/rtsp/rtsptransport.h: * gst/rtsp/rtspurl.c: * gst/rtsp/rtspurl.h: * gst/rtsp/sdp.h: * gst/rtsp/sdpmessage.c: * gst/rtsp/sdpmessage.h: * gst/rtsp/test.c: Use shiny new RTSP and SDP library. Implement RTSP extensions using the new interface. Remove a lot of old code.
* gst/rtsp/rtspconnection.c: Use threadsafe inet_ntop to convert an ip number ↵Wim Taymans2007-06-191-6/+12
| | | | | | | | | | | | to a string. Original commit message from CVS: * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_close), (rtsp_connection_free): Use threadsafe inet_ntop to convert an ip number to a string. Fixes #447961. Don't leak fd (and ip) when freeing a connection without first closing it.
* gst/rtsp/rtspconnection.c: Revert previous commit again, since we are frozen ↵Tim-Philipp Müller2007-06-171-2/+1
| | | | | | | | | (sorry). Original commit message from CVS: * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_free): Revert previous commit again, since we are frozen (sorry).
* gst/rtsp/rtspconnection.c: inet_ntoa() uses a static buffer internally, so ↵Peter Kjellerstedt2007-06-171-1/+2
| | | | | | | | | | | we need to copy the returned string if we ... Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_free): inet_ntoa() uses a static buffer internally, so we need to copy the returned string if we want to store it for later (#447961).
* gst/rtsp/rtspconnection.c: Fix the MingW build.Vincent Torri2007-06-151-0/+16
| | | | | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect): Fix the MingW build. Patch By: Vincent Torri <vtorri at univ-evry dot fr> Fixes: #446981
* gst/rtsp/rtspconnection.c: Add include to make buildbot happy.Wim Taymans2007-06-011-0/+2
| | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: Add include to make buildbot happy.
* gst/rtsp/: Improves version checking, allowing an RTSP server to reply with "505Peter Kjellerstedt2007-06-011-61/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect), (add_date_header), (rtsp_connection_send), (parse_response_status), (parse_request_line), (parse_line), (rtsp_connection_receive): * gst/rtsp/rtspdefs.c: (rtsp_version_as_text): * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspmessage.c: (key_value_foreach), (rtsp_message_init_request), (rtsp_message_init_response), (rtsp_message_remove_header), (rtsp_message_append_headers), (rtsp_message_dump): * gst/rtsp/rtspmessage.h: Improves version checking, allowing an RTSP server to reply with "505 RTSP Version not supported. Adds a Date header to all messages. Replies with RTSP_EPARSE rather than RTSP_EINVALID in cases where we want to be able to send a response even if something in the request was invalid. EINVAL is only used when passing wrong arguments to functions. Do not handle an invalid method in parse_request_line(). Defer this to the caller so it can respond with "405 Method Not Allowed". Improves parsing of the timeout parameter to the Session header, allowing whitespace after the semicolon. Avoids a compiler warning due to variables shadowing a function argument.
* gst/rtsp/: Fix for new API.Peter Kjellerstedt2007-05-241-45/+32
| | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_auth), (gst_rtspsrc_try_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_setup_streams), (gst_rtspsrc_open), (gst_rtspsrc_play): (rtsp_connection_send), (rtsp_connection_receive): * gst/rtsp/rtspextwms.c: (rtsp_ext_wms_after_send): Fix for new API. * gst/rtsp/rtspconnection.c: (add_auth_header), Only add authorisation and session headers when sending messages. * gst/rtsp/rtspmessage.c: (key_value_foreach), (rtsp_message_init), (rtsp_message_init_request), (rtsp_message_init_response), (rtsp_message_unset), (rtsp_message_add_header), (rtsp_message_remove_header), (rtsp_message_get_header), (rtsp_message_append_headers), (dump_key_value), (rtsp_message_dump): * gst/rtsp/rtspmessage.h: Add support for multiple headers of the same type by storing the parsed headers in a GArray instaed of a hashtable.
* gst/rtsp/gstrtspsrc.*: Add TCP timeout property and use it for all TCP ↵Wim Taymans2007-05-181-2/+98
| | | | | | | | | | | | | | | | | connection. Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_class_init), (gst_rtspsrc_set_property), (gst_rtspsrc_get_property), (gst_rtspsrc_stream_configure_udp), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_try_send), (gst_rtspsrc_send), (gst_rtspsrc_setup_streams), (gst_rtspsrc_open): * gst/rtsp/gstrtspsrc.h: Add TCP timeout property and use it for all TCP connection. * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_write), (rtsp_connection_next_timeout), (rtsp_connection_reset_timeout): Make connect and writes cancelable and make them use the timeout.
* gst/rtsp/gstrtspsrc.c: Refactor timeout handling.Wim Taymans2007-05-181-0/+36
| | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send_keep_alive), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_try_send), (gst_rtspsrc_send), (gst_rtspsrc_setup_streams): Refactor timeout handling. Also send keep-alive when dealing with TCP transport. * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_free), (rtsp_connection_next_timeout), (rtsp_connection_reset_timeout): * gst/rtsp/rtspconnection.h: Use a timer to handle the session timeouts, add some methods to deal with timeouts.
* gst/rtsp/: Make channel guint8 where possible.Peter Kjellerstedt2007-05-121-1/+1
| | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/rtsp/gstrtspsrc.h: * gst/rtsp/rtspconnection.c: (rtsp_connection_receive): * gst/rtsp/rtspmessage.c: (rtsp_message_init_data), (rtsp_message_get_header): * gst/rtsp/rtspmessage.h: Make channel guint8 where possible. Make rtsp_message_init_data() take the channel as a guint8. * gst/rtsp/rtspdefs.c: Fixed a typo: Timout -> Timeout * gst/rtsp/rtspdefs.h: Make RTSP_CHECK() behave as a statement. * gst/rtsp/sdpmessage.c: Avoid a compiler warning in INIT_ARRAY(). Fixes #437692.
* gst/rtsp/gstrtspsrc.c: Send RTCP messages back to the server over the TCP ↵Wim Taymans2007-05-041-52/+91
| | | | | | | | | | | | | | | | | | | | | connection. Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_handle_src_event), (gst_rtspsrc_handle_src_query), (gst_rtspsrc_sink_chain), (gst_rtspsrc_stream_configure_manager), (gst_rtspsrc_stream_free_udp), (gst_rtspsrc_stream_configure_tcp), (gst_rtspsrc_stream_configure_mcast), (gst_rtspsrc_stream_configure_udp), (gst_rtspsrc_stream_configure_udp_sink), (gst_rtspsrc_stream_configure_transport): Send RTCP messages back to the server over the TCP connection. * gst/rtsp/rtspconnection.c: (rtsp_connection_write), (rtsp_connection_send), (rtsp_connection_read), (read_body), (rtsp_connection_receive): * gst/rtsp/rtspconnection.h: Factor out and expose lowlevel _write and _read methods. Implement sending data messages to the server.
* gst/rtsp/gstrtspsrc.*: Fix race when multiple udp sources post timeouts, ↵Wim Taymans2007-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | just act on the first received timeout. Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (new_session_pad), (request_pt_map), (gst_rtspsrc_loop_send_cmd), (gst_rtspsrc_try_send), (gst_rtspsrc_send), (gst_rtspsrc_async_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): * gst/rtsp/gstrtspsrc.h: Fix race when multiple udp sources post timeouts, just act on the first received timeout. Protect stream list with a recursive lock to fix some races. Flush connection when we need to do a reconnect or stop. Make state lock recursive. * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_close): Some small cleanups.
* gst/rtsp/gstrtspsrc.*: Fix sending RTCP to the right place.Wim Taymans2007-05-021-18/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_handle_request), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_send_keep_alive), (gst_rtspsrc_loop_udp), (gst_rtspsrc_loop_send_cmd), (gst_rtspsrc_try_send), (gst_rtspsrc_open), (gst_rtspsrc_handle_message): * gst/rtsp/gstrtspsrc.h: Fix sending RTCP to the right place. Fix bug in reffing the wrong UDP element. Use new pad names for the session manager. Implement handling server requests in interleaved and UDP modes. Handle session keep-alive in UDP modes. Remove GCond for handling UDP timeouts. * gst/rtsp/rtspconnection.c: (rtsp_connection_connect), (rtsp_connection_send), (rtsp_connection_read), (read_body), (rtsp_connection_receive), (rtsp_connection_close): * gst/rtsp/rtspconnection.h: Store connection IP address for later. Add timeout args to all operations that might block forever. Parse session timeout. Only close sockets when not already closed. * gst/rtsp/rtspdefs.c: * gst/rtsp/rtspdefs.h: Add timeout return value and error string. * gst/rtsp/rtspmessage.c: (rtsp_message_init_response): Add small comment.
* gst/rtsp/gstrtspsrc.*: Protect state changes with a lock.Wim Taymans2007-04-261-2/+6
| | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_parse_rtpinfo), (gst_rtspsrc_play), (gst_rtspsrc_pause): * gst/rtsp/gstrtspsrc.h: Protect state changes with a lock. * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (parse_line): * gst/rtsp/rtspconnection.h: Remove some unused stuff.
* gst/rtsp/rtspconnection.c: Read the channel byte as an unsigned byte.Wim Taymans2007-04-251-1/+1
| | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: (rtsp_connection_receive): Read the channel byte as an unsigned byte.
* gst/rtsp/: g_base64_encode is a GLib 2.12 function. Use an equivalent taken ↵Jan Schmidt2007-02-231-2/+2
| | | | | | | | | | | | from icecast to replace it. Relicensed fr... Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/rtspconnection.c: (append_auth_header), (rtsp_connection_send), (rtsp_connection_set_auth): g_base64_encode is a GLib 2.12 function. Use an equivalent taken from icecast to replace it. Relicensed from GPL courtesy of Mike Smith.
* gst/rtsp/: Implement simple Basic Authentication support so that urls like ↵Jan Schmidt2007-02-231-1/+61
| | | | | | | | | | | | | | | | | | | | | | | rtsp://user:pass@hostname/rtspstream work ... Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_finalize), (gst_rtspsrc_create_stream), (rtsp_auth_method_to_string), (gst_rtspsrc_parse_auth_hdr), (gst_rtspsrc_setup_auth), (gst_rtspsrc_send), (gst_rtspsrc_try_send), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_pause), (gst_rtspsrc_uri_set_uri): * gst/rtsp/gstrtspsrc.h: * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (append_auth_header), (rtsp_connection_send), (rtsp_connection_free), (rtsp_connection_set_auth): * gst/rtsp/rtspconnection.h: * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspurl.c: (rtsp_url_get_request_uri): * gst/rtsp/rtspurl.h: Implement simple Basic Authentication support so that urls like rtsp://user:pass@hostname/rtspstream work on hosts that require authentication.
* gst/avi/gstavimux.c: Comment a #if 0 in caps template definition as VS6 ↵Sébastien Moutte2007-02-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | seems to do not support it. Original commit message from CVS: * gst/avi/gstavimux.c: Comment a #if 0 in caps template definition as VS6 seems to do not support it. * gst/rtsp/gstrtspsrc.c:(gst_rtspsrc_loop_udp): Use gst_guint64_to_gdouble for conversion. * gst/rtsp/rtspconnection.c:(rtsp_connection_send): Move variables declaration before the first instruction. * gst/rtsp/rtspdefs.c:(rtsp_strresult): Don't use hstrerror for error log on G_OS_WIN32 build as it's not supported. And don't include netdb.h for G_OS_WIN32 * gst/rtsp/sdpmessage.c:(sdp_parse_line): This initialization SDPMedia nmedia = {.media = NULL }; is not supported by VS6 then use an other way to initialize SDPMedia structure. * gst/udp/gstdynudpsink.h: * gst/udp/gstdynudpnetutils.h: Do not include <sys/time.h> for G_OS_WIN32 * gst/udp/gstudpsrc.c: Define socklen_t as int for G_OS_WIN32 * win/common/config.h.in: Undef HAVE_NETINET_IN_H * win32/vs6/gst_plugins_good.dsw: * win32/vs6/libgstrtp.dsp: * win32/vs6/libgstrtsp.dsp: * win32/vs6/libgstautogen.dsp: * win32/vs6/libgstaudiofx.dsp: * win32/vs6/libgstudp.dsp: Add and update project files. * win32/common/gstudp-enumtypes.c: * win32/common/gstudp-enumtypes.h: Add a copy of udp enumtypes to win32/common as in core and base.
* gst/rtsp/: Allow url to be NULL to be able to use it for server connections.Peter Kjellerstedt2007-01-101-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/rtsp/COPYING.MIT: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_stream), (gst_rtspsrc_stream_free), (gst_rtspsrc_cleanup), (gst_rtspsrc_alloc_udp_ports), (pad_unblocked), (pad_blocked), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_activate_streams), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_create_transports_string), (gst_rtspsrc_prepare_transports), (gst_rtspsrc_setup_streams), (gst_rtspsrc_open), (gst_rtspsrc_close): * gst/rtsp/gstrtspsrc.h: * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect), (rtsp_connection_send), (read_line), (parse_request_line), (parse_line), (rtsp_connection_read), (rtsp_connection_close): * gst/rtsp/rtspdefs.c: (rtsp_init_status), (rtsp_strresult), (rtsp_method_as_text), (rtsp_header_as_text), (rtsp_status_as_text), (rtsp_find_header_field), (rtsp_find_method): * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspextwms.c: (rtsp_ext_wms_after_send), (rtsp_ext_wms_configure_stream): * gst/rtsp/rtspmessage.c: (rtsp_message_new), (rtsp_message_init), (rtsp_message_new_request), (rtsp_message_init_request), (rtsp_message_new_response), (rtsp_message_init_response), (rtsp_message_init_data), (rtsp_message_unset), (rtsp_message_free), (rtsp_message_add_header), (rtsp_message_get_header), (rtsp_message_set_body), (rtsp_message_get_body), (dump_mem), (rtsp_message_dump): * gst/rtsp/rtspmessage.h: * gst/rtsp/sdpmessage.c: (sdp_message_get_attribute_val_n), (sdp_media_get_attribute_val_n), (read_string), (read_string_del), (sdp_parse_line), (sdp_message_parse_buffer), (print_media), (sdp_message_dump): Allow url to be NULL to be able to use it for server connections. Can now send responses as well as requests. No longer hangs in an endless loop if EOF is received. Can now convert a status code to a text string. Return RTSP_HDR_INVALID for unknown headers. Return RTSP_INVALID for unknown methods. Copy CSeq and Session headers from the request. Only free memory corresponding to the currently set message type. Added const to function arguments as appropriate. Avoid a compiler warning when initializing nmedia. Use guint rather than gint to avoid compiler warnings. Fix crasher in wms extension. Factor out stream setup from open_connection. Delay activation of streams when actual data is received from the server, this prepares us to do proper protocol switching. Added new license. Fixes #380895.
* ext/jpeg/: These libjpeg callbacks should return a 'boolean' (unsigned char ↵Vincent Torri2007-01-081-2/+9
| | | | | | | | | | | | | | | | | apparently) and not a 'gboolean' (which m... Original commit message from CVS: Patch by: Vincent Torri <vtorri at univ-evry fr> * ext/jpeg/gstjpegdec.c: * ext/jpeg/gstjpegenc.c: * ext/jpeg/smokecodec.c: These libjpeg callbacks should return a 'boolean' (unsigned char apparently) and not a 'gboolean' (which maps to gint). Fixes warnings when compiling with MingW (#393427). * gst/rtsp/rtspconnection.c: (rtsp_connection_read): Use ioctlsocket on win32. * gst/udp/gstudpsrc.c: (gst_udpsrc_create): Some printf format fixes for win32.
* gst/rtsp/rtspconnection.c: Don't set a data pointer to NULL and a size > 0 ↵Wim Taymans2006-11-151-1/+3
| | | | | | | | | | | | | | when we deal with empty packets. Original commit message from CVS: * gst/rtsp/rtspconnection.c: (read_body): Don't set a data pointer to NULL and a size > 0 when we deal with empty packets. * gst/rtsp/rtspmessage.c: (rtsp_message_new_response), (rtsp_message_init_response), (rtsp_message_init_data), (rtsp_message_unset), (rtsp_message_free), (rtsp_message_take_body): Check that we can't create invalid empty packets.
* gst/rtsp/: Reuse already existing enum for lower transport.Wim Taymans2006-10-181-3/+0
| | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtsp_lower_trans_get_type), (gst_rtspsrc_class_init), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_open), (gst_rtspsrc_uri_get_protocols), (gst_rtspsrc_uri_set_uri): * gst/rtsp/rtspconnection.c: (rtsp_connection_create): * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspurl.c: (rtsp_url_parse): * gst/rtsp/rtspurl.h: Reuse already existing enum for lower transport. Add rtspt and rtspu protocols. Send redirect to rtspt when udp times out.
* Fix a bunch of problems discovered by the Forte compiler, mostly type mixups ↵Josep Torra Valles2006-10-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | and pointer arithmetics with void pointe... Original commit message from CVS: Patch by: Josep Torra Valles <josep at fluendo com> * ext/cairo/gsttimeoverlay.c: (gst_cairo_time_overlay_transform): * ext/esd/esdsink.c: (gst_esdsink_write): * ext/flac/gstflacdec.c: (gst_flac_dec_length), (gst_flac_dec_read_seekable), (gst_flac_dec_chain), (gst_flac_dec_send_newsegment): * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback), (gst_flac_enc_tell_callback): * ext/jpeg/smokecodec.c: (find_best_size), (smokecodec_encode), (smokecodec_parse_header), (smokecodec_decode): * gst/avi/gstavimux.c: (gst_avi_mux_write_avix_index): * gst/debug/efence.c: (gst_fenced_buffer_alloc): * gst/goom/Makefile.am: * gst/goom/gstgoom.c: * gst/icydemux/gsticydemux.c: (gst_icydemux_typefind_or_forward): * gst/rtsp/gstrtspsrc.c: * gst/rtsp/rtspconnection.c: (rtsp_connection_read): * gst/udp/gstudpsink.c: * gst/udp/gstudpsrc.c: * gst/wavparse/gstwavparse.c: (gst_wavparse_change_state): * sys/sunaudio/gstsunaudiomixertrack.h: Fix a bunch of problems discovered by the Forte compiler, mostly type mixups and pointer arithmetics with void pointers. Fixes #362603.
* gst/rtsp/gstrtspsrc.*: Rework how the transport string is constructed, try ↵Wim Taymans2006-10-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to share channels and udp ports. Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type), (gst_rtspsrc_class_init), (gst_rtspsrc_init), (gst_rtspsrc_create_stream), (gst_rtspsrc_media_to_caps), (gst_rtspsrc_alloc_udp_ports), (gst_rtspsrc_stream_configure_transport), (find_stream_by_channel), (gst_rtspsrc_push_event), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_create_transports_string), (gst_rtspsrc_configure_transports), (gst_rtspsrc_open), (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): * gst/rtsp/gstrtspsrc.h: Rework how the transport string is constructed, try to share channels and udp ports. Make most of the stuff less dependant on RTP as we are also going to use it for RDT. Add support for transport specific session managers. * gst/rtsp/rtspconnection.c: (rtsp_connection_flush): Implement _flush(). * gst/rtsp/rtspdefs.c: (rtsp_strresult): * gst/rtsp/rtspdefs.h: Add generic error return code. * gst/rtsp/rtspext.h: Add support for pluggable tranport strings. * gst/rtsp/rtspextwms.c: (rtsp_ext_wms_before_send), (rtsp_ext_wms_after_send), (rtsp_ext_wms_parse_sdp), (rtsp_ext_wms_get_context): Detect WMServer and activate the extension. * gst/rtsp/rtsptransport.c: (rtsp_transport_get_mime), (rtsp_transport_get_manager), (rtsp_transport_parse): * gst/rtsp/rtsptransport.h: Added methods to get mime/manager for certain transports.
* gst/rtsp/gstrtspsrc.c: Fix flag registration.Wim Taymans2006-09-291-1/+1
| | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type): Fix flag registration. * gst/rtsp/rtspconnection.c: (rtsp_connection_read): Reading 0 also means 'no more commands'
* gst/rtsp/: Improve error reporting.Wim Taymans2006-09-231-4/+2
| | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_loop), (gst_rtspsrc_send), (gst_rtspsrc_open): * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect), (rtsp_connection_read), (read_body), (rtsp_connection_receive): * gst/rtsp/rtspdefs.c: (rtsp_strresult): * gst/rtsp/rtspdefs.h: Improve error reporting.
* gst/rtsp/URLS: Added some test URLS.Wim Taymans2006-09-201-76/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/URLS: Added some test URLS. * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_stream), (gst_rtspsrc_loop), (gst_rtspsrc_open): * gst/rtsp/gstrtspsrc.h: When creating streams, give access to the complete SDP. Fix some leaks. Collect and merge global stream properties in stream caps. Preliminary support for WMServer. * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect), (rtsp_connection_read), (read_body), (rtsp_connection_receive): * gst/rtsp/rtspconnection.h: Make connection interruptable. Refactor to make it reconnectable. Don't fail on short reads when reading data packets. * gst/rtsp/rtspurl.c: (rtsp_url_parse), (rtsp_url_set_port), (rtsp_url_get_port): * gst/rtsp/rtspurl.h: Add methods for getting/setting the port. * gst/rtsp/sdpmessage.c: (sdp_message_get_attribute_val_n), (sdp_message_get_attribute_val), (sdp_media_get_attribute), (sdp_media_get_attribute_val_n), (sdp_media_get_attribute_val), (sdp_media_get_format), (sdp_parse_line), (sdp_message_parse_buffer): Fix headers. Add methods for getting multiple attributes with the same name. Increase buffer size when parsing. Fix parsing of a=foo fields. * gst/rtsp/test.c: (main): Update to new connection API. * gst/rtsp/rtspmessage.c: (rtsp_message_new_response), (rtsp_message_init_response), (rtsp_message_init_data), (rtsp_message_unset), (rtsp_message_free), (rtsp_message_dump): * gst/rtsp/rtspmessage.h: * gst/rtsp/rtsptransport.c: (rtsp_transport_free): * gst/rtsp/rtsptransport.h: * gst/rtsp/sdp.h: * gst/rtsp/sdpmessage.h: * gst/rtsp/gstrtsp.c: * gst/rtsp/gstrtsp.h: * gst/rtsp/gstrtpdec.c: * gst/rtsp/gstrtpdec.h: * gst/rtsp/rtsp.h: * gst/rtsp/rtspdefs.c: * gst/rtsp/rtspdefs.h: Dual licensed under MIT and LGPL now.
* gst/rtsp/gstrtspsrc.*: Small cleanups, added documentation.Wim Taymans2006-09-181-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_media_to_caps), (gst_rtspsrc_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_pause), (gst_rtspsrc_change_state), (gst_rtspsrc_uri_get_uri), (gst_rtspsrc_uri_set_uri): * gst/rtsp/gstrtspsrc.h: Small cleanups, added documentation. Try to clean up the requests and responses. Refactor parsing the supported methods. * gst/rtsp/rtspconnection.c: (rtsp_connection_open), (rtsp_connection_create), (rtsp_connection_send), (parse_response_status), (parse_request_line), (rtsp_connection_receive), (rtsp_connection_close), (rtsp_connection_free): * gst/rtsp/rtsptransport.c: (rtsp_transport_new), (rtsp_transport_init), (rtsp_transport_parse), (rtsp_transport_free): * gst/rtsp/rtspurl.c: (rtsp_url_parse): * gst/rtsp/sdpmessage.c: (sdp_message_new), (sdp_message_init), (sdp_message_clean), (sdp_message_free), (sdp_media_new), (sdp_media_init), (sdp_message_parse_buffer), (sdp_message_dump): Use g_return_val some more. * gst/rtsp/rtspdefs.h: Add more enum values to track initial states. * gst/rtsp/rtspmessage.c: (rtsp_message_new_request), (rtsp_message_init_request), (rtsp_message_new_response), (rtsp_message_init_response), (rtsp_message_init_data), (rtsp_message_unset), (rtsp_message_free), (rtsp_message_add_header), (rtsp_message_remove_header), (rtsp_message_get_header), (rtsp_message_set_body), (rtsp_message_take_body), (rtsp_message_get_body), (rtsp_message_steal_body), (rtsp_message_dump): * gst/rtsp/rtspmessage.h: Reorder arguments, object goes as the first one. Use g_return_val some more.
* gst/rtsp/: Small cleanups. when multicast is selected as the transport, ↵Thijs Vermeir2006-09-181-3/+3
| | | | | | | | | | | | | | | | | create UDP sources and connect to the multica... Original commit message from CVS: Based on patch by: Thijs Vermeir <thijs dot vermeir at barco dot com> * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_set_state), (gst_rtspsrc_media_to_caps), (gst_rtspsrc_stream_setup_rtp), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_pause): * gst/rtsp/rtspconnection.c: (inet_aton): Small cleanups. when multicast is selected as the transport, create UDP sources and connect to the multicast group. Move parsing and setting of caps to a common place. Fixes #349894.
* gst/rtsp/rtspconnection.c: Remove unwanted DEBUG line.Wim Taymans2006-07-241-1/+0
| | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: (rtsp_connection_send): Remove unwanted DEBUG line.
* gst/rtsp/: replaced closesocket and close in code with one CLOSE_SOCKET.Wim Taymans2006-07-101-10/+15
| | | | | | | | | | Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/rtspconnection.c: (rtsp_connection_send), (rtsp_connection_close): * gst/rtsp/rtspdefs.h: replaced closesocket and close in code with one CLOSE_SOCKET. Some more cleanups. Fixes #345301.
* gst/rtsp/rtspconnection.c: Use better G_OS_* macros. Fixes #345301 some more.Wim Taymans2006-06-201-7/+18
| | | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: (inet_aton), (rtsp_connection_send), (rtsp_connection_close), (rtsp_connection_free): Use better G_OS_* macros. Fixes #345301 some more.
* gst/rtsp/rtspconnection.c: Make RTSP plugin compile on windows. Fixes #345301.Joni Valtanen2006-06-201-1/+49
| | | | | | | | | | Original commit message from CVS: Patch by: Joni Valtanen <joni dot valtanen at movial dot fi> * gst/rtsp/rtspconnection.c: (inet_aton), (rtsp_connection_send), (rtsp_connection_close): Make RTSP plugin compile on windows. Fixes #345301. Some changes to original patch to catch errors better. use ifdef WIN32 instead of ifndef.
* gst/rtsp/: Resurected rtpdec to make rtspsrc happy again.Wim Taymans2006-02-091-2/+12
| | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/gstrtpdec.c: (gst_rtpdec_get_type), (gst_rtpdec_class_init), (gst_rtpdec_init), (gst_rtpdec_getcaps), (gst_rtpdec_chain_rtp), (gst_rtpdec_chain_rtcp), (gst_rtpdec_set_property), (gst_rtpdec_get_property), (gst_rtpdec_change_state): * gst/rtsp/gstrtpdec.h: * gst/rtsp/gstrtsp.c: (plugin_init): * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_stream_configure_transport): * gst/rtsp/rtspconnection.c: (read_body), (rtsp_connection_receive): * gst/rtsp/rtspmessage.c: (rtsp_message_dump): Resurected rtpdec to make rtspsrc happy again. Skip attributes from the session id. Don't crash when dumping a message with an empty body.
* gst/rtsp/rtspconnection.c: Add <netinet/in.h> include and move <arpa/inet.h> ↵Benjamin Pineau2005-12-161-1/+2
| | | | | | | | | | include to make things work on OpenBSD a... Original commit message from CVS: * gst/rtsp/rtspconnection.c: Add <netinet/in.h> include and move <arpa/inet.h> include to make things work on OpenBSD as well (fixes #323717; patch by: Benjamin Pineau)
* configure.ac: fix up GST_PLUGIN_LDFLAGSThomas Vander Stichele2005-11-271-2/+3
| | | | | | | | | | | Original commit message from CVS: * configure.ac: fix up GST_PLUGIN_LDFLAGS * gst/rtsp/rtspconnection.c: fix includes (see #317043) * gst/videofilter/Makefile.am: stop installing this library
* gst/rtsp/rtspconnection.c: Apply patch from Sebastien Cote to fix #319184.Wim Taymans2005-11-211-2/+3
| | | | | | Original commit message from CVS: * gst/rtsp/rtspconnection.c: (read_body): Apply patch from Sebastien Cote to fix #319184.
* ext/amrnb/: Update caps with audio/AMR.Wim Taymans2005-08-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/amrnb/amrnbdec.c: * ext/amrnb/amrnbenc.c: (gst_amrnbenc_setcaps): * ext/amrnb/amrnbparse.c: Update caps with audio/AMR. * gst/rtp/gstrtpamrdec.c: (gst_rtpamrdec_init), (gst_rtpamrdec_sink_setcaps), (gst_rtpamrdec_chain), (gst_rtpamrdec_change_state): * gst/rtp/gstrtpamrdec.h: * gst/rtp/gstrtpamrenc.c: (gst_rtpamrenc_class_init), (gst_rtpamrenc_init), (gst_rtpamrenc_chain): Dont set FT headers twice, it was already in the encoded bitstream. * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play): * gst/rtsp/rtspconnection.c: (parse_line): Cleanups * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_create), (gst_udpsrc_set_property), (gst_udpsrc_get_property): * gst/udp/gstudpsrc.h: Added caps property, we need this soon to type the buffers.
* configure.ac (GST_CFLAGS): GCC strikes back!!! Let the build breakage ensue!!!Andy Wingo2005-06-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: 2005-06-29 Andy Wingo <wingo@pobox.com> * configure.ac (GST_CFLAGS): GCC strikes back!!! Let the build breakage ensue!!! * gst/rtsp/gstrtspsrc.c (gst_rtspsrc_loop, gst_rtspsrc_open): Signedness, unused var fixes. (gst_rtspsrc_close): Unused? * gst/realmedia/rmdemux.c (re_hexdump_bytes): Unused. * gst/law/mulaw-encode.c (gst_mulawenc_chain): Signeness fix. * gst/law/alaw-encode.c (alawenc_getcaps): Remove unneeded declarations. Typo (probably crasher) fix. * gst/law/mulaw-encode.c (mulawdec_getcaps): * gst/law/mulaw-encode.c (mulawenc_getcaps): * gst/law/alaw-decode.c (alawdec_getcaps): Same crasher fix. * gst/goom/gstgoom.c (gst_goom_init): Hook up the event function. * gst/effectv/gstwarp.c (gst_warptv_setup): Signedness fix. * gst/effectv/gstdice.c (gst_dicetv_draw): Um, deferencing uninitialized pointer not good. * gst/videofilter/gstvideoexample.c (plugin_init): * gst/videofilter/Makefile.am (libgstvideoexample_la_LIBADD): Link to libgstvideofilter instead of gst_library_load. * gst/alpha/gstalpha.c (gst_alpha_chroma_key_i420) (gst_alpha_chroma_key_ayuv): Signedness fixen.
* gst/rtsp/: Added READMEWim Taymans2005-05-111-40/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/rtsp/README: * gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type), (gst_rtspsrc_class_init), (gst_rtspsrc_create_stream), (gst_rtspsrc_add_element), (gst_rtspsrc_set_state), (gst_rtspsrc_stream_setup_rtp), (gst_rtspsrc_stream_configure_transport), (find_stream), (gst_rtspsrc_loop), (gst_rtspsrc_open), (gst_rtspsrc_play): * gst/rtsp/rtsp.h: * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_send), (read_line), (parse_request_line), (parse_line), (read_body), (rtsp_connection_receive), (rtsp_connection_free): * gst/rtsp/rtspconnection.h: * gst/rtsp/rtspdefs.c: (rtsp_find_method): * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspmessage.c: (rtsp_message_set_body), (rtsp_message_take_body): * gst/rtsp/rtspmessage.h: * gst/rtsp/rtspstream.h: * gst/rtsp/sdpmessage.c: (sdp_parse_line): Added README Some cleanups.
* Ported to 0.9.Wim Taymans2005-05-111-0/+432
Original commit message from CVS: Ported to 0.9. Set up transports, init UDP ports, init RTP session managers.