Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
c91947b5
Commit
c91947b5
authored
Mar 02, 2012
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix windows warnings
parent
ccdfee2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
msticker.c
src/msticker.c
+6
-9
No files found.
src/msticker.c
View file @
c91947b5
...
...
@@ -260,9 +260,6 @@ static void sleepMs(int ms){
static
int
set_high_prio
(
MSTicker
*
obj
){
int
precision
=
2
;
int
result
=
0
;
char
*
env_prio_c
=
NULL
;
int
min_prio
,
max_prio
,
env_prio
;
int
prio
=
obj
->
prio
;
if
(
prio
>
MS_TICKER_PRIO_NORMAL
){
...
...
@@ -285,12 +282,15 @@ static int set_high_prio(MSTicker *obj){
}
if
(
!
SetThreadPriority
(
GetCurrentThread
(),
THREAD_PRIORITY_HIGHEST
)){
ms_warning
(
"SetThreadPriority() failed (%d)
\n
"
,
GetLastError
());
ms_warning
(
"SetThreadPriority() failed (%d)
\n
"
,
(
int
)
GetLastError
());
}
#else
struct
sched_param
param
;
int
policy
=
SCHED_RR
;
memset
(
&
param
,
0
,
sizeof
(
param
));
int
result
=
0
;
char
*
env_prio_c
=
NULL
;
int
min_prio
,
max_prio
,
env_prio
;
if
(
prio
==
MS_TICKER_PRIO_REALTIME
)
policy
=
SCHED_FIFO
;
...
...
@@ -330,13 +330,10 @@ static int set_high_prio(MSTicker *obj){
static
void
unset_high_prio
(
int
precision
){
#ifdef WIN32
MMRESULT
mm
;
if
(
!
SetThreadPriority
(
GetCurrentThread
(),
THREAD_PRIORITY_NORMAL
)){
ms_warning
(
"SetThreadPriority() failed (%d)
\n
"
,
GetLastError
());
ms_warning
(
"SetThreadPriority() failed (%d)
\n
"
,
(
int
)
GetLastError
());
}
mm
=
timeEndPeriod
(
precision
);
timeEndPeriod
(
precision
);
#endif
}
...
...
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