diff rtsp.h @ 6095:c5337969b43b libavformat

RTSP: Propagate errors up from ff_rtsp_send_cmd* Patch by Josh Allmann, joshua dot allmann at gmail
author mstorsjo
date Sat, 05 Jun 2010 19:45:46 +0000
parents e688babd14df
children 7c2221a89902
line wrap: on
line diff
--- a/rtsp.h	Sat Jun 05 19:43:57 2010 +0000
+++ b/rtsp.h	Sat Jun 05 19:45:46 2010 +0000
@@ -345,8 +345,10 @@
  * @param send_content if non-null, the data to send as request body content
  * @param send_content_length the length of the send_content data, or 0 if
  *                            send_content is null
+ *
+ * @return zero if success, nonzero otherwise
  */
-void ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
+int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
                                          const char *method, const char *url,
                                          const char *headers,
                                          const unsigned char *send_content,
@@ -356,7 +358,7 @@
  *
  * @see rtsp_send_cmd_with_content_async
  */
-void ff_rtsp_send_cmd_async(AVFormatContext *s, const char *method,
+int ff_rtsp_send_cmd_async(AVFormatContext *s, const char *method,
                             const char *url, const char *headers);
 
 /**
@@ -372,8 +374,10 @@
  * @param send_content if non-null, the data to send as request body content
  * @param send_content_length the length of the send_content data, or 0 if
  *                            send_content is null
+ *
+ * @return zero if success, nonzero otherwise
  */
-void ff_rtsp_send_cmd_with_content(AVFormatContext *s,
+int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
                                    const char *method, const char *url,
                                    const char *headers,
                                    RTSPMessageHeader *reply,
@@ -386,7 +390,7 @@
  *
  * @see rtsp_send_cmd_with_content
  */
-void ff_rtsp_send_cmd(AVFormatContext *s, const char *method,
+int ff_rtsp_send_cmd(AVFormatContext *s, const char *method,
                       const char *url, const char *headers,
                       RTSPMessageHeader *reply, unsigned char **content_ptr);