Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
42551ce3
Commit
42551ce3
authored
Jul 17, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: remove unused lock
parent
5e36262a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
74 deletions
+0
-74
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+0
-36
src/audio_output/common.c
src/audio_output/common.c
+0
-38
No files found.
src/audio_output/aout_internal.h
View file @
42551ce3
...
@@ -90,7 +90,6 @@ typedef struct
...
@@ -90,7 +90,6 @@ typedef struct
struct
struct
{
{
vlc_mutex_t
lock
;
float
amp
;
/**< Software volume amplification */
float
amp
;
/**< Software volume amplification */
bool
mute
;
/**< Software mute */
bool
mute
;
/**< Software mute */
struct
audio_mixer
*
mixer
;
/**< Software volume plugin */
struct
audio_mixer
*
mixer
;
/**< Software volume plugin */
...
@@ -200,51 +199,16 @@ void aout_RequestRestart(audio_output_t *);
...
@@ -200,51 +199,16 @@ void aout_RequestRestart(audio_output_t *);
void
aout_Shutdown
(
audio_output_t
*
);
void
aout_Shutdown
(
audio_output_t
*
);
/* Audio output locking */
/* Audio output locking */
#if !defined (NDEBUG) \
&& defined __linux__ && (defined (__i386__) || defined (__x86_64__))
# define AOUT_DEBUG 1
#endif
#ifdef AOUT_DEBUG
enum
{
OUTPUT_LOCK
=
1
,
VOLUME_LOCK
=
2
,
};
void
aout_lock_check
(
unsigned
);
void
aout_unlock_check
(
unsigned
);
#else
# define aout_lock_check( i ) (void)0
# define aout_unlock_check( i ) (void)0
#endif
static
inline
void
aout_lock
(
audio_output_t
*
p_aout
)
static
inline
void
aout_lock
(
audio_output_t
*
p_aout
)
{
{
aout_lock_check
(
OUTPUT_LOCK
);
vlc_mutex_lock
(
&
aout_owner
(
p_aout
)
->
lock
);
vlc_mutex_lock
(
&
aout_owner
(
p_aout
)
->
lock
);
}
}
static
inline
void
aout_unlock
(
audio_output_t
*
p_aout
)
static
inline
void
aout_unlock
(
audio_output_t
*
p_aout
)
{
{
aout_unlock_check
(
OUTPUT_LOCK
);
vlc_mutex_unlock
(
&
aout_owner
(
p_aout
)
->
lock
);
vlc_mutex_unlock
(
&
aout_owner
(
p_aout
)
->
lock
);
}
}
static
inline
void
aout_lock_volume
(
audio_output_t
*
p_aout
)
{
aout_lock_check
(
VOLUME_LOCK
);
vlc_mutex_lock
(
&
aout_owner
(
p_aout
)
->
volume
.
lock
);
}
static
inline
void
aout_unlock_volume
(
audio_output_t
*
p_aout
)
{
aout_unlock_check
(
VOLUME_LOCK
);
vlc_mutex_unlock
(
&
aout_owner
(
p_aout
)
->
volume
.
lock
);
}
#define aout_assert_locked( aout ) \
#define aout_assert_locked( aout ) \
vlc_assert_locked( &aout_owner(aout)->lock )
vlc_assert_locked( &aout_owner(aout)->lock )
...
...
src/audio_output/common.c
View file @
42551ce3
...
@@ -61,7 +61,6 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
...
@@ -61,7 +61,6 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
vlc_mutex_init
(
&
owner
->
lock
);
vlc_mutex_init
(
&
owner
->
lock
);
owner
->
module
=
NULL
;
owner
->
module
=
NULL
;
owner
->
input
=
NULL
;
owner
->
input
=
NULL
;
vlc_mutex_init
(
&
owner
->
volume
.
lock
);
owner
->
volume
.
amp
=
1
.
f
;
owner
->
volume
.
amp
=
1
.
f
;
owner
->
volume
.
mute
=
false
;
owner
->
volume
.
mute
=
false
;
owner
->
volume
.
mixer
=
NULL
;
owner
->
volume
.
mixer
=
NULL
;
...
@@ -196,46 +195,9 @@ static void aout_Destructor (vlc_object_t *obj)
...
@@ -196,46 +195,9 @@ static void aout_Destructor (vlc_object_t *obj)
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
aout_owner_t
*
owner
=
aout_owner
(
aout
);
aout_owner_t
*
owner
=
aout_owner
(
aout
);
vlc_mutex_destroy
(
&
owner
->
volume
.
lock
);
vlc_mutex_destroy
(
&
owner
->
lock
);
vlc_mutex_destroy
(
&
owner
->
lock
);
}
}
#ifdef AOUT_DEBUG
/* Lock debugging */
static
__thread
unsigned
aout_locks
=
0
;
void
aout_lock_check
(
unsigned
i
)
{
unsigned
allowed
;
switch
(
i
)
{
case
VOLUME_LOCK
:
allowed
=
0
;
break
;
case
OUTPUT_LOCK
:
allowed
=
VOLUME_LOCK
;
break
;
default:
abort
();
}
if
(
aout_locks
&
~
allowed
)
{
fprintf
(
stderr
,
"Illegal audio lock transition (%x -> %x)
\n
"
,
aout_locks
,
aout_locks
|
i
);
vlc_backtrace
();
abort
();
}
aout_locks
|=
i
;
}
void
aout_unlock_check
(
unsigned
i
)
{
assert
(
aout_locks
&
i
);
aout_locks
&=
~
i
;
}
#endif
/*
/*
* Formats management (internal and external)
* Formats management (internal and external)
*/
*/
...
...
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