Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
9a9f8a1e
Commit
9a9f8a1e
authored
Aug 11, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More S/PDIF fixes.
parent
a29bce0b
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
710 additions
and
438 deletions
+710
-438
configure
configure
+189
-188
configure.in
configure.in
+4
-3
include/config.h
include/config.h
+5
-1
modules/audio_output/oss.c
modules/audio_output/oss.c
+20
-15
modules/codec/.cvsignore
modules/codec/.cvsignore
+0
-0
modules/codec/Makefile
modules/codec/Makefile
+1
-0
modules/codec/a52.c
modules/codec/a52.c
+105
-79
modules/codec/a52/Makefile
modules/codec/a52/Makefile
+0
-1
modules/codec/a52/a52.h
modules/codec/a52/a52.h
+0
-53
modules/codec/spdif.c
modules/codec/spdif.c
+382
-0
modules/codec/spdif/.cvsignore
modules/codec/spdif/.cvsignore
+0
-4
modules/codec/spdif/spdif.h
modules/codec/spdif/spdif.h
+0
-93
src/audio_output/audio_output.c
src/audio_output/audio_output.c
+4
-1
No files found.
configure
View file @
9a9f8a1e
This diff is collapsed.
Click to expand it.
configure.in
View file @
9a9f8a1e
...
...
@@ -442,7 +442,8 @@ PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec"
#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm codec/spdif/spdif"
PLUGINS="${PLUGINS} codec/spdif"
#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm"
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
PLUGINS="${PLUGINS} audio_filter/converter/float32tos16"
PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
...
...
@@ -1155,7 +1156,7 @@ then
a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} codec/a52
/a52
"
BUILTINS="${BUILTINS} codec/a52"
a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
],[
...
...
@@ -1186,7 +1187,7 @@ then
LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
AC_CHECK_HEADERS(a52dec/a52.h, [
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} codec/a52
/a52
"
BUILTINS="${BUILTINS} codec/a52"
a52_LDFLAGS="${a52_LDFLAGS} ${test_LDFLAGS} -la52 -lm"
a52_CFLAGS="${a52_CFLAGS} ${test_CFLAGS}"
],[
...
...
include/config.h
View file @
9a9f8a1e
...
...
@@ -129,12 +129,16 @@
#define VOLUME_MAX 1024
#define VOLUME_MIN 0
/* Max number of pre-filters per input, and max
-
number of post-filters */
/* Max number of pre-filters per input, and max
number of post-filters */
#define AOUT_MAX_FILTERS 10
/* Max number of inputs */
#define AOUT_MAX_INPUTS 5
/* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME
* will cause the calling thread to sleep */
#define AOUT_MAX_PREPARE_TIME (mtime_t)(.5*CLOCK_FREQ)
/*****************************************************************************
* Video configuration
*****************************************************************************/
...
...
modules/audio_output/oss.c
View file @
9a9f8a1e
...
...
@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.
4 2002/08/09 23:47:23
massiot Exp $
* $Id: oss.c,v 1.
5 2002/08/11 01:27:01
massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -293,39 +293,44 @@ static int OSSThread( aout_instance_t * p_aout )
int
i_bytes_per_sample
;
aout_buffer_t
*
p_buffer
;
mtime_t
next_date
;
int
i_tmp
;
int
i_tmp
,
i_size
;
byte_t
*
p_bytes
;
/* Get the presentation date of the next write() operation. It
* is equal to the current date + duration of buffered samples.
* Order is important here, since GetBufInfo is believed to take
* more time than mdate(). */
if
(
!
p_sys
->
b_initialized
)
{
msleep
(
THREAD_SLEEP
);
continue
;
}
i_bytes_per_sample
=
aout_FormatToSize
(
&
p_aout
->
output
.
output
,
1
);
next_date
=
(
mtime_t
)
GetBufInfo
(
p_aout
)
*
1000000
/
i_bytes_per_sample
/
p_aout
->
output
.
output
.
i_rate
;
next_date
+=
mdate
();
if
(
p_aout
->
output
.
output
.
i_format
!=
AOUT_FMT_SPDIF
)
{
/* Get the presentation date of the next write() operation. It
* is equal to the current date + duration of buffered samples.
* Order is important here, since GetBufInfo is believed to take
* more time than mdate(). */
next_date
=
(
mtime_t
)
GetBufInfo
(
p_aout
)
*
1000000
/
aout_FormatToByterate
(
&
p_aout
->
output
.
output
,
p_aout
->
output
.
output
.
i_rate
);
next_date
+=
mdate
();
}
p_buffer
=
aout_OutputNextBuffer
(
p_aout
,
next_date
);
if
(
p_buffer
!=
NULL
)
{
p_bytes
=
p_buffer
->
p_buffer
;
i_size
=
aout_FormatToSize
(
&
p_aout
->
output
.
output
,
p_buffer
->
i_nb_samples
);
}
else
{
p_bytes
=
alloca
(
DEFAULT_FRAME_SIZE
*
i_bytes_per_sample
);
memset
(
p_bytes
,
0
,
DEFAULT_FRAME_SIZE
*
i_bytes_per_sample
);
i_size
=
aout_FormatToSize
(
&
p_aout
->
output
.
output
,
DEFAULT_FRAME_SIZE
);
p_bytes
=
alloca
(
i_size
);
memset
(
p_bytes
,
0
,
i_size
);
}
i_tmp
=
write
(
p_sys
->
i_fd
,
p_bytes
,
DEFAULT_FRAME_SIZE
*
i_bytes_per_sample
);
i_tmp
=
write
(
p_sys
->
i_fd
,
p_bytes
,
i_size
);
if
(
i_tmp
<
0
)
{
...
...
modules/codec/
a52/
.cvsignore
→
modules/codec/.cvsignore
View file @
9a9f8a1e
File moved
modules/codec/
spdif/
Makefile
→
modules/codec/Makefile
View file @
9a9f8a1e
a52_SOURCES
=
a52.c
spdif_SOURCES
=
spdif.c
modules/codec/a52
/a52
.c
→
modules/codec/a52.c
View file @
9a9f8a1e
This diff is collapsed.
Click to expand it.
modules/codec/a52/Makefile
deleted
100644 → 0
View file @
a29bce0b
a52_SOURCES
=
a52.c
modules/codec/a52/a52.h
deleted
100644 → 0
View file @
a29bce0b
/*****************************************************************************
* a52.h: ATSC A/52 aka AC-3 decoder plugin for vlc.
* This plugin makes use of liba52 to decode A/52 audio
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: a52.h,v 1.2 2002/08/07 21:36:56 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* a52_thread_t : a52 decoder thread descriptor
*****************************************************************************/
typedef
struct
a52_thread_s
{
/*
* liba52 properties
*/
a52_state_t
*
p_a52_state
;
vlc_bool_t
b_dynrng
;
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t
bit_stream
;
/*
* Input properties
*/
decoder_fifo_t
*
p_fifo
;
/* stores the PES stream data */
data_packet_t
*
p_data
;
/*
* Output properties
*/
aout_instance_t
*
p_aout
;
/* opaque */
aout_input_t
*
p_aout_input
;
/* opaque */
audio_sample_format_t
output_format
;
mtime_t
last_date
;
}
a52_thread_t
;
modules/codec/spdif
/spdif
.c
→
modules/codec/spdif.c
View file @
9a9f8a1e
This diff is collapsed.
Click to expand it.
modules/codec/spdif/.cvsignore
deleted
100644 → 0
View file @
a29bce0b
.dep
*.lo
*.o.*
*.lo.*
modules/codec/spdif/spdif.h
deleted
100644 → 0
View file @
a29bce0b
/*****************************************************************************
* spdif.h: header for A52 pass-through
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: spdif.h,v 1.1 2002/08/04 17:23:42 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
****************************************************************************/
/****************************************************************************
* information about A52 frame
****************************************************************************/
typedef
struct
sync_frame_s
{
struct
syncinfo
{
u8
syncword
[
2
];
u8
crc1
[
2
];
u8
code
;
}
syncinfo
;
struct
bsi
{
u8
bsidmod
;
u8
acmod
;
}
bsi
;
}
sync_frame_t
;
typedef
struct
frame_size_s
{
u16
i_bit_rate
;
u16
i_frame_size
[
3
];
}
frame_size_t
;
typedef
struct
info_s
{
int
i_bit_rate
;
int
i_frame_size
;
int
i_sample_rate
;
int
i_bs_mod
;
}
info_t
;
/*****************************************************************************
* spdif_thread_t : A52 pass-through thread descriptor
*****************************************************************************/
typedef
struct
spdif_thread_s
{
/*
* Thread properties
*/
vlc_thread_t
thread_id
;
/* id for thread functions */
/*
* Input properties
*/
decoder_fifo_t
*
p_fifo
;
/* stores the PES stream data */
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t
bit_stream
;
int
i_available
;
/*
* Decoder properties
*/
info_t
info
;
u8
*
p_bytes
;
/* current pes date */
mtime_t
i_pts
;
mtime_t
i_real_pts
;
/*
* Output properties
*/
int
i_previous_format
;
aout_fifo_t
*
p_aout_fifo
;
/* stores the decompressed audio frames */
}
spdif_thread_t
;
src/audio_output/audio_output.c
View file @
9a9f8a1e
...
...
@@ -2,7 +2,7 @@
* audio_output.c : audio output instance
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.c,v 1.9
1 2002/08/09 23:47:23
massiot Exp $
* $Id: audio_output.c,v 1.9
2 2002/08/11 01:27:01
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -137,6 +137,9 @@ void aout_BufferPlay( aout_instance_t * p_aout, aout_input_t * p_input,
/
p_input
->
input
.
i_rate
;
}
/* If the buffer is too early, wait a while. */
mwait
(
p_buffer
->
start_date
-
AOUT_MAX_PREPARE_TIME
);
aout_InputPlay
(
p_aout
,
p_input
,
p_buffer
);
/* Run the mixer if it is able to run. */
...
...
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