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
fa8cbea1
Commit
fa8cbea1
authored
Jan 25, 2011
by
Simon Morlat
Browse files
merge patch from Aurelien (ms2 little improvements)
parent
a4f5a5bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
src/mscommon.c
src/mscommon.c
+20
-0
src/msticker.c
src/msticker.c
+2
-1
src/msv4l2.c
src/msv4l2.c
+7
-3
src/speexec.c
src/speexec.c
+1
-1
No files found.
src/mscommon.c
View file @
fa8cbea1
...
...
@@ -59,6 +59,10 @@ extern void libmsandroiddisplay_init(void);
#include <android/log.h>
#endif
#if defined(WIN32) && !defined(_WIN32_WCE)
static
MSList
*
ms_plugins_loaded_list
;
#endif
MSList
*
ms_list_new
(
void
*
data
){
MSList
*
new_elem
=
(
MSList
*
)
ms_new
(
MSList
,
1
);
new_elem
->
prev
=
new_elem
->
next
=
NULL
;
...
...
@@ -317,6 +321,8 @@ int ms_load_plugins(const char *dir){
if
(
initroutine
!=
NULL
){
initroutine
();
ms_message
(
"Plugin loaded (%s)"
,
szPluginFile
);
// Add this new loaded plugin to the list (useful for FreeLibrary at the end)
ms_plugins_loaded_list
=
ms_list_append
(
ms_plugins_loaded_list
,
os_handle
);
num
++
;
}
else
{
ms_warning
(
"Could not locate init routine of plugin %s. Should be %s"
,
...
...
@@ -400,6 +406,19 @@ int ms_load_plugins(const char *dir){
return
num
;
}
void
ms_unload_plugins
(){
#if defined(WIN32) && !defined(_WIN32_WCE)
MSList
*
elem
;
for
(
elem
=
ms_plugins_loaded_list
;
elem
!=
NULL
;
elem
=
elem
->
next
)
{
HINSTANCE
handle
=
(
HINSTANCE
)
elem
->
data
;
FreeLibrary
(
handle
)
;
}
ms_list_free
(
ms_plugins_loaded_list
);
#endif
}
#ifdef __ALSA_ENABLED__
extern
MSSndCardDesc
alsa_card_desc
;
...
...
@@ -617,6 +636,7 @@ void ms_exit(){
#ifdef VIDEO_ENABLED
ms_web_cam_manager_destroy
();
#endif
ms_unload_plugins
();
}
void
ms_sleep
(
int
seconds
){
...
...
src/msticker.c
View file @
fa8cbea1
...
...
@@ -59,7 +59,8 @@ void ms_ticker_stop(MSTicker *s){
ms_mutex_lock
(
&
s
->
lock
);
s
->
run
=
FALSE
;
ms_mutex_unlock
(
&
s
->
lock
);
ms_thread_join
(
s
->
thread
,
NULL
);
if
(
s
->
thread
)
ms_thread_join
(
s
->
thread
,
NULL
);
}
void
ms_ticker_set_name
(
MSTicker
*
s
,
const
char
*
name
){
...
...
src/msv4l2.c
View file @
fa8cbea1
...
...
@@ -490,10 +490,14 @@ static void msv4l2_postprocess(MSFilter *f){
V4l2State
*
s
=
(
V4l2State
*
)
f
->
data
;
s
->
thread_run
=
FALSE
;
if
(
ms_thread_join
(
s
->
thread
,
NULL
))
ms_warning
(
"msv4l2 thread was already stopped"
);
else
if
(
s
->
thread
)
{
ms_thread_join
(
s
->
thread
,
NULL
);
ms_message
(
"msv4l2 thread has joined."
);
}
else
{
ms_warning
(
"msv4l2 thread was already stopped"
);
}
flushq
(
&
s
->
rq
,
0
);
}
...
...
src/speexec.c
View file @
fa8cbea1
...
...
@@ -143,7 +143,7 @@ static void speex_ec_process(MSFilter *f){
while
((
refm
=
ms_queue_get
(
f
->
inputs
[
1
]))
!=
NULL
){
ms_queue_put
(
f
->
outputs
[
1
],
refm
);
}
return
;
return
;
}
if
(
f
->
inputs
[
1
]
!=
NULL
){
...
...
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