Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
785d2e62
Commit
785d2e62
authored
Feb 24, 2015
by
Simon Morlat
Browse files
make a beautiful mire
parent
0765d7dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
src/videofilters/mire.c
src/videofilters/mire.c
+5
-5
tools/mediastream.c
tools/mediastream.c
+6
-2
No files found.
src/videofilters/mire.c
View file @
785d2e62
...
...
@@ -59,20 +59,20 @@ static void mire_preprocess(MSFilter *f){
d
->
starttime
=
f
->
ticker
->
time
;
}
static
void
plane_draw
(
uint8_t
*
p
,
int
w
,
int
h
,
int
lsz
,
int
index
){
static
void
plane_draw
(
uint8_t
*
p
,
int
w
,
int
h
,
int
lsz
,
int
index
,
int
color1
,
int
color2
){
int
i
,
j
;
for
(
i
=
0
;
i
<
h
;
++
i
){
for
(
j
=
0
;
j
<
w
;
++
j
){
p
[
j
]
=
((
(
i
/
50
)
*
50
+
(
j
/
50
)
*
50
+
index
)
&
0x1
)
*
200
;
p
[
j
]
=
((
(
(
i
+
index
)
/
80
)
+
((
j
+
index
)
/
80
)
)
&
0x1
)
?
color1
:
color2
;
}
p
+=
lsz
;
}
}
static
void
mire_draw
(
MireData
*
d
){
plane_draw
(
d
->
pict
.
planes
[
0
],
d
->
pict
.
w
,
d
->
pict
.
h
,
d
->
pict
.
strides
[
0
],
d
->
index
*
2
);
plane_draw
(
d
->
pict
.
planes
[
1
],
d
->
pict
.
w
/
2
,
d
->
pict
.
h
/
2
,
d
->
pict
.
strides
[
1
],
d
->
index
);
plane_draw
(
d
->
pict
.
planes
[
2
],
d
->
pict
.
w
/
2
,
d
->
pict
.
h
/
2
,
d
->
pict
.
strides
[
2
],
d
->
index
);
plane_draw
(
d
->
pict
.
planes
[
0
],
d
->
pict
.
w
,
d
->
pict
.
h
,
d
->
pict
.
strides
[
0
],
d
->
index
*
2
,
150
,
12
);
plane_draw
(
d
->
pict
.
planes
[
1
],
d
->
pict
.
w
/
2
,
d
->
pict
.
h
/
2
,
d
->
pict
.
strides
[
1
],
d
->
index
,
100
,
60
);
plane_draw
(
d
->
pict
.
planes
[
2
],
d
->
pict
.
w
/
2
,
d
->
pict
.
h
/
2
,
d
->
pict
.
strides
[
2
],
d
->
index
,
200
,
100
);
}
static
void
mire_process
(
MSFilter
*
f
){
...
...
tools/mediastream.c
View file @
785d2e62
...
...
@@ -77,7 +77,7 @@ extern void libmswebrtc_init();
#define MEDIASTREAM_MAX_ICE_CANDIDATES 3
extern
MSWebCamDesc
mire_desc
;
static
int
cond
=
1
;
...
...
@@ -658,7 +658,7 @@ void setup_media_streams(MediastreamDatas* args) {
ortp_set_log_level_mask
(
ORTP_MESSAGE
|
ORTP_WARNING
|
ORTP_ERROR
|
ORTP_FATAL
);
}
ms_init
();
ms_init
();
#if TARGET_OS_IPHONE || defined(ANDROID)
#if defined (HAVE_X264) && defined (VIDEO_ENABLED)
...
...
@@ -683,6 +683,10 @@ void setup_media_streams(MediastreamDatas* args) {
rtp_profile_set_payload
(
&
av_profile
,
114
,
args
->
custom_pt
);
rtp_profile_set_payload
(
&
av_profile
,
115
,
&
payload_type_lpc1015
);
#ifdef VIDEO_ENABLED
cam
=
ms_web_cam_new
(
&
mire_desc
);
if
(
cam
)
ms_web_cam_manager_add_cam
(
ms_web_cam_manager_get
(),
cam
);
cam
=
NULL
;
rtp_profile_set_payload
(
&
av_profile
,
26
,
&
payload_type_jpeg
);
rtp_profile_set_payload
(
&
av_profile
,
98
,
&
payload_type_h263_1998
);
rtp_profile_set_payload
(
&
av_profile
,
97
,
&
payload_type_theora
);
...
...
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