Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ededd634
Commit
ededd634
authored
Mar 29, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics (dmo).
parent
2a9a44ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+24
-23
No files found.
modules/codec/dmo/dmo.c
View file @
ededd634
...
...
@@ -138,9 +138,9 @@ struct decoder_sys_t
vlc_thread_t
thread
;
vlc_mutex_t
lock
;
vlc_cond_t
wait_input
,
wait_output
;
bool
ready
,
works
;
block_t
**
input
;
void
*
output
;
bool
b_ready
,
b_
works
;
block_t
**
pp_
input
;
void
*
p_
output
;
};
const
GUID
IID_IWMCodecPrivateData
=
{
0x73f0be8e
,
0x57f7
,
0x4f01
,
{
0xaa
,
0x66
,
0x9f
,
0x57
,
0x34
,
0xc
,
0xfe
,
0xe
}};
...
...
@@ -294,18 +294,19 @@ found:
vlc_mutex_init
(
&
p_sys
->
lock
);
vlc_cond_init
(
&
p_sys
->
wait_input
);
vlc_cond_init
(
&
p_sys
->
wait_output
);
p_sys
->
works
=
p_sys
->
ready
=
false
;
p_sys
->
b_works
=
p_sys
->
b_ready
=
false
;
if
(
vlc_clone
(
&
p_sys
->
thread
,
DecoderThread
,
p_dec
,
VLC_THREAD_PRIORITY_INPUT
)
)
goto
error
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
while
(
!
p_sys
->
ready
)
while
(
!
p_sys
->
b_
ready
)
vlc_cond_wait
(
&
p_sys
->
wait_output
,
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
if
(
p_sys
->
works
)
if
(
p_sys
->
b_
works
)
return
VLC_SUCCESS
;
vlc_join
(
p_sys
->
thread
,
NULL
);
...
...
@@ -326,7 +327,7 @@ static void DecoderClose( vlc_object_t *p_this )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
ready
=
false
;
p_sys
->
b_
ready
=
false
;
vlc_cond_signal
(
&
p_sys
->
wait_input
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
...
@@ -340,18 +341,18 @@ static void DecoderClose( vlc_object_t *p_this )
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
void
*
ret
;
void
*
p_
ret
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
input
=
pp_block
;
p_sys
->
pp_
input
=
pp_block
;
vlc_cond_signal
(
&
p_sys
->
wait_input
);
while
(
!
(
ret
=
p_sys
->
output
)
)
while
(
!
(
p_ret
=
p_sys
->
p_
output
)
)
vlc_cond_wait
(
&
p_sys
->
wait_output
,
&
p_sys
->
lock
);
p_sys
->
output
=
NULL
;
p_sys
->
p_
output
=
NULL
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
ret
;
return
p_
ret
;
}
/*****************************************************************************
...
...
@@ -614,7 +615,8 @@ static int DecOpen( decoder_t *p_dec )
free
(
p_wf
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
ready
=
p_sys
->
works
=
true
;
p_sys
->
b_ready
=
p_sys
->
b_works
=
true
;
vlc_cond_signal
(
&
p_sys
->
wait_output
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
...
@@ -636,7 +638,7 @@ static int DecOpen( decoder_t *p_dec )
free
(
p_wf
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
ready
=
true
;
p_sys
->
b_
ready
=
true
;
vlc_cond_signal
(
&
p_sys
->
wait_output
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
VLC_EGENERIC
;
...
...
@@ -833,7 +835,7 @@ static void DecClose( decoder_t *p_dec )
/****************************************************************************
* DecodeBlock: the whole thing
****************************************************************************
* This function must be fed with
ogg
packets.
* This function must be fed with packets.
****************************************************************************/
static
void
*
DecBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
...
...
@@ -903,13 +905,13 @@ static void *DecBlock( decoder_t *p_dec, block_t **pp_block )
else
{
//msg_Dbg( p_dec, "ProcessInput(): successful" );
*
pp_block
=
0
;
*
pp_block
=
NULL
;
}
}
else
if
(
p_block
&&
!
p_block
->
i_buffer
)
{
block_Release
(
p_block
);
*
pp_block
=
0
;
*
pp_block
=
NULL
;
}
/* Get output from the DMO */
...
...
@@ -1030,13 +1032,13 @@ static void *DecoderThread( void *data )
vlc_mutex_lock
(
&
p_sys
->
lock
);
for
(
;;
)
{
while
(
p_sys
->
ready
&&
!
p_sys
->
input
)
while
(
p_sys
->
b_ready
&&
!
p_sys
->
pp_
input
)
vlc_cond_wait
(
&
p_sys
->
wait_input
,
&
p_sys
->
lock
);
if
(
!
p_sys
->
ready
)
if
(
!
p_sys
->
b_
ready
)
break
;
p_sys
->
output
=
DecBlock
(
p_dec
,
p_sys
->
input
);
p_sys
->
input
=
NULL
;
p_sys
->
p_output
=
DecBlock
(
p_dec
,
p_sys
->
pp_
input
);
p_sys
->
pp_
input
=
NULL
;
}
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
...
@@ -1409,8 +1411,7 @@ static int EncOpen( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_enc
->
p_sys
=
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
if
(
(
p_enc
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
))
)
==
NULL
)
{
goto
error
;
}
...
...
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