CURLOPT_INTERLEAVEDATA.3 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_INTERLEAVEDATA 3 "January 02, 2023" "libcurl 7.88.1" "curl_easy_setopt options"
  26. .SH NAME
  27. CURLOPT_INTERLEAVEDATA \- pointer passed to RTSP interleave callback
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void *pointer);
  32. .fi
  33. .SH DESCRIPTION
  34. This is the userdata \fIpointer\fP that will be passed to
  35. \fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is received. If
  36. the interleave function callback is not set, this pointer is not used
  37. anywhere.
  38. .SH DEFAULT
  39. NULL
  40. .SH PROTOCOLS
  41. RTSP
  42. .SH EXAMPLE
  43. .nf
  44. static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user)
  45. {
  46. struct local *l = (struct local *)user;
  47. /* take care of the packet in 'ptr', then return... */
  48. return size * nmemb;
  49. }
  50. {
  51. struct local rtp_data;
  52. curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
  53. curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
  54. }
  55. .fi
  56. .SH AVAILABILITY
  57. Added in 7.20.0
  58. .SH RETURN VALUE
  59. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  60. .SH "SEE ALSO"
  61. .BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), "