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
0ef062c7
Commit
0ef062c7
authored
Aug 11, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S/PDIF fixes.
parent
ff840042
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
19 deletions
+17
-19
include/audio_output.h
include/audio_output.h
+3
-2
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/a52tospdif.c
+8
-6
modules/codec/spdif.c
modules/codec/spdif.c
+4
-9
src/audio_output/audio_output.c
src/audio_output/audio_output.c
+2
-2
No files found.
include/audio_output.h
View file @
0ef062c7
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.5
6 2002/08/11 22:46:34
massiot Exp $
* $Id: audio_output.h,v 1.5
7 2002/08/11 23:26:28
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -109,7 +109,8 @@ struct aout_buffer_t
struct
aout_buffer_t
*
p_next
;
};
#define AOUT_SPDIF_FRAME 1536
/* Size of a frame for S/PDIF output. */
#define AOUT_SPDIF_SIZE 6144
/*****************************************************************************
* Prototypes
...
...
modules/audio_filter/converter/a52tospdif.c
View file @
0ef062c7
...
...
@@ -2,7 +2,7 @@
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: a52tospdif.c,v 1.
1 2002/08/11 22:36:35
massiot Exp $
* $Id: a52tospdif.c,v 1.
2 2002/08/11 23:26:28
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -78,7 +78,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t
*
p_in_buf
,
aout_buffer_t
*
p_out_buf
)
{
static
const
u8
p_sync
[
6
]
=
{
0x72
,
0xF8
,
0x1F
,
0x4E
,
0x01
,
0x00
};
u16
i_length
=
*
(
u16
*
)
p_in_buf
->
p_buffer
;
u16
i_length
=
p_in_buf
->
i_nb_samples
;
u16
*
pi_length
;
byte_t
*
p_in
=
p_in_buf
->
p_buffer
;
byte_t
*
p_out
=
p_out_buf
->
p_buffer
;
...
...
@@ -93,10 +93,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
#ifndef WORDS_BIGENDIAN
# ifdef HAVE_SWAB
swab
(
p_out
+
8
,
p_in
+
sizeof
(
u16
)
,
i_length
);
swab
(
p_out
+
8
,
p_in
,
i_length
);
# else
p_out
+=
8
;
p_in
+=
sizeof
(
u16
);
for
(
i
=
0
;
i
<
i_length
/
2
;
i
++
)
{
p_out
[
0
]
=
p_in
[
1
];
...
...
@@ -106,9 +105,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
# endif
#else
p_filter
->
p_vlc
->
pf_memcpy
(
p_out
+
8
,
p_in
+
sizeof
(
u16
)
,
i_length
);
p_filter
->
p_vlc
->
pf_memcpy
(
p_out
+
8
,
p_in
,
i_length
);
#endif
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
/* == 1 */
p_filter
->
p_vlc
->
pf_memset
(
p_out
+
8
+
i_length
,
0
,
AOUT_SPDIF_SIZE
-
i_length
-
8
);
p_out_buf
->
i_nb_samples
=
1
;
}
modules/codec/spdif.c
View file @
0ef062c7
...
...
@@ -2,7 +2,7 @@
* spdif.c: A52 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
* $Id: spdif.c,v 1.
2 2002/08/11 22:36:35
massiot Exp $
* $Id: spdif.c,v 1.
3 2002/08/11 23:26:28
massiot Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
...
...
@@ -77,7 +77,7 @@ static int RunDecoder ( decoder_fifo_t * );
static
int
InitThread
(
spdif_thread_t
*
,
decoder_fifo_t
*
);
static
void
EndThread
(
spdif_thread_t
*
);
int
SyncInfo
(
const
byte_t
*
,
int
*
,
int
*
,
int
*
);
static
int
SyncInfo
(
const
byte_t
*
,
int
*
,
int
*
,
int
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -145,7 +145,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
/* Temporary buffer to store the raw frame to be decoded */
byte_t
p_header
[
7
];
aout_buffer_t
*
p_buffer
;
u16
*
pi_length
;
/* Look for sync word - should be 0x0b77 */
RealignBits
(
&
p_dec
->
bit_stream
);
...
...
@@ -209,18 +208,14 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
continue
;
}
p_buffer
=
aout_BufferNew
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
1
);
p_buffer
=
aout_BufferNew
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
i_frame_size
);
if
(
p_buffer
==
NULL
)
return
-
1
;
p_buffer
->
start_date
=
last_date
;
last_date
+=
(
mtime_t
)(
A52_FRAME_SIZE
*
1000000
)
/
p_dec
->
output_format
.
i_rate
;
p_buffer
->
end_date
=
last_date
;
/* The first two bytes store the length of the frame - this is
* a bit kludgy. */
pi_length
=
(
u16
*
)
p_buffer
->
p_buffer
;
*
pi_length
=
i_frame_size
;
/* Get the whole frame. */
memcpy
(
p_buffer
->
p_buffer
+
sizeof
(
u16
),
p_header
,
7
);
GetChunk
(
&
p_dec
->
bit_stream
,
p_buffer
->
p_buffer
+
7
+
sizeof
(
u16
),
...
...
src/audio_output/audio_output.c
View file @
0ef062c7
...
...
@@ -2,7 +2,7 @@
* audio_output.c : audio output instance
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.c,v 1.9
2 2002/08/11 01:27:01
massiot Exp $
* $Id: audio_output.c,v 1.9
3 2002/08/11 23:26:28
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -194,7 +194,7 @@ int aout_FormatTo( audio_sample_format_t * p_format, int i_multiplier )
/* Please note that we don't multiply by multiplier, because i_rate
* and i_nb_samples do not have any sense for S/PDIF (yes, it
* _is_ kludgy). --Meuuh */
return
AOUT_SPDIF_
FRAM
E
;
return
AOUT_SPDIF_
SIZ
E
;
default:
return
0
;
/* will segfault much sooner... */
...
...
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