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
f5aac5a7
Commit
f5aac5a7
authored
May 02, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* copy: added raw audio/video support.
* avi: added raw audio support (little endian only).
parent
cc7c7f9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
7 deletions
+137
-7
modules/mux/avi.c
modules/mux/avi.c
+25
-2
modules/packetizer/copy.c
modules/packetizer/copy.c
+112
-5
No files found.
modules/mux/avi.c
View file @
f5aac5a7
...
...
@@ -2,7 +2,7 @@
* avi.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: avi.c,v 1.1
2 2003/04/13 20:00:21
fenrir Exp $
* $Id: avi.c,v 1.1
3 2003/05/02 00:33:42
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -316,6 +316,27 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
case
VLC_FOURCC
(
'w'
,
'm'
,
'a'
,
'3'
):
p_wf
->
wFormatTag
=
WAVE_FORMAT_WMA3
;
break
;
/* raw codec */
case
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
):
p_wf
->
wFormatTag
=
WAVE_FORMAT_PCM
;
p_wf
->
nBlockAlign
=
p_wf
->
nChannels
;
p_wf
->
wBitsPerSample
=
8
;
break
;
case
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
):
p_wf
->
wFormatTag
=
WAVE_FORMAT_PCM
;
p_wf
->
nBlockAlign
=
2
*
p_wf
->
nChannels
;
p_wf
->
wBitsPerSample
=
16
;
break
;
case
VLC_FOURCC
(
's'
,
'2'
,
'4'
,
'l'
):
p_wf
->
wFormatTag
=
WAVE_FORMAT_PCM
;
p_wf
->
nBlockAlign
=
3
*
p_wf
->
nChannels
;
p_wf
->
wBitsPerSample
=
24
;
break
;
case
VLC_FOURCC
(
's'
,
'3'
,
'2'
,
'l'
):
p_wf
->
wFormatTag
=
WAVE_FORMAT_PCM
;
p_wf
->
nBlockAlign
=
4
*
p_wf
->
nChannels
;
p_wf
->
wBitsPerSample
=
32
;
break
;
default:
return
VLC_EGENERIC
;
}
...
...
@@ -428,7 +449,9 @@ static int Mux ( sout_mux_t *p_mux )
if
(
p_data
->
i_length
<
0
)
{
msg_Warn
(
p_mux
,
"argg length < 0 l"
);
p_data
->
i_length
=
0
;
sout_BufferDelete
(
p_mux
->
p_sout
,
p_data
);
i_count
--
;
continue
;
}
p_stream
->
i_duration
+=
p_data
->
i_length
;
p_stream
->
i_totalsize
+=
p_data
->
i_size
;
...
...
modules/packetizer/copy.c
View file @
f5aac5a7
...
...
@@ -2,7 +2,7 @@
* copy.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: copy.c,v 1.
7 2003/04/13 20:00:21
fenrir Exp $
* $Id: copy.c,v 1.
8 2003/05/02 00:33:42
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -144,6 +144,7 @@ static int InitThread( packetizer_thread_t *p_pack )
switch
(
p_pack
->
p_fifo
->
i_fourcc
)
{
/* video */
case
VLC_FOURCC
(
'm'
,
'4'
,
's'
,
'2'
):
case
VLC_FOURCC
(
'M'
,
'4'
,
'S'
,
'2'
):
case
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
's'
):
...
...
@@ -168,10 +169,6 @@ static int InitThread( packetizer_thread_t *p_pack )
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
);
p_pack
->
output_format
.
i_cat
=
VIDEO_ES
;
break
;
case
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
):
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
case
VLC_FOURCC
(
'd'
,
'i'
,
'v'
,
'1'
):
case
VLC_FOURCC
(
'D'
,
'I'
,
'V'
,
'1'
):
...
...
@@ -248,6 +245,20 @@ static int InitThread( packetizer_thread_t *p_pack )
p_pack
->
output_format
.
i_cat
=
VIDEO_ES
;
break
;
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
):
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
);
p_pack
->
output_format
.
i_cat
=
VIDEO_ES
;
break
;
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
):
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
);
p_pack
->
output_format
.
i_cat
=
VIDEO_ES
;
break
;
/* audio */
case
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
):
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
case
VLC_FOURCC
(
'w'
,
'm'
,
'a'
,
'1'
):
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'w'
,
'm'
,
'a'
,
'1'
);
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
...
...
@@ -256,6 +267,102 @@ static int InitThread( packetizer_thread_t *p_pack )
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'w'
,
'm'
,
'a'
,
'2'
);
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
case
VLC_FOURCC
(
'a'
,
'r'
,
'a'
,
'w'
):
{
WAVEFORMATEX
*
p_wf
=
(
WAVEFORMATEX
*
)
p_pack
->
p_fifo
->
p_waveformatex
;
if
(
p_wf
)
{
switch
(
(
p_wf
->
wBitsPerSample
+
7
)
/
8
)
{
case
1
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
);
break
;
case
2
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
);
break
;
case
3
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'2'
,
'4'
,
'l'
);
break
;
case
4
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'3'
,
'2'
,
'l'
);
break
;
default:
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
}
else
{
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
}
case
VLC_FOURCC
(
't'
,
'w'
,
'o'
,
's'
):
{
WAVEFORMATEX
*
p_wf
=
(
WAVEFORMATEX
*
)
p_pack
->
p_fifo
->
p_waveformatex
;
if
(
p_wf
)
{
switch
(
(
p_wf
->
wBitsPerSample
+
7
)
/
8
)
{
case
1
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
);
break
;
case
2
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
);
break
;
case
3
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'2'
,
'4'
,
'b'
);
break
;
case
4
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'3'
,
'2'
,
'b'
);
break
;
default:
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
}
else
{
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
}
case
VLC_FOURCC
(
's'
,
'o'
,
'w'
,
't'
):
{
WAVEFORMATEX
*
p_wf
=
(
WAVEFORMATEX
*
)
p_pack
->
p_fifo
->
p_waveformatex
;
if
(
p_wf
)
{
switch
(
(
p_wf
->
wBitsPerSample
+
7
)
/
8
)
{
case
1
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
);
break
;
case
2
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
);
break
;
case
3
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'2'
,
'4'
,
'l'
);
break
;
case
4
:
p_pack
->
output_format
.
i_fourcc
=
VLC_FOURCC
(
's'
,
'3'
,
'2'
,
'l'
);
break
;
default:
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
}
else
{
msg_Err
(
p_pack
->
p_fifo
,
"unknown raw audio sample size !!"
);
return
VLC_EGENERIC
;
}
p_pack
->
output_format
.
i_cat
=
AUDIO_ES
;
break
;
}
default:
msg_Err
(
p_pack
->
p_fifo
,
"unknown es type !!"
);
...
...
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