@@ -193,6 +193,7 @@ impl<'a> SdpApi<'a> {
193
193
/// If changes have been made, nothing happens until we call [`SdpApi::apply()`].
194
194
///
195
195
/// ```
196
+ /// # #[cfg(feature = "openssl")] {
196
197
/// # use str0m::{Rtc, media::MediaKind, media::Direction};
197
198
/// let mut rtc = Rtc::new();
198
199
///
@@ -201,6 +202,7 @@ impl<'a> SdpApi<'a> {
201
202
///
202
203
/// let mid = changes.add_media(MediaKind::Audio, Direction::SendRecv, None, None);
203
204
/// assert!(changes.has_changes());
205
+ /// # }
204
206
/// ```
205
207
pub fn has_changes ( & self ) -> bool {
206
208
!self . changes . 0 . is_empty ( )
@@ -218,12 +220,14 @@ impl<'a> SdpApi<'a> {
218
220
/// CNAME in the RTP SDES.
219
221
///
220
222
/// ```
223
+ /// # #[cfg(feature = "openssl")] {
221
224
/// # use str0m::{Rtc, media::MediaKind, media::Direction};
222
225
/// let mut rtc = Rtc::new();
223
226
///
224
227
/// let mut changes = rtc.sdp_api();
225
228
///
226
229
/// let mid = changes.add_media(MediaKind::Audio, Direction::SendRecv, None, None);
230
+ /// # }
227
231
/// ```
228
232
pub fn add_media (
229
233
& mut self ,
@@ -322,12 +326,14 @@ impl<'a> SdpApi<'a> {
322
326
/// useful when multiple channels are in use at the same time.
323
327
///
324
328
/// ```
329
+ /// # #[cfg(feature = "openssl")] {
325
330
/// # use str0m::Rtc;
326
331
/// let mut rtc = Rtc::new();
327
332
///
328
333
/// let mut changes = rtc.sdp_api();
329
334
///
330
335
/// let cid = changes.add_channel("my special channel".to_string());
336
+ /// # }
331
337
/// ```
332
338
pub fn add_channel ( & mut self , label : String ) -> ChannelId {
333
339
self . add_channel_with_config ( ChannelConfig {
@@ -341,6 +347,7 @@ impl<'a> SdpApi<'a> {
341
347
/// Refer to `add_channel` for more details.
342
348
///
343
349
/// ```
350
+ /// # #[cfg(feature = "openssl")] {
344
351
/// # use str0m::{channel::{ChannelConfig, Reliability}, Rtc};
345
352
/// let mut rtc = Rtc::new();
346
353
///
@@ -352,6 +359,7 @@ impl<'a> SdpApi<'a> {
352
359
/// ordered: false,
353
360
/// ..Default::default()
354
361
/// });
362
+ /// # }
355
363
/// ```
356
364
pub fn add_channel_with_config ( & mut self , config : ChannelConfig ) -> ChannelId {
357
365
let has_media = self . rtc . session . app ( ) . is_some ( ) ;
@@ -405,11 +413,13 @@ impl<'a> SdpApi<'a> {
405
413
/// the current [`SdpPendingOffer`].
406
414
///
407
415
/// ```
416
+ /// # #[cfg(feature = "openssl")] {
408
417
/// # use str0m::Rtc;
409
418
/// let mut rtc = Rtc::new();
410
419
///
411
420
/// let changes = rtc.sdp_api();
412
421
/// assert!(changes.apply().is_none());
422
+ /// # }
413
423
/// ```
414
424
pub fn apply ( self ) -> Option < ( SdpOffer , SdpPendingOffer ) > {
415
425
if self . changes . is_empty ( ) {
@@ -1558,6 +1568,8 @@ mod test {
1558
1568
1559
1569
#[ test]
1560
1570
fn test_out_of_order_error ( ) {
1571
+ crate :: init_crypto_default ( ) ;
1572
+
1561
1573
let mut rtc1 = Rtc :: new ( ) ;
1562
1574
let mut rtc2 = Rtc :: new ( ) ;
1563
1575
@@ -1580,6 +1592,8 @@ mod test {
1580
1592
1581
1593
#[ test]
1582
1594
fn sdp_api_merge_works ( ) {
1595
+ crate :: init_crypto_default ( ) ;
1596
+
1583
1597
let mut rtc = Rtc :: new ( ) ;
1584
1598
let mut changes = rtc. sdp_api ( ) ;
1585
1599
changes. add_media ( MediaKind :: Audio , Direction :: SendOnly , None , None ) ;
@@ -1596,6 +1610,8 @@ mod test {
1596
1610
1597
1611
#[ test]
1598
1612
fn test_rtp_payload_priority ( ) {
1613
+ crate :: init_crypto_default ( ) ;
1614
+
1599
1615
let mut rtc1 = Rtc :: builder ( )
1600
1616
. clear_codecs ( )
1601
1617
. enable_h264 ( true )
0 commit comments