5
5
void thread_func (void )
6
6
{
7
7
/* See sending.cc for more details */
8
- uvg_rtp ::context ctx;
9
- uvg_rtp ::session *sess = ctx.create_session (" 127.0.0.1" );
8
+ uvgrtp ::context ctx;
9
+ uvgrtp ::session *sess = ctx.create_session (" 127.0.0.1" );
10
10
11
11
/* Enable SRTP and use ZRTP to manage keys */
12
12
unsigned flags = RCE_SRTP | RCE_SRTP_KMNGMNT_ZRTP;
13
13
14
14
/* Keys creates using Diffie-Hellman mode */
15
- uvg_rtp ::media_stream *recv1 = sess->create_stream (8889 , 8888 , RTP_FORMAT_GENERIC, flags);
15
+ uvgrtp ::media_stream *recv1 = sess->create_stream (8889 , 8888 , RTP_FORMAT_GENERIC, flags);
16
16
17
17
/* Keys created using Multistream mode */
18
- uvg_rtp ::media_stream *recv2 = sess->create_stream (7778 , 7777 , RTP_FORMAT_GENERIC, flags);
18
+ uvgrtp ::media_stream *recv2 = sess->create_stream (7778 , 7777 , RTP_FORMAT_GENERIC, flags);
19
19
20
20
for (;;) {
21
21
auto frame = recv1->pull_frame ();
22
22
fprintf (stderr, " Message: '%s'\n " , frame->payload );
23
- (void )uvg_rtp ::frame::dealloc_frame (frame);
23
+ (void )uvgrtp ::frame::dealloc_frame (frame);
24
24
25
25
frame = recv2->pull_frame ();
26
26
fprintf (stderr, " Message: '%s'\n " , frame->payload );
27
- (void )uvg_rtp ::frame::dealloc_frame (frame);
27
+ (void )uvgrtp ::frame::dealloc_frame (frame);
28
28
}
29
29
}
30
30
@@ -38,19 +38,19 @@ int main(void)
38
38
new std::thread (thread_func);
39
39
40
40
/* See sending.cc for more details */
41
- uvg_rtp ::context ctx;
42
- uvg_rtp ::session *sess = ctx.create_session (" 127.0.0.1" );
41
+ uvgrtp ::context ctx;
42
+ uvgrtp ::session *sess = ctx.create_session (" 127.0.0.1" );
43
43
44
44
/* Enable SRTP and use ZRTP to manage keys */
45
45
unsigned flags = RCE_SRTP | RCE_SRTP_KMNGMNT_ZRTP;
46
46
47
47
/* Initialize ZRTP and negotiate the keys used to encrypt the media */
48
- uvg_rtp ::media_stream *send1 = sess->create_stream (8888 , 8889 , RTP_FORMAT_GENERIC, flags);
48
+ uvgrtp ::media_stream *send1 = sess->create_stream (8888 , 8889 , RTP_FORMAT_GENERIC, flags);
49
49
50
50
/* The first call to create_stream() creates keys for the session using Diffie-Hellman
51
51
* key exchange and all subsequent calls to create_stream() initialize keys for the
52
52
* stream using Multistream mode */
53
- uvg_rtp ::media_stream *send2 = sess->create_stream (7777 , 7778 , RTP_FORMAT_GENERIC, flags);
53
+ uvgrtp ::media_stream *send2 = sess->create_stream (7777 , 7778 , RTP_FORMAT_GENERIC, flags);
54
54
55
55
char *message = (char *)" Hello, world!" ;
56
56
size_t msg_len = strlen (message);
0 commit comments