<p>The <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> is an entity which represents one RTP stream.
<trclass="memdesc:a0950a91bd645cbf842d8218ae4171aed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Add keying information for user-managed SRTP session. <ahref="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">More...</a><br/></td></tr>
<trclass="memitem:a157e9973d92b65e82914d4028690c770"><tdclass="memItemLeft"align="right"valign="top">rtp_error_t </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classuvgrtp_1_1media__stream.html#a157e9973d92b65e82914d4028690c770">push_frame</a> (uint8_t *data, size_t data_len, int rtp_flags)</td></tr>
<trclass="memdesc:a157e9973d92b65e82914d4028690c770"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Send data to remote participant with a custom timestamp. <ahref="classuvgrtp_1_1media__stream.html#a157e9973d92b65e82914d4028690c770">More...</a><br/></td></tr>
<trclass="memitem:a068a0963e06f789b4e4310a45cbe4409"><tdclass="memItemLeft"align="right"valign="top">rtp_error_t </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classuvgrtp_1_1media__stream.html#a068a0963e06f789b4e4310a45cbe4409">push_frame</a> (std::unique_ptr< uint8_t[]> data, size_t data_len, int rtp_flags)</td></tr>
<trclass="memdesc:a068a0963e06f789b4e4310a45cbe4409"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Send data to remote participant with a custom timestamp. <ahref="classuvgrtp_1_1media__stream.html#a068a0963e06f789b4e4310a45cbe4409">More...</a><br/></td></tr>
<trclass="memitem:ac0cb1cf34b639c9ba71b047b3ba26d22"><tdclass="memItemLeft"align="right"valign="top">rtp_error_t </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classuvgrtp_1_1media__stream.html#ac0cb1cf34b639c9ba71b047b3ba26d22">push_frame</a> (uint8_t *data, size_t data_len, uint32_t ts, int rtp_flags)</td></tr>
<trclass="memdesc:ac0cb1cf34b639c9ba71b047b3ba26d22"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Send data to remote participant with a custom timestamp. <ahref="classuvgrtp_1_1media__stream.html#ac0cb1cf34b639c9ba71b047b3ba26d22">More...</a><br/></td></tr>
<trclass="memitem:abe9099254c6bf16f255f5f50441ec9d2"><tdclass="memItemLeft"align="right"valign="top">rtp_error_t </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classuvgrtp_1_1media__stream.html#abe9099254c6bf16f255f5f50441ec9d2">push_frame</a> (std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int rtp_flags)</td></tr>
<trclass="memdesc:abe9099254c6bf16f255f5f50441ec9d2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Send data to remote participant with a custom timestamp. <ahref="classuvgrtp_1_1media__stream.html#abe9099254c6bf16f255f5f50441ec9d2">More...</a><br/></td></tr>
<trclass="memdesc:ab0c854a4c36572f91008a8e1e49e38bb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Poll a frame indefinitely from the media stream object. <ahref="classuvgrtp_1_1media__stream.html#ab0c854a4c36572f91008a8e1e49e38bb">More...</a><br/></td></tr>
<trclass="memdesc:a466067ad9924a52530c62c53c1b397b4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Poll a frame for a specified time from the media stream object. <ahref="classuvgrtp_1_1media__stream.html#a466067ad9924a52530c62c53c1b397b4">More...</a><br/></td></tr>
<trclass="memdesc:a74a558b23866976e52c5903996544a27"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Asynchronous way of getting frames. <ahref="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">More...</a><br/></td></tr>
<trclass="memdesc:a2cee4fe3bf423ec317b4a3eacc136238"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Configure the media stream, see <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587f"title="RTP context configuration flags.">RTP_CTX_CONFIGURATION_FLAGS</a> for more details. <ahref="classuvgrtp_1_1media__stream.html#a2cee4fe3bf423ec317b4a3eacc136238">More...</a><br/></td></tr>
<trclass="memdesc:ab339f15d5a852beacd901b7b78e887ea"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get pointer to the RTCP object of the media stream. <ahref="classuvgrtp_1_1media__stream.html#ab339f15d5a852beacd901b7b78e887ea">More...</a><br/></td></tr>
<trclass="memdesc:a8796cb34e0e6c61af8cabd13dd6793b5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get SSRC identifier. You can use the SSRC value for example to find the report block belonging to this <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> in RTCP sender/receiver report. <ahref="classuvgrtp_1_1media__stream.html#a8796cb34e0e6c61af8cabd13dd6793b5">More...</a><br/></td></tr>
<divclass="textblock"><p>The <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> is an entity which represents one RTP stream. </p>
<p><aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> is defined by the ports which are used for sending and/or receiving media. It is possible for <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> to be bi- or unidirectional. The unidirectionality is achieved by specifying RCE_SEND_ONLY or RCE_RECEIVE_ONLY flag when creating <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a>.</p>
<p>If RCE_RTCP was given when creating <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a>, you can get the <aclass="el"href="classuvgrtp_1_1rtcp.html"title="RTCP instance handles all incoming and outgoing RTCP traffic, including report generation.">uvgrtp::rtcp</a> object with <aclass="el"href="classuvgrtp_1_1media__stream.html#ab339f15d5a852beacd901b7b78e887ea"title="Get pointer to the RTCP object of the media stream.">get_rtcp()</a>-function.</p>
<p><aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> corresponds to one RTP session in <ahref="https://www.rfc-editor.org/rfc/rfc3550">RFC 3550</a>. </p>
<pclass="definition">Definition at line <aclass="el"href="media__stream_8hh_source.html#l00049">49</a> of file <aclass="el"href="media__stream_8hh_source.html">media_stream.hh</a>.</p>
</div><h2class="groupheader">Member Function Documentation</h2>
<p>For user-managed SRTP session (flag RCE_SRTP_KMNGMNT_USER), the media stream is not started until SRTP key has been added and all calls to <aclass="el"href="classuvgrtp_1_1media__stream.html#a157e9973d92b65e82914d4028690c770"title="Send data to remote participant with a custom timestamp.">push_frame()</a> will fail.</p>
<p>Configure the media stream, see <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587f"title="RTP context configuration flags.">RTP_CTX_CONFIGURATION_FLAGS</a> for more details. </p>
<p>This object is used to control all RTCP-related functionality and RTCP documentation can be found from <aclass="el"href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a></p>
<tr><tdclass="paramname">uvgrtp::rtcp*</td><td>If RTCP has been enabled (RCE_RTCP has been given to <aclass="el"href="classuvgrtp_1_1session.html#a0b9fb48e95cbfdb76fd9f61e8cafe8e4"title="Create a uni- or bidirectional media stream.">uvgrtp::session::create_stream()</a>) </td></tr>
<p>Get SSRC identifier. You can use the SSRC value for example to find the report block belonging to this <aclass="el"href="classuvgrtp_1_1media__stream.html"title="The media_stream is an entity which represents one RTP stream.">media_stream</a> in RTCP sender/receiver report. </p>
<dlclass="section return"><dt>Returns</dt><dd>SSRC value </dd></dl>
<p>Receive hook is an alternative to polling frames using <aclass="el"href="classuvgrtp_1_1media__stream.html#ab0c854a4c36572f91008a8e1e49e38bb"title="Poll a frame indefinitely from the media stream object.">uvgrtp::media_stream::pull_frame()</a>. Instead of application asking from uvgRTP if there are any new frames available, uvgRTP will notify the application when a frame has been received</p>
<p>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.</p>
<p>If so specified either by the selected media format and/or given <aclass="el"href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af"title="RTP context enable flags.">RTP_CTX_ENABLE_FLAGS</a>, uvgRTP fragments the input data into RTP packets of 1492 bytes, or to any other size defined by the application using <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></p>
<tr><tdclass="paramname">rtp_flags</td><td>Optional flags, see <aclass="el"href="util_8hh.html#af03a75996471fc531742cd640c7caf2d"title="These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.">RTP_FLAGS</a> for more details</td></tr>
<p>If so specified either by the selected media format and/or given <aclass="el"href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af"title="RTP context enable flags.">RTP_CTX_ENABLE_FLAGS</a>, uvgRTP fragments the input data into RTP packets of 1492 bytes, or to any other size defined by the application using <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></p>
<p>The frame is automatically reconstructed by the receiver if all fragments have been received successfully.</p>
<p>If application so wishes, it may override uvgRTP's own timestamp calculations and provide timestamping information for the stream itself. This requires that the application provides a sensible value for the ts parameter. If RTCP has been enabled, <aclass="el"href="classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316"title="Provide timestamping information for RTCP.">uvgrtp::rtcp::set_ts_info()</a> should have been called.</p>
<tr><tdclass="paramname">rtp_flags</td><td>Optional flags, see <aclass="el"href="util_8hh.html#af03a75996471fc531742cd640c7caf2d"title="These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.">RTP_FLAGS</a> for more details</td></tr>
<p>If so specified either by the selected media format and/or given <aclass="el"href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af"title="RTP context enable flags.">RTP_CTX_ENABLE_FLAGS</a>, uvgRTP fragments the input data into RTP packets of 1492 bytes, or to any other size defined by the application using <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></p>
<tr><tdclass="paramname">rtp_flags</td><td>Optional flags, see <aclass="el"href="util_8hh.html#af03a75996471fc531742cd640c7caf2d"title="These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.">RTP_FLAGS</a> for more details</td></tr>
<p>If so specified either by the selected media format and/or given <aclass="el"href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af"title="RTP context enable flags.">RTP_CTX_ENABLE_FLAGS</a>, uvgRTP fragments the input data into RTP packets of 1492 bytes, or to any other size defined by the application using <aclass="el"href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></p>
<p>The frame is automatically reconstructed by the receiver if all fragments have been received successfully.</p>
<p>If application so wishes, it may override uvgRTP's own timestamp calculations and provide timestamping information for the stream itself. This requires that the application provides a sensible value for the ts parameter. If RTCP has been enabled, <aclass="el"href="classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316"title="Provide timestamping information for RTCP.">uvgrtp::rtcp::set_ts_info()</a> should have been called.</p>
<tr><tdclass="paramname">rtp_flags</td><td>Optional flags, see <aclass="el"href="util_8hh.html#af03a75996471fc531742cd640c7caf2d"title="These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.">RTP_FLAGS</a> for more details</td></tr>