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
179f1381
Commit
179f1381
authored
Jul 10, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: cosmetics + MUX_GET_MIME.
parent
a3da7219
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
168 additions
and
82 deletions
+168
-82
modules/mux/asf.c
modules/mux/asf.c
+31
-13
modules/mux/avi.c
modules/mux/avi.c
+25
-11
modules/mux/dummy.c
modules/mux/dummy.c
+20
-11
modules/mux/mp4.c
modules/mux/mp4.c
+17
-13
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+23
-9
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+27
-13
modules/mux/ogg.c
modules/mux/ogg.c
+25
-12
No files found.
modules/mux/asf.c
View file @
179f1381
...
...
@@ -80,12 +80,12 @@ vlc_module_end();
*****************************************************************************/
static
const
char
*
ppsz_sout_options
[]
=
{
"title"
,
"author"
,
"copyright"
,
"comment"
,
"rating"
,
NULL
};
;
};
static
int
Capability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
static
int
Control
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
typedef
struct
{
...
...
@@ -175,9 +175,9 @@ static int Open( vlc_object_t *p_this )
int
i
;
msg_Dbg
(
p_mux
,
"Asf muxer opened"
);
sout_
ParseCfg
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
sout_
CfgParse
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -267,16 +267,34 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Capability:
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
sout_mux_sys_t
*
p_sys
=
p_mux
->
p_sys
;
vlc_bool_t
*
pb_bool
;
char
**
ppsz
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_FALSE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
ppsz
=
(
char
**
)
va_arg
(
args
,
char
**
);
if
(
p_sys
->
b_asf_http
)
*
ppsz
=
strdup
(
"video/x-ms-asf-stream"
);
else
*
ppsz
=
strdup
(
"video/x-ms-asf"
);
return
VLC_SUCCESS
;
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/avi.c
View file @
179f1381
...
...
@@ -51,10 +51,10 @@ vlc_module_end();
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
static
int
Control
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
typedef
struct
avi_stream_s
{
...
...
@@ -149,7 +149,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
b_write_header
=
VLC_TRUE
;
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -212,16 +212,30 @@ static void Close( vlc_object_t * p_this )
sout_AccessOutWrite
(
p_mux
->
p_access
,
p_hdr
);
}
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
char
**
ppsz
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_FALSE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
ppsz
=
(
char
**
)
va_arg
(
args
,
char
**
);
*
ppsz
=
strdup
(
"video/avi"
);
return
VLC_SUCCESS
;
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/dummy.c
View file @
179f1381
...
...
@@ -49,10 +49,10 @@ vlc_module_end();
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
static
int
Control
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
struct
sout_mux_sys_t
{
...
...
@@ -72,7 +72,7 @@ static int Open( vlc_object_t *p_this )
msg_Dbg
(
p_mux
,
"Dummy/Raw muxer opened"
);
msg_Info
(
p_mux
,
"Open"
);
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -96,16 +96,25 @@ static void Close( vlc_object_t * p_this )
free
(
p_sys
);
}
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
/* Unknown */
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/mp4.c
View file @
179f1381
...
...
@@ -70,7 +70,7 @@ static const char *ppsz_sout_options[] = {
"faststart"
,
NULL
};
static
int
C
apability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
C
ontrol
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
...
...
@@ -188,9 +188,9 @@ static int Open( vlc_object_t *p_this )
bo_t
*
box
;
msg_Dbg
(
p_mux
,
"Mp4 muxer opend"
);
sout_
ParseCfg
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
sout_
CfgParse
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -363,23 +363,27 @@ static void Close( vlc_object_t * p_this )
}
/*****************************************************************************
* C
apability
:
* C
ontrol
:
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
SOUT_MUX_CAP_ERR_OK
;
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
SOUT_MUX_CAP_GET_ADD_STREAM_WAIT
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
/* Not needed, as not streamable */
default:
return
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/mpeg/ps.c
View file @
179f1381
...
...
@@ -61,7 +61,7 @@ vlc_module_end();
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
C
apability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
C
ontrol
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
...
...
@@ -116,7 +116,7 @@ static int Open( vlc_object_t *p_this )
msg_Info
(
p_mux
,
"Open"
);
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -164,18 +164,32 @@ static void Close( vlc_object_t * p_this )
}
/*****************************************************************************
* C
apability
:
* C
ontrol
:
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
char
**
ppsz
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
ppsz
=
(
char
**
)
va_arg
(
args
,
char
**
);
*
ppsz
=
strdup
(
"video/mpeg"
);
return
VLC_SUCCESS
;
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/mpeg/ts.c
View file @
179f1381
...
...
@@ -307,10 +307,10 @@ static int AllocatePID( sout_mux_sys_t *p_sys, int i_cat )
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
static
int
Control
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
static
void
TSSchedule
(
sout_mux_t
*
p_mux
,
sout_buffer_chain_t
*
p_chain_ts
,
mtime_t
i_pcr_length
,
mtime_t
i_pcr_dts
);
...
...
@@ -334,11 +334,11 @@ static int Open( vlc_object_t *p_this )
vlc_value_t
val
;
msg_Dbg
(
p_mux
,
"Open"
);
sout_
ParseCfg
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
sout_
CfgParse
(
p_mux
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_mux
->
p_cfg
);
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -493,18 +493,32 @@ static void Close( vlc_object_t * p_this )
}
/*****************************************************************************
* C
apability
:
* C
ontrol
:
*****************************************************************************/
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
char
**
ppsz
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_FALSE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
ppsz
=
(
char
**
)
va_arg
(
args
,
char
**
);
*
ppsz
=
strdup
(
"video/mpeg"
);
/* FIXME not sure */
return
VLC_SUCCESS
;
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
...
...
modules/mux/ogg.c
View file @
179f1381
...
...
@@ -58,7 +58,7 @@ vlc_module_end();
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
C
apability
(
sout_mux_t
*
,
int
,
void
*
,
void
*
);
static
int
C
ontrol
(
sout_mux_t
*
,
int
,
va_list
);
static
int
AddStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
DelStream
(
sout_mux_t
*
,
sout_input_t
*
);
static
int
Mux
(
sout_mux_t
*
);
...
...
@@ -236,7 +236,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
pp_del_streams
=
0
;
p_mux
->
p_sys
=
p_sys
;
p_mux
->
pf_c
apacity
=
Capability
;
p_mux
->
pf_c
ontrol
=
Control
;
p_mux
->
pf_addstream
=
AddStream
;
p_mux
->
pf_delstream
=
DelStream
;
p_mux
->
pf_mux
=
Mux
;
...
...
@@ -288,22 +288,35 @@ static void Close( vlc_object_t * p_this )
free
(
p_sys
);
}
static
int
Capability
(
sout_mux_t
*
p_mux
,
int
i_query
,
void
*
p_args
,
void
*
p_answer
)
/*****************************************************************************
* Control:
*****************************************************************************/
static
int
Control
(
sout_mux_t
*
p_mux
,
int
i_query
,
va_list
args
)
{
vlc_bool_t
*
pb_bool
;
char
**
ppsz
;
switch
(
i_query
)
{
case
SOUT_MUX_CAP_GET_ADD_STREAM_ANY_TIME
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
SOUT_MUX_CAP_GET_ADD_STREAM_WAIT
:
*
(
vlc_bool_t
*
)
p_answer
=
VLC_TRUE
;
return
(
SOUT_MUX_CAP_ERR_OK
);
case
MUX_CAN_ADD_STREAM_WHILE_MUXING
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_ADD_STREAM_WAIT
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
MUX_GET_MIME
:
ppsz
=
(
char
**
)
va_arg
(
args
,
char
**
);
*
ppsz
=
strdup
(
"application/ogg"
);
return
VLC_SUCCESS
;
default:
return
(
SOUT_MUX_CAP_ERR_UNIMPLEMENTED
)
;
return
VLC_EGENERIC
;
}
}
/*****************************************************************************
* AddStream: Add an elementary stream to the muxed stream
*****************************************************************************/
...
...
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