diff --git a/docs/html/classuvgrtp_1_1media__stream.html b/docs/html/classuvgrtp_1_1media__stream.html
index 64cc389..c689352 100644
--- a/docs/html/classuvgrtp_1_1media__stream.html
+++ b/docs/html/classuvgrtp_1_1media__stream.html
@@ -96,6 +96,7 @@ rtp_error_t
push_frame
- Alternative to pull_frame(). The provided hook is called when a frame is received.
- "arg" is optional argument that is passed to hook when it is called. It may be nullptr
- NOTE: Hook should not be used to process the frame but it should be a place where the frame handout happens from uvgRTP to application
- Return RTP_OK on success Return RTP_INVALID_VALUE if "hook" is nullptr
+
+ Asynchronous way of getting frames.
+ Receive hook is an alternative to polling frames using uvgrtp::media_stream::pull_frame(). Instead of application asking from uvgRTP if there are any new frames available, uvgRTP will notify the application when a frame has been received
+ The hook should not be used for media processing as it will block the receiver from reading more frames. Instead, it should only be used as an interface between uvgRTP and the calling application where the frame hand-off happens.
+ - Parameters
-
+
+ arg | Optional argument that is passed to the hook when it is called, can be set to nullptr |
+ hook | Function pointer to the receive hook that uvgRTP should call |
+
+
+
+ - Returns
- RTP error code
+ - Return values
-
+
+ RTP_OK | On success |
+ RTP_INVALID_VALUE | If hook is nullptr |
+
+
+
diff --git a/docs/html/index.html b/docs/html/index.html
index bb53316..ebd3701 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -68,7 +68,7 @@ $(function() {
To use uvgRTP, you must first create a uvgrtp::context object
Then you need to allocate a uvgrtp::session object from the context object by calling uvgrtp::context::create_session()
Finally, you need to allocate a uvgrtp::media_stream object from the allocated session object by calling uvgrtp::session::create_stream()
- This object is used for both sending and receiving, see documentation for uvgrtp::media_stream::push_frame(), uvgrtp::media_stream::pull_frame() and uvgrtp::media_stream::install_receive_hook() for more details.
+ This object is used for both sending and receiving, see documentation for uvgrtp::media_stream::push_frame(), uvgrtp::media_stream::pull_frame() and uvgrtp::media_stream::install_receive_hook() for more details.
diff --git a/docs/html/media__stream_8hh_source.html b/docs/html/media__stream_8hh_source.html
index 9d5d24b..2f4821b 100644
--- a/docs/html/media__stream_8hh_source.html
+++ b/docs/html/media__stream_8hh_source.html
@@ -136,95 +136,95 @@ $(function() {
-
-
-
-
-
-
-
-
- 139 rtp_error_t install_deallocation_hook( void (*hook)( void *));
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 154 rtp_error_t install_notify_hook( void *arg, void (*hook)( void *, int));
-
-
-
-
- 171 void set_media_config( void *config);
- 172 void *get_media_config();
-
-
-
-
-
-
-
-
-
-
-
- 197 rtp_error_t init_connection();
-
-
-
-
- 202 uvgrtp::srtcp *srtcp_;
- 203 uvgrtp::socket *socket_;
-
-
-
- 207 sockaddr_in addr_out_;
-
-
-
-
-
-
-
-
- 216 rtp_ctx_conf_t ctx_config_;
-
-
-
-
-
-
+
+
+
+
+
+
+ 148 rtp_error_t install_deallocation_hook( void (*hook)( void *));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 163 rtp_error_t install_notify_hook( void *arg, void (*hook)( void *, int));
+
+
+
+
+ 180 void set_media_config( void *config);
+ 181 void *get_media_config();
+
+
+
+
+
+
+
+
+
+
+
+ 206 rtp_error_t init_connection();
+
+
+
+
+ 211 uvgrtp::srtcp *srtcp_;
+ 212 uvgrtp::socket *socket_;
+
+
+
+ 216 sockaddr_in addr_out_;
+
+
+
+
+
+
-
- 225 uint32_t rtp_handler_key_;
- 226 uint32_t zrtp_handler_key_;
-
-
- 229 uvgrtp::pkt_dispatcher *pkt_dispatcher_;
- 230 std::thread *dispatcher_thread_;
-
-
- 233 uvgrtp::formats::media *media_;
-
-
- 236 uvgrtp::holepuncher *holepuncher_;
-
-
-
- 240 namespace uvg_rtp = uvgrtp;
+
+ 225 rtp_ctx_conf_t ctx_config_;
+
+
+
+
+
+
+
+
+ 234 uint32_t rtp_handler_key_;
+ 235 uint32_t zrtp_handler_key_;
+
+
+ 238 uvgrtp::pkt_dispatcher *pkt_dispatcher_;
+ 239 std::thread *dispatcher_thread_;
+
+
+ 242 uvgrtp::formats::media *media_;
+
+
+ 245 uvgrtp::holepuncher *holepuncher_;
+
+
+
+ 249 namespace uvg_rtp = uvgrtp;
-
+
diff --git a/include/media_stream.hh b/include/media_stream.hh
index 8b895d4..81612c4 100644
--- a/include/media_stream.hh
+++ b/include/media_stream.hh
@@ -118,15 +118,24 @@ namespace uvgrtp {
* Return pointer to RTP frame on success */
uvgrtp::frame::rtp_frame *pull_frame(size_t timeout);
- /** Alternative to pull_frame(). The provided hook is called when a frame is received.
+ /**
+ * \brief Asynchronous way of getting frames
*
- * "arg" is optional argument that is passed to hook when it is called. It may be nullptr
+ * \details Receive hook is an alternative to polling frames using uvgrtp::media_stream::pull_frame().
+ * Instead of application asking from uvgRTP if there are any new frames available, uvgRTP will notify
+ * the application when a frame has been received
*
- * NOTE: Hook should not be used to process the frame but it should be a place where the
- * frame handout happens from uvgRTP to application
+ * The hook should not be used for media processing as it will block the receiver from
+ * reading more frames. Instead, it should only be used as an interface between uvgRTP and
+ * the calling application where the frame hand-off happens.
*
- * Return RTP_OK on success
- * Return RTP_INVALID_VALUE if "hook" is nullptr */
+ * \param arg Optional argument that is passed to the hook when it is called, can be set to nullptr
+ * \param hook Function pointer to the receive hook that uvgRTP should call
+ *
+ * \return RTP error code
+ *
+ * \retval RTP_OK On success
+ * \retval RTP_INVALID_VALUE If hook is nullptr */
rtp_error_t install_receive_hook(void *arg, void (*hook)(void *, uvgrtp::frame::rtp_frame *));
/// \cond DO_NOT_DOCUMENT
|