Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
c2e97975
Commit
c2e97975
authored
Jun 14, 2000
by
Sam Hocevar
Browse files
. disparition de la plupart des printf
. moins de warnings dans la YUV MMX
parent
9206b014
Changes
17
Hide whitespace changes
Inline
Side-by-side
include/video_fifo.h
View file @
c2e97975
...
...
@@ -144,11 +144,11 @@ static __inline__ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo,
p_mb
->
p_picture
->
i_deccount
--
;
b_finished
=
(
p_mb
->
p_picture
->
i_deccount
==
1
);
vlc_mutex_unlock
(
&
p_mb
->
p_picture
->
lock_deccount
);
//
fpr
intf
(stderr,
"%d ", p_mb->p_picture->i_deccount);
//intf
_DbgMsg(
"%d ", p_mb->p_picture->i_deccount
);
/* Test if it was the last block of the picture */
if
(
b_finished
)
{
//
fpr
intf
(stderr,
"Image decodee\n");
//intf
_DbgMsg(
"Image decodee\n"
);
/* Mark the picture to be displayed */
vout_DisplayPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_picture
);
...
...
@@ -204,7 +204,7 @@ static __inline__ void vpar_DestroyMacroblock( video_fifo_t * p_fifo,
/* Test if it was the last block of the picture */
if
(
b_finished
)
{
fprintf
(
stderr
,
"Image trashee
\n
"
);
intf_DbgMsg
(
"Image trashee
\n
"
);
/* Mark the picture to be trashed */
vout_DestroyPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_picture
);
...
...
src/ac3_decoder/ac3_decoder_thread.c
View file @
c2e97975
...
...
@@ -218,7 +218,7 @@ static void RunThread (ac3dec_thread_t * p_ac3dec)
int
ptr
;
ac3_byte_stream_t
*
p_byte_stream
;
pr
intf
(
"
sync
\n
"
);
intf
_Msg
(
"ac3dec:
sync
\n
"
);
p_byte_stream
=
ac3_byte_stream
(
&
p_ac3dec
->
ac3_decoder
);
...
...
src/ac3_decoder/ac3_downmix.c
View file @
c2e97975
...
...
@@ -52,7 +52,7 @@ void downmix (ac3dec_t * p_ac3dec, s16 * out_buf)
/*
if (p_ac3dec->bsi.acmod > 7)
dpr
intf
("
(downmix) invalid acmod number\n");
intf
_ErrMsg( "ac3dec:
(downmix) invalid acmod number\n"
);
*/
/* There are two main cases, with or without Dolby Surround */
...
...
src/ac3_decoder/ac3_exponent.c
View file @
c2e97975
...
...
@@ -82,7 +82,7 @@ static __inline__ int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type,
case
EXP_D15
:
/* 1 */
for
(
i
=
0
;
i
<
ngrps
;
i
++
)
{
if
(
exps
[
i
]
>
124
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid exponent
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid exponent
\n
"
);
return
1
;
}
exp_acc
+=
(
exps_1
[
exps
[
i
]]
/*- 2*/
);
...
...
@@ -97,7 +97,7 @@ static __inline__ int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type,
case
EXP_D25
:
/* 2 */
for
(
i
=
0
;
i
<
ngrps
;
i
++
)
{
if
(
exps
[
i
]
>
124
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid exponent
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid exponent
\n
"
);
return
1
;
}
exp_acc
+=
(
exps_1
[
exps
[
i
]]
/*- 2*/
);
...
...
@@ -115,7 +115,7 @@ static __inline__ int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type,
case
EXP_D45
:
/* 3 */
for
(
i
=
0
;
i
<
ngrps
;
i
++
)
{
if
(
exps
[
i
]
>
124
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid exponent
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid exponent
\n
"
);
return
1
;
}
exp_acc
+=
(
exps_1
[
exps
[
i
]]
/*- 2*/
);
...
...
src/ac3_decoder/ac3_mantissa.c
View file @
c2e97975
...
...
@@ -199,7 +199,7 @@ static __inline__ float float_get (ac3dec_t * p_ac3dec, u16 bap, u16 exp)
group_code
=
p_ac3dec
->
bit_stream
.
buffer
>>
(
32
-
5
);
DumpBits
(
&
(
p_ac3dec
->
bit_stream
),
5
);
if
(
group_code
>=
27
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid mantissa
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid mantissa
\n
"
);
}
q_1
[
1
]
=
q_1_1
[
group_code
];
...
...
@@ -218,7 +218,7 @@ static __inline__ float float_get (ac3dec_t * p_ac3dec, u16 bap, u16 exp)
DumpBits
(
&
(
p_ac3dec
->
bit_stream
),
7
);
if
(
group_code
>=
125
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid mantissa
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid mantissa
\n
"
);
}
q_2
[
1
]
=
q_2_1
[
group_code
];
...
...
@@ -234,7 +234,7 @@ static __inline__ float float_get (ac3dec_t * p_ac3dec, u16 bap, u16 exp)
DumpBits
(
&
(
p_ac3dec
->
bit_stream
),
3
);
if
(
group_code
>=
7
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid mantissa
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid mantissa
\n
"
);
}
return
(
q_3
[
group_code
]
*
exp_lut
[
exp
]);
...
...
@@ -248,7 +248,7 @@ static __inline__ float float_get (ac3dec_t * p_ac3dec, u16 bap, u16 exp)
DumpBits
(
&
(
p_ac3dec
->
bit_stream
),
7
);
if
(
group_code
>=
121
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid mantissa
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid mantissa
\n
"
);
}
q_4
[
0
]
=
q_4_1
[
group_code
];
...
...
@@ -263,7 +263,7 @@ static __inline__ float float_get (ac3dec_t * p_ac3dec, u16 bap, u16 exp)
DumpBits
(
&
(
p_ac3dec
->
bit_stream
),
4
);
if
(
group_code
>=
15
)
{
fpr
intf
(
stderr
,
"ac3dec
debug
: invalid mantissa
\n
"
);
intf
_ErrMsg
(
"ac3dec
error
: invalid mantissa
\n
"
);
}
return
(
q_5
[
group_code
]
*
exp_lut
[
exp
]);
...
...
src/audio_decoder/audio_decoder.c
View file @
c2e97975
...
...
@@ -1362,8 +1362,8 @@ int adec_decode_frame (audiodec_t * p_adec, s16 * buffer)
/* XXX rewrite the byte counting system to reduce overhead */
#if 0
pr
intf ("skip %d\n",
p_adec->frame_size - p_adec->bit_stream.total_bytes_read);
intf
_DbgMsg
(
"skip %d\n",
p_adec->frame_size - p_adec->bit_stream.total_bytes_read
);
#endif
if
(
p_adec
->
bit_stream
.
total_bytes_read
>
p_adec
->
frame_size
)
...
...
src/audio_decoder/audio_decoder_thread.c
View file @
c2e97975
...
...
@@ -238,7 +238,7 @@ static void RunThread (adec_thread_t * p_adec)
/* have to find a synchro point */
adec_byte_stream_t
*
p_byte_stream
;
pr
intf
(
"
sync
\n
"
);
intf
_Msg
(
"adec:
sync
\n
"
);
p_adec
->
align
=
0
;
p_byte_stream
=
adec_byte_stream
(
&
p_adec
->
audio_decoder
);
...
...
src/audio_decoder/audio_test.c
View file @
c2e97975
...
...
@@ -70,7 +70,7 @@ int main (void)
#if 1
for
(
i
=
0
;
i
<
(
2
*
1152
);
i
++
)
pr
intf
(
"%04X
\n
"
,(
u16
)
buffer
[
i
]);
intf
_DbgMsg
(
"%04X
\n
"
,(
u16
)
buffer
[
i
]
);
#endif
}
...
...
src/audio_output/audio_output.c
View file @
c2e97975
...
...
@@ -545,7 +545,7 @@ static __inline__ int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo, m
l_units
=
((
p_fifo
->
l_next_frame
-
p_fifo
->
l_start_frame
)
&
AOUT_FIFO_SIZE
)
*
(
p_fifo
->
l_frame_size
>>
(
p_fifo
->
b_stereo
));
l_rate
=
p_fifo
->
l_rate
+
((
aout_date
-
p_fifo
->
date
[
p_fifo
->
l_start_frame
])
/
256
);
//
fpr
intf
( stderr,
"aout debug: %lli (%li);\n", aout_date - p_fifo->date[p_fifo->l_start_frame], l_rate );
// intf
_DbgMsg(
"aout debug: %lli (%li);\n", aout_date - p_fifo->date[p_fifo->l_start_frame], l_rate );
InitializeIncrement
(
&
p_fifo
->
unit_increment
,
l_rate
,
p_aout
->
l_rate
);
...
...
@@ -753,7 +753,7 @@ void aout_Thread_U8_Mono( aout_thread_t * p_aout )
if
(
p_aout
->
fifo
[
i_fifo
].
l_units
>
l_units
)
{
l_buffer_limit
=
p_aout
->
l_units
/*<< 1*/
;
/* p_aout->b_stereo == 1 */
//
fpr
intf
(stderr,
"l_buffer_limit:%d\n",l_buffer_limit);
//intf
_DbgMsg(
"l_buffer_limit:%d\n",l_buffer_limit
);
while
(
l_buffer
<
l_buffer_limit
)
{
#if SOUND
...
...
@@ -764,20 +764,20 @@ void aout_Thread_U8_Mono( aout_thread_t * p_aout )
(
s32
)(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
+
1
]
);
/*
//
fpr
intf
(stderr,
"1deb ");
//intf
_DbgMsg(
"1deb "
);
l_buffer++;
p_aout->s32_buffer[l_buffer] += (s32)( ((s16 *)p_aout->fifo[i_fifo].buffer)[COEFF*p_aout->fifo[i_fifo].l_unit] ) / 2;
p_aout->s32_buffer[l_buffer] += (s32)( ((s16 *)p_aout->fifo[i_fifo].buffer)[COEFF*p_aout->fifo[i_fifo].l_unit+1] ) / 2;
l_buffer++;
//
fpr
intf
(stderr,
"1fin
");
//intf
_DbgMsg(
"1fin"
);
*/
#endif
#if DEBUG
//
fpr
intf
(stderr,
"p_aout->s32_buffer[l_buffer] 11 : %x (%d)",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]);
fpr
intf
(
stderr
,
"p_aout->fifo %ld
\n
"
,
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
);
fpr
intf
(
stderr
,
"%d - p_aout->s32b %ld
\n
"
,
l_buffer
,
(
s32
)
(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
]
)
);
//
fpr
intf
(stderr,
"p_aout->s32_buffer[l_buffer] 12 : %x (%d)\n",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]);
//intf
_DbgMsg(
"p_aout->s32_buffer[l_buffer] 11 : %x (%d)",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]
);
intf
_DbgMsg
(
"p_aout->fifo %ld
\n
"
,
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
);
intf
_DbgMsg
(
"%d - p_aout->s32b %ld
\n
"
,
l_buffer
,
(
s32
)
(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
]
)
);
//intf
_DbgMsg(
"p_aout->s32_buffer[l_buffer] 12 : %x (%d)\n",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]
);
#endif
UPDATE_INCREMENT
(
p_aout
->
fifo
[
i_fifo
].
unit_increment
,
p_aout
->
fifo
[
i_fifo
].
l_unit
)
...
...
@@ -795,7 +795,7 @@ fprintf(stderr,"%d - p_aout->s32b %ld\n", l_buffer, (s32) ( ((s16 *)p_aout->fifo
{
//#if 0
l_buffer_limit
=
l_buffer
+
(
p_aout
->
fifo
[
i_fifo
].
l_units
/*<< 1*/
);
//
fpr
intf
(stderr,
"l_buffer_limit:%d\n",l_buffer_limit);
//intf
_DbgMsg(
"l_buffer_limit:%d\n",l_buffer_limit
);
/* p_aout->b_stereo == 1 */
while
(
l_buffer
<
l_buffer_limit
)
{
...
...
@@ -807,87 +807,87 @@ fprintf(stderr,"%d - p_aout->s32b %ld\n", l_buffer, (s32) ( ((s16 *)p_aout->fifo
(
s32
)(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
+
1
]
);
/*
//
fpr
intf
(stderr,
"2deb ");
//intf
_DbgMsg(
"2deb "
);
l_buffer++;
//
fpr
intf
(stderr,
"793 ");
//intf
_DbgMsg(
"793 ");
// !!!!!! Seg Fault !!!!!!!
//
fpr
intf
(stderr,
"\n p->aout_buffer : %d\t%d\n",p_aout->s32_buffer[l_buffer],COEFF*p_aout->fifo[i_fifo].l_unit);
//intf
_DbgMsg(
"\n p->aout_buffer : %d\t%d\n",p_aout->s32_buffer[l_buffer],COEFF*p_aout->fifo[i_fifo].l_unit
);
if( COEFF*p_aout->fifo[i_fifo].l_unit < 60000 )
{
p_aout->s32_buffer[l_buffer] += (s32)( ((s16 *)p_aout->fifo[i_fifo].buffer)[COEFF*p_aout->fifo[i_fifo].l_unit] ) / 2;
//
fpr
intf
(stderr,
"795 ");
// intf
_DbgMsg(
"795 ");
p_aout->s32_buffer[l_buffer] += (s32)( ((s16 *)p_aout->fifo[i_fifo].buffer)[COEFF*p_aout->fifo[i_fifo].l_unit+1] ) / 2;
//
fpr
intf
(stderr,
"797 ");
//intf
_DbgMsg(
"797 ");
l_buffer++;
}
//
fpr
intf
(stderr,
"2fin ");
//intf
_DbgMsg(
"2fin "
);
*/
#endif
#if DEBUG
//
fpr
intf
(stderr,
"p_aout->s32_buffer[l_buffer] 21 : %x (%d)",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]);
fpr
intf
(
stderr
,
"p_aout->fifo %ld
\n
"
,
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
);
fpr
intf
(
stderr
,
"%d - p_aout->s32b %ld
\n
"
,
l_buffer
,
(
s32
)
(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
]
)
);
//
fpr
intf
(stderr,
"p_aout->s32_buffer[l_buffer] 22 : %x (%d)\n",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]);
//intf
_DbgMsg(
"p_aout->s32_buffer[l_buffer] 21 : %x (%d)",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]
);
intf
_DbgMsg
(
"p_aout->fifo %ld
\n
"
,
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
);
intf
_DbgMsg
(
"%d - p_aout->s32b %ld
\n
"
,
l_buffer
,
(
s32
)
(
((
s16
*
)
p_aout
->
fifo
[
i_fifo
].
buffer
)[
COEFF
*
p_aout
->
fifo
[
i_fifo
].
l_unit
]
)
);
//intf
_DbgMsg(
"p_aout->s32_buffer[l_buffer] 22 : %x (%d)\n",p_aout->s32_buffer[l_buffer-1],p_aout->s32_buffer[l_buffer-1]
);
#endif
UPDATE_INCREMENT
(
p_aout
->
fifo
[
i_fifo
].
unit_increment
,
p_aout
->
fifo
[
i_fifo
].
l_unit
)
//
fpr
intf
(stderr,
"807 ");
//intf
_DbgMsg(
"807 ");
if
(
p_aout
->
fifo
[
i_fifo
].
l_unit
>=
/* p_aout->fifo[i_fifo].b_stereo == 1 */
((
AOUT_FIFO_SIZE
+
1
)
*
(
p_aout
->
fifo
[
i_fifo
].
l_frame_size
>>
2
/*1*/
))
)
{
//
fpr
intf
(stderr,
"811 ");
//intf
_DbgMsg(
"811 ");
p_aout
->
fifo
[
i_fifo
].
l_unit
-=
/* p_aout->fifo[i_fifo].b_stereo == 1 */
((
AOUT_FIFO_SIZE
+
1
)
*
(
p_aout
->
fifo
[
i_fifo
].
l_frame_size
>>
2
/*1*/
));
}
}
//
fpr
intf
(stderr,
"816 ");
//intf
_DbgMsg(
"816 ");
l_units
-=
p_aout
->
fifo
[
i_fifo
].
l_units
;
//
fpr
intf
(stderr,
"818 ");
//intf
_DbgMsg(
"818 ");
vlc_mutex_lock
(
&
p_aout
->
fifo
[
i_fifo
].
data_lock
);
//
fpr
intf
(stderr,
"820 ");
//intf
_DbgMsg(
"820 ");
p_aout
->
fifo
[
i_fifo
].
l_start_frame
=
p_aout
->
fifo
[
i_fifo
].
l_next_frame
;
//
fpr
intf
(stderr,
"822 ");
//intf
_DbgMsg(
"822 ");
vlc_cond_signal
(
&
p_aout
->
fifo
[
i_fifo
].
data_wait
);
//
fpr
intf
(stderr,
"824 ");
//intf
_DbgMsg(
"824 ");
vlc_mutex_unlock
(
&
p_aout
->
fifo
[
i_fifo
].
data_lock
);
//
fpr
intf
(stderr,
"826 ");
//intf
_DbgMsg(
"826 ");
/* p_aout->fifo[i_fifo].b_start_frame = 1; */
p_aout
->
fifo
[
i_fifo
].
l_next_frame
+=
1
;
//
fpr
intf
(stderr,
"829 ");
//intf
_DbgMsg(
"829 ");
p_aout
->
fifo
[
i_fifo
].
l_next_frame
&=
AOUT_FIFO_SIZE
;
//
fpr
intf
(stderr,
"831 ");
//intf
_DbgMsg(
"831 ");
p_aout
->
fifo
[
i_fifo
].
b_next_frame
=
0
;
//#endif
//
fpr
intf
(stderr,
"837 ");
//intf
_DbgMsg(
"837 ");
}
//
fpr
intf
(stderr,
"838 ");
//intf
_DbgMsg(
"838 ");
/* !!!!!!!!!!!!! Seg Fault !!!!!!!!!!!!!!!!! */
}
//
fpr
intf
(stderr,
"839 ");
//intf
_DbgMsg(
"839 ");
break
;
default:
//
fpr
intf
(stderr,
"841 ");
//intf
_DbgMsg(
"841 ");
intf_DbgMsg
(
"aout debug: unknown fifo type (%i)
\n
"
,
p_aout
->
fifo
[
i_fifo
].
i_type
);
//
fpr
intf
(stderr,
"842 ");
//intf
_DbgMsg(
"842 ");
break
;
}
}
//
fpr
intf
(stderr,
"843 ");
//intf
_DbgMsg(
"843 ");
vlc_mutex_unlock
(
&
p_aout
->
fifos_lock
);
//
fpr
intf
(stderr,
"845 ");
//intf
_DbgMsg(
"845 ");
l_buffer_limit
=
p_aout
->
l_units
/*<< 1*/
;
/* p_aout->b_stereo == 1 */
//
fpr
intf
(stderr,
"\nici commence l'envoi
e
sur sb\n");
//intf
_DbgMsg(
"\nici commence l'envoi sur sb\n"
);
for
(
l_buffer
=
0
;
l_buffer
<
l_buffer_limit
;
l_buffer
++
)
{
//
fpr
intf
(stderr,
"3deb ");
//
fpr
intf
(stderr,
"p_aout->s_32_buffer[l_buffer] : %x (%d)\n",p_aout->s32_buffer[l_buffer],p_aout->s32_buffer[l_buffer]);
//intf
_DbgMsg(
"3deb ");
//intf
_DbgMsg(
"p_aout->s_32_buffer[l_buffer] : %x (%d)\n",p_aout->s32_buffer[l_buffer],p_aout->s32_buffer[l_buffer]
);
((
u8
*
)
p_aout
->
buffer
)[
l_buffer
]
=
(
u8
)(
(
p_aout
->
s32_buffer
[
/*2 **/
l_buffer
]
/
256
)
+
128
);
//
fpr
intf
(stderr,
"p_aout->buffer[l_buffer] : %x (%d)\n", ((u8 *)p_aout->buffer)[l_buffer], ((u8 *)p_aout->buffer)[l_buffer] );
//intf
_DbgMsg(
"p_aout->buffer[l_buffer] : %x (%d)\n", ((u8 *)p_aout->buffer)[l_buffer], ((u8 *)p_aout->buffer)[l_buffer] );
p_aout
->
s32_buffer
[
/*2 **/
l_buffer
]
=
0
;
// p_aout->s32_buffer[2 * l_buffer + 1] = 0;
//
fpr
intf
(stderr,
"3fin ");
//intf
_DbgMsg(
"3fin ");
}
l_bytes
=
p_aout
->
p_sys_getbufinfo
(
p_aout
,
l_buffer_limit
);
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)(
l_bytes
/
2
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
/* sizeof(u8) << (p_aout->b_stereo) == 2 */
...
...
src/input/input_ctrl.c
View file @
c2e97975
...
...
@@ -126,7 +126,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
{
case
AC3_AUDIO_ES
:
fpr
intf
(
stderr
,
"Start an AC3 decoder
\n
"
);
intf
_Msg
(
"Start an AC3 decoder
\n
"
);
/* Spawn ac3 thread */
if
(
((
ac3dec_thread_t
*
)(
p_input
->
p_es
[
i_es_loop
].
p_dec
)
=
ac3dec_CreateThread
(
p_input
))
==
NULL
)
...
...
@@ -139,7 +139,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
case
LPCM_AUDIO_ES
:
/* Spawn lpcm thread */
fpr
intf
(
stderr
,
"Start a LPCM decoder
\n
"
);
intf
_Msg
(
"Start a LPCM decoder
\n
"
);
if
(
((
lpcmdec_thread_t
*
)(
p_input
->
p_es
[
i_es_loop
].
p_dec
)
=
lpcmdec_CreateThread
(
p_input
))
==
NULL
)
{
...
...
src/input/input_file.c
View file @
c2e97975
...
...
@@ -180,13 +180,12 @@ static void wait_a_moment( input_file_t * p_if, file_ts_packet *ts)
sendtime
=
p_synchro
->
last_pcr_time
+
p_synchro
->
delta_clock
+
p_synchro
->
slope
*
((
ts
-
p_synchro
->
last_pcr
+
(
BUF_SIZE
+
1
)
*
TS_IN_UDP
)
%
((
BUF_SIZE
+
1
)
*
TS_IN_UDP
));
wait
=
sendtime
-
mdate
();
//fprintf(stderr,"last PCR Time : %Ld\n", p_synchro->last_pcr_time );
if
(
wait
>
0
)
{
retard_count
=
0
;
if
(
wait
>
100000
)
{
fpr
intf
(
stderr
,
"W
arning
: wait time may be too long : %Ld
\n
"
,
wait
);
intf
_DbgMsg
(
"input w
arning: wait time may be too long : %Ld
\n
"
,
wait
);
return
;
}
msleep
(
wait
);
...
...
@@ -201,8 +200,6 @@ static void wait_a_moment( input_file_t * p_if, file_ts_packet *ts)
if
(
retard_count
==
16
)
{
retard_count
=
0
;
//fprintf( stderr, "delay : %Ldms, max delay : %Ldms\n", -wait/1000, -wait_max/1000 );
fflush
(
stdout
);
}
}
}
...
...
@@ -245,15 +242,13 @@ static void adjust( input_file_t * p_if, file_ts_packet *ts )
if
(
(
next_pcr_time
-
current_pcr_time
<
0
)
||
(
next_pcr_time
-
current_pcr_time
>
700000
))
{
fpr
intf
(
stderr
,
"W
arning: possible discontinuity
\n
"
);
intf
_DbgMsg
(
"input w
arning: possible discontinuity
\n
"
);
p_synchro
->
delta_clock
=
mdate
()
-
next_pcr_time
;
}
else
{
//fprintf(stderr,"next - current : %Ld\n", next_pcr_time - current_pcr_time);
p_synchro
->
slope
=
(
next_pcr_time
-
current_pcr_time
)
/
((
next_pcr
-
ts
+
(
BUF_SIZE
+
1
)
*
TS_IN_UDP
)
%
((
BUF_SIZE
+
1
)
*
TS_IN_UDP
));
//fprintf(stderr,"slope : %Ld\n", p_synchro->slope);
}
}
...
...
@@ -353,7 +348,7 @@ int get_pid (ps_t *p_ps)
p_ps
->
association_table
[
i
]
=
tofind
;
p_ps
->
media_counter
[
i
]
=
0
;
fpr
intf
(
stderr
,
"
allocated new PID 0x%.2x to stream ID 0x%.2x
\n
"
,
i
,
tofind
);
intf
_Msg
(
"input:
allocated new PID 0x%.2x to stream ID 0x%.2x
\n
"
,
i
,
tofind
);
return
(
i
);
}
...
...
@@ -373,7 +368,6 @@ void write_media_ts(ps_t *ps, unsigned char *ts, unsigned int pid)
{
if
(
ps
->
pes_size
<
184
)
{
//fprintf(stderr,"[WARNING: small PES]\n");
ts
[
0
]
=
0x47
;
/* sync_byte */
ts
[
1
]
=
0x40
;
/* payload_unit_start_indicator si dbut de PES */
ts
[
2
]
=
pid
;
...
...
@@ -388,7 +382,6 @@ void write_media_ts(ps_t *ps, unsigned char *ts, unsigned int pid)
ps
->
pes_type
=
NO_PES
;
ps
->
ps_data
+=
ps
->
pes_size
;
ps
->
offset
+=
ps
->
pes_size
;
//fprintf( stderr, "wrote %i final data (size was 0x%.2x)\n", ps->offset, ps->pes_size);
return
;
}
...
...
@@ -400,8 +393,6 @@ void write_media_ts(ps_t *ps, unsigned char *ts, unsigned int pid)
ts
[
1
]
=
(
ps
->
offset
==
0
)
?
0x40
:
0x00
;
/* payload_unit_start_indicator si dbut de PES */
ts
[
2
]
=
pid
;
//fprintf( stderr, "checking clock for %.2x while we have %.2x\n", ps->pcr_pid, pid );
//fprintf( stderr, "offset 0x%.2x, pts 0x%.2x, pid %i \n", ps->offset, ps->has_pts, pid );
if
(
(
ps
->
offset
==
0
)
&&
(
ps
->
has_pts
==
0xc0
)
&&
(
ps
->
pcr_pid
==
pid
)
)
{
...
...
@@ -414,7 +405,6 @@ void write_media_ts(ps_t *ps, unsigned char *ts, unsigned int pid)
(((
s64
)
U16_AT
(
ps
->
ps_data
+
10
)
<<
14
)
-
(
1
<<
14
))
|
((
s64
)
U16_AT
(
ps
->
ps_data
+
12
)
>>
1
)
);
//fprintf( stderr, "clock is %lli\n", clock );
ps
->
has_pts
=
0
;
extclock
=
0x000
;
...
...
@@ -459,10 +449,8 @@ void write_media_ts(ps_t *ps, unsigned char *ts, unsigned int pid)
ps
->
pes_type
=
NO_PES
;
ps
->
sent_ts
++
;
//fprintf( stderr, "wrote 0x%.2x data (size was 0x%.2x)\n", ps->offset, ps->pes_size);
}
//fprintf(stderr, "[PES size: %i]\n", ps->pes_size);
}
/******************************************************************************
...
...
@@ -473,8 +461,6 @@ void write_pat(ps_t *ps, unsigned char *ts)
{
int
i
;
//fprintf( stderr, "wrote a PAT\n");
ts
[
0
]
=
0x47
;
/* sync_byte */
ts
[
1
]
=
0x40
;
ts
[
2
]
=
0x00
;
/* PID = 0x0000 */
...
...
@@ -513,8 +499,6 @@ void write_pmt(ps_t *ps, unsigned char *ts)
{
int
i
;
//fprintf( stderr, "wrote a PMT\n");
ts
[
0
]
=
0x47
;
/* sync_byte */
ts
[
1
]
=
0x40
;
ts
[
2
]
=
0x0064
;
/* PID = 0x0064 */
...
...
@@ -652,7 +636,7 @@ ssize_t ps_read (int fd, ps_t * p_ps, void *ts)
if
(
readbytes
==
0
)
{
fpr
intf
(
stderr
,
"ps READ ERROR
\n
"
);
intf
_ErrMsg
(
"input: ps read error
\n
"
);
return
-
1
;
}
p_ps
->
ps_data
=
p_ps
->
ps_buffer
;
...
...
@@ -664,7 +648,7 @@ ssize_t ps_read (int fd, ps_t * p_ps, void *ts)
{
if
(
p_ps
->
ps_data
[
0
]
||
p_ps
->
ps_data
[
1
]
||
(
p_ps
->
ps_data
[
2
]
!=
0x01
)
)
{
fpr
intf
(
stderr
,
"E
rror: not a startcode (0x%.2x%.2x%.2x instead of 0x000001)
\n
"
,
p_ps
->
ps_data
[
0
],
p_ps
->
ps_data
[
1
],
p_ps
->
ps_data
[
2
]
);
intf
_ErrMsg
(
"input e
rror: not a startcode (0x%.2x%.2x%.2x instead of 0x000001)
\n
"
,
p_ps
->
ps_data
[
0
],
p_ps
->
ps_data
[
1
],
p_ps
->
ps_data
[
2
]
);
return
-
1
;
}
...
...
@@ -762,7 +746,7 @@ ssize_t ps_read (int fd, ps_t * p_ps, void *ts)
{
if
(
p_ps
->
has_pts
)
{
fpr
intf
(
stderr
,
"
found a PTS, at last ...
\n
"
);
intf
_Msg
(
"input:
found a PTS, at last ...
\n
"
);
p_ps
->
found_pts
=
1
;
}
else
...
...
@@ -979,7 +963,6 @@ int input_FileRead( input_thread_t *p_input, const struct iovec *p_vector,
* End condition not verified, should put a flag in ps_fill
*/
howmany
=
TS_IN_UDP
;
//fprintf( stderr, "XXX icount = %d\n", (int)i_count );
vlc_mutex_lock
(
&
p_in_data
->
lock
);
while
(
p_in_data
->
end
==
p_in_data
->
start
)
...
...
src/lpcm_decoder/lpcm_decoder.c
View file @
c2e97975
...
...
@@ -22,12 +22,20 @@
#include
<stdio.h>
#include
"defs.h"
#include
"int_types.h"
#include
"config.h"
#include
"common.h"
#include
"threads.h"
#include
"mtime.h"
#include
"plugins.h"
#include
"intf_msg.h"
//#include "int_types.h"
#include
"lpcm_decoder.h"
int
lpcm_init
(
lpcmdec_t
*
p_lpcmdec
)
{
fpr
intf
(
stderr
,
"LPCM Debug: lpmcm init called
\n
"
);
intf
_DbgMsg
(
"LPCM Debug: lpmcm init called
\n
"
);
return
0
;
}
...
...
src/lpcm_decoder/lpcm_decoder_thread.c
View file @
c2e97975
...
...
@@ -66,11 +66,11 @@ static void EndThread (lpcmdec_thread_t * p_adec);
lpcmdec_thread_t
*
lpcmdec_CreateThread
(
input_thread_t
*
p_input
)
{
lpcmdec_thread_t
*
p_lpcmdec
;
fpr
intf
(
stderr
,
"LPCM Debug: creating lpcm decoder thread
\n
"
);
intf
_DbgMsg
(
"LPCM Debug: creating lpcm decoder thread
\n
"
);
/* Allocate the memory needed to store the thread's structure */
if
((
p_lpcmdec
=
(
lpcmdec_thread_t
*
)
malloc
(
sizeof
(
lpcmdec_thread_t
)))
==
NULL
)
{
fpr
intf
(
stderr
,
"LPCM Error: not enough memory for lpcmdec_CreateThread() to create the new thread
\n
"
);
intf
_ErrMsg
(
"LPCM Error: not enough memory for lpcmdec_CreateThread() to create the new thread
\n
"
);
return
NULL
;
}
...
...
@@ -104,12 +104,12 @@ lpcmdec_thread_t * lpcmdec_CreateThread (input_thread_t * p_input)
/* Spawn the lpcm decoder thread */
if
(
vlc_thread_create
(
&
p_lpcmdec
->
thread_id
,
"lpcm decoder"
,
(
vlc_thread_func_t
)
RunThread
,
(
void
*
)
p_lpcmdec
))
{
fpr
intf
(
stderr
,
"LPCM Error: can't spawn lpcm decoder thread
\n
"
);
intf
_ErrMsg
(
"LPCM Error: can't spawn lpcm decoder thread
\n
"
);
free
(
p_lpcmdec
);
return
NULL
;
}
fpr
intf
(
stderr
,
"LPCM Debug: lpcm decoder thread (%p) created
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: lpcm decoder thread (%p) created
\n
"
,
p_lpcmdec
);
return
p_lpcmdec
;
}
...
...
@@ -118,7 +118,7 @@ lpcmdec_thread_t * lpcmdec_CreateThread (input_thread_t * p_input)
*****************************************************************************/
void
lpcmdec_DestroyThread
(
lpcmdec_thread_t
*
p_lpcmdec
)
{
fpr
intf
(
stderr
,
"LPCM Debug: requesting termination of lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: requesting termination of lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
/* Ask thread to kill itself */
p_lpcmdec
->
b_die
=
1
;
...
...
@@ -143,7 +143,7 @@ static int InitThread (lpcmdec_thread_t * p_lpcmdec)
aout_fifo_t
aout_fifo
;
lpcm_byte_stream_t
*
byte_stream
;
fpr
intf
(
stderr
,
"LPCM Debug: initializing lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: initializing lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
/* Our first job is to initialize the bit stream structure with the
* beginning of the input stream */
...
...
@@ -175,7 +175,7 @@ static int InitThread (lpcmdec_thread_t * p_lpcmdec)
return
-
1
;
}
fpr
intf
(
stderr
,
"LPCM Debug: lpcm decoder thread %p initialized
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: lpcm decoder thread %p initialized
\n
"
,
p_lpcmdec
);
return
0
;
}
...
...
@@ -186,7 +186,7 @@ static void RunThread (lpcmdec_thread_t * p_lpcmdec)
{
int
sync
;
fpr
intf
(
stderr
,
"LPCM Debug: running lpcm decoder thread (%p) (pid== %i)
\n
"
,
p_lpcmdec
,
getpid
());
intf
_DbgMsg
(
"LPCM Debug: running lpcm decoder thread (%p) (pid== %i)
\n
"
,
p_lpcmdec
,
getpid
()
);
msleep
(
INPUT_PTS_DELAY
);
...
...
@@ -237,7 +237,7 @@ static void RunThread (lpcmdec_thread_t * p_lpcmdec)
vlc_cond_signal
(
&
p_lpcmdec
->
p_aout_fifo
->
data_wait
);
vlc_mutex_unlock
(
&
p_lpcmdec
->
p_aout_fifo
->
data_lock
);
fpr
intf
(
stderr
,
"LPCM Debug: %x
\n
"
,
*
buffer
);
intf
_DbgMsg
(
"LPCM Debug: %x
\n
"
,
*
buffer
);
bad_frame:
}
...
...
@@ -281,7 +281,7 @@ static void ErrorThread (lpcmdec_thread_t * p_lpcmdec)
*****************************************************************************/
static
void
EndThread
(
lpcmdec_thread_t
*
p_lpcmdec
)
{
fpr
intf
(
stderr
,
"LPCM Debug: destroying lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: destroying lpcm decoder thread %p
\n
"
,
p_lpcmdec
);
/* If the audio output fifo was created, we destroy it */
if
(
p_lpcmdec
->
p_aout_fifo
!=
NULL
)
{
...
...
@@ -296,7 +296,7 @@ static void EndThread (lpcmdec_thread_t * p_lpcmdec)
/* Destroy descriptor */
free
(
p_lpcmdec
);
fpr
intf
(
stderr
,
"LPCM Debug: lpcm decoder thread %p destroyed
\n
"
,
p_lpcmdec
);
intf
_DbgMsg
(
"LPCM Debug: lpcm decoder thread %p destroyed
\n
"
,
p_lpcmdec
);
}
void
lpcm_byte_stream_next
(
lpcm_byte_stream_t
*
p_byte_stream
)
...
...
src/misc/plugins.c
View file @
c2e97975
...
...
@@ -78,11 +78,12 @@ int RequestPlugin ( plugin_id_t * p_plugin, char * psz_mask, char * psz_name )
#if defined(HAVE_DLFCN_H)
if
(
*
p_plugin
!=
NULL
)
return
(
0
);
#elif defined(HAVE_IMAGE_H)
if
(
*
p_plugin
>=
0
)
return
(
0
);
#endif
{
return
(
0
);
}
}
return
(
-
1
);
...
...
src/video_output/video_spu.c
View file @
c2e97975