Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
mediastreamer2
Commits
095dcbe5
Commit
095dcbe5
authored
Nov 19, 2015
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reworked source & sink RTT filters into c files instead of cpp
parent
72385008
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
build/android/Android.mk
build/android/Android.mk
+2
-2
src/CMakeLists.txt
src/CMakeLists.txt
+2
-2
src/Makefile.am
src/Makefile.am
+2
-2
src/otherfilters/rfc4103_sink.c
src/otherfilters/rfc4103_sink.c
+1
-1
src/otherfilters/rfc4103_source.c
src/otherfilters/rfc4103_source.c
+8
-6
No files found.
build/android/Android.mk
View file @
095dcbe5
...
...
@@ -113,8 +113,8 @@ LOCAL_SRC_FILES = \
voip/ringstream.c
\
voip/stun.c
\
voip/stun_udp.c
\
otherfilters/rfc4103_source.c
pp
\
otherfilters/rfc4103_sink.c
pp
\
otherfilters/rfc4103_source.c
\
otherfilters/rfc4103_sink.c
\
voip/rfc4103_textstream.c
LOCAL_STATIC_LIBRARIES
:=
...
...
src/CMakeLists.txt
View file @
095dcbe5
...
...
@@ -155,8 +155,8 @@ set(VOIP_SOURCE_FILES_C
voip/qosanalyzer.c
voip/qosanalyzer.h
voip/qualityindicator.c
otherfilters/rfc4103_source.c
pp
otherfilters/rfc4103_sink.c
pp
otherfilters/rfc4103_source.c
otherfilters/rfc4103_sink.c
voip/rfc4103_textstream.c
voip/ringstream.c
voip/stun.c
...
...
src/Makefile.am
View file @
095dcbe5
...
...
@@ -94,8 +94,8 @@ libmediastreamer_voip_la_SOURCES+= voip/private.h \
voip/audiostream.c
\
voip/ringstream.c
\
voip/rfc4103_textstream.c
\
otherfilters/rfc4103_source.c
pp
\
otherfilters/rfc4103_sink.c
pp
\
otherfilters/rfc4103_source.c
\
otherfilters/rfc4103_sink.c
\
voip/msmediaplayer.c
\
voip/ice.c
\
otherfilters/msrtp.c
\
...
...
src/otherfilters/rfc4103_sink.c
pp
→
src/otherfilters/rfc4103_sink.c
View file @
095dcbe5
/*
* rfc4103_sink.c
pp
- Real time text RFC 4103 sender.
* rfc4103_sink.c - Real time text RFC 4103 sender.
*
* Copyright (C) 2015 Belledonne Communications, Grenoble, France
*
...
...
src/otherfilters/rfc4103_source.c
pp
→
src/otherfilters/rfc4103_source.c
View file @
095dcbe5
/*
* rfc4103_source.c
pp
- Real time text RFC 4103 sender.
* rfc4103_source.c - Real time text RFC 4103 sender.
*
* Copyright (C) 2015 Belledonne Communications, Grenoble, France
*
...
...
@@ -108,7 +108,7 @@ static mblk_t *realtime_text_stream_generate_red_packet(RealTimeTextSourceData *
return
packet
;
}
static
void
text_stream
_putchar32
(
RealTimeTextSourceData
*
stream
,
uint32_t
ic
)
{
static
void
ms_rtt_4103_source
_putchar32
(
RealTimeTextSourceData
*
stream
,
uint32_t
ic
)
{
int
i
=
stream
->
pribuf
;
uint8_t
*
c
=
&
stream
->
buf
[
i
][
stream
->
bufsize
[
i
]];
if
(
ic
<
0x80
)
{
...
...
@@ -169,7 +169,7 @@ static mblk_t* send_data(RealTimeTextSourceData *stream, uint32_t timestamp) {
}
}
else
{
if
(
timestamp
<
prevtime
||
(
timestamp
-
prevtime
)
>
TS_KEEP_ALIVE_INTERVAL
)
{
text_stream
_putchar32
(
stream
,
0xFEFF
);
/* BOM */
ms_rtt_4103_source
_putchar32
(
stream
,
0xFEFF
);
/* BOM */
ms_debug
(
"Sending BOM"
);
return
send_data
(
stream
,
timestamp
);
}
...
...
@@ -192,9 +192,10 @@ static void ms_rtt_4103_source_preprocess(MSFilter *f) {
static
void
ms_rtt_4103_source_process
(
MSFilter
*
f
)
{
RealTimeTextSourceData
*
s
=
(
RealTimeTextSourceData
*
)
f
->
data
;
uint32_t
timestamp
=
f
->
ticker
->
time
;
mblk_t
*
m
;
ms_filter_lock
(
f
);
mblk_t
*
m
=
send_data
(
s
,
timestamp
);
m
=
send_data
(
s
,
timestamp
);
if
(
m
)
{
ms_queue_put
(
f
->
outputs
[
0
],
m
);
}
...
...
@@ -236,7 +237,7 @@ static int ms_rtt_4103_source_put_char32(MSFilter *f, void *character) {
uint32_t
char_to_send
=
*
(
uint32_t
*
)
character
;
ms_filter_lock
(
f
);
text_stream
_putchar32
(
s
,
char_to_send
);
ms_rtt_4103_source
_putchar32
(
s
,
char_to_send
);
ms_debug
(
"Sending char 32: %lu"
,
(
long
unsigned
)
char_to_send
);
ms_filter_unlock
(
f
);
...
...
@@ -266,4 +267,5 @@ MSFilterDesc ms_rtt_4103_source_desc = {
ms_rtt_4103_source_methods
};
MS_FILTER_DESC_EXPORT
(
ms_rtt_4103_source_desc
)
\ No newline at end of file
MS_FILTER_DESC_EXPORT
(
ms_rtt_4103_source_desc
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment