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
6192caae
Commit
6192caae
authored
Sep 13, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Handle parameters in streaming profiles
* Remove i18n_string stuff
parent
5a3ae4a1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
109 deletions
+209
-109
include/vlc_common.h
include/vlc_common.h
+2
-2
include/vlc_streaming.h
include/vlc_streaming.h
+74
-49
include/vlc_strings.h
include/vlc_strings.h
+0
-32
src/stream_output/profiles.c
src/stream_output/profiles.c
+133
-26
No files found.
include/vlc_common.h
View file @
6192caae
...
...
@@ -335,6 +335,8 @@ typedef struct announce_method_t announce_method_t;
typedef
struct
announce_handler_t
announce_handler_t
;
typedef
struct
sap_handler_t
sap_handler_t
;
typedef
struct
sout_param_t
sout_param_t
;
typedef
struct
sout_pcat_t
sout_pcat_t
;
typedef
struct
sout_std_t
sout_std_t
;
typedef
struct
sout_display_t
sout_display_t
;
typedef
struct
sout_duplicate_t
sout_duplicate_t
;
...
...
@@ -369,8 +371,6 @@ typedef struct iso639_lang_t iso639_lang_t;
typedef
struct
device_t
device_t
;
typedef
struct
device_probe_t
device_probe_t
;
typedef
struct
probe_sys_t
probe_sys_t
;
typedef
struct
localized_string_t
localized_string_t
;
typedef
struct
i18n_string_t
i18n_string_t
;
/* block */
typedef
struct
block_t
block_t
;
...
...
include/vlc_streaming.h
View file @
6192caae
...
...
@@ -26,6 +26,10 @@
#include <vlc/vlc.h>
/***********************************************************************
* Predefined lists of streaming data
***********************************************************************/
#ifdef WIN32
#define VCODECS_NUMBER 13
#else
...
...
@@ -38,26 +42,11 @@
#define MUXERS_NUMBER 10
enum
{
MUX_PS
,
MUX_TS
,
MUX_MPEG
,
MUX_OGG
,
MUX_RAW
,
MUX_ASF
,
MUX_AVI
,
MUX_MP4
,
MUX_MOV
,
MUX_WAV
,
MUX_PS
,
MUX_TS
,
MUX_MPEG
,
MUX_OGG
,
MUX_RAW
,
MUX_ASF
,
MUX_AVI
,
MUX_MP4
,
MUX_MOV
,
MUX_WAV
,
};
enum
{
ACCESS_HTTP
,
ACCESS_UDP
,
ACCESS_MMS
,
ACCESS_RTP
,
ACCESS_FILE
};
enum
{
ACCESS_HTTP
,
ACCESS_UDP
,
ACCESS_MMS
,
ACCESS_RTP
,
ACCESS_FILE
};
struct
codec_desc_t
{
char
*
psz_display
;
...
...
@@ -93,7 +82,39 @@ struct mux_desc_t {
//static const char *abitrates_array[] =
//{ "512", "256", "192", "128", "96", "64", "32", "16" } ;
//
/***********************************************************************
* Streaming profiles
***********************************************************************/
/****************** Parameters handling *********************/
struct
sout_param_t
{
int
i_type
;
int
i_element
;
char
*
psz_id
;
char
*
psz_string
;
vlc_value_t
value
;
};
struct
sout_pcat_t
{
char
*
psz_name
;
int
i_params
;
sout_param_t
**
pp_params
;
};
void
streaming_ParameterApply
(
sout_param_t
*
p_param
,
char
**
ppsz_dest
,
int
*
pi_dest
,
float
*
pf_dest
,
vlc_bool_t
*
pb_dest
);
/******** Module types definitions and parametrable elements ***************/
/* Transcode */
enum
{
I_VB
,
I_AB
,
I_CHANNELS
,
F_SCALE
,
B_SOVERLAY
,
PSZ_VC
,
PSZ_AC
,
PSZ_SC
,
PSZ_VE
,
PSZ_AE
};
struct
sout_transcode_t
{
int
i_vb
,
i_ab
,
i_channels
;
...
...
@@ -101,18 +122,27 @@ struct sout_transcode_t
vlc_bool_t
b_soverlay
;
char
*
psz_vcodec
,
*
psz_acodec
,
*
psz_scodec
,
*
psz_venc
,
*
psz_aenc
;
char
*
psz_additional
;
int
i_params
;
sout_param_t
**
pp_params
;
};
void
streaming_TranscodeParametersApply
(
sout_transcode_t
*
p_module
);
struct
sout_std_t
/* Standard */
enum
{
PSZ_MUX
,
PSZ_ACCESS
,
PSZ_URL
,
PSZ_NAME
,
PSZ_GROUP
};
struct
sout_std_t
{
char
*
psz_mux
,
*
psz_access
;
char
*
psz_url
,
*
psz_name
,
*
psz_group
;
int
i_params
;
sout_param_t
**
pp_params
;
};
void
streaming_StdParametersApply
(
sout_std_t
*
p_module
);
struct
sout_display_t
/* Display */
struct
sout_display_t
{
};
/* Duplicate */
struct
sout_duplicate_t
{
int
i_children
,
i_conditions
;
...
...
@@ -120,6 +150,7 @@ struct sout_duplicate_t
char
**
ppsz_conditions
;
};
/******* Generic profile structures and manipulation functions ********/
typedef
union
{
sout_transcode_t
*
p_transcode
;
...
...
@@ -128,7 +159,6 @@ typedef union
sout_display_t
*
p_display
;
}
sout_module_type_t
;
struct
sout_module_t
{
int
i_type
;
...
...
@@ -136,14 +166,8 @@ struct sout_module_t
sout_module_t
*
p_parent
;
};
enum
{
SOUT_MOD_TRANSCODE
,
SOUT_MOD_STD
,
SOUT_MOD_RTP
,
SOUT_MOD_DUPLICATE
,
SOUT_MOD_DISPLAY
};
enum
{
SOUT_MOD_TRANSCODE
,
SOUT_MOD_STD
,
SOUT_MOD_RTP
,
SOUT_MOD_DUPLICATE
,
SOUT_MOD_DISPLAY
};
struct
sout_chain_t
{
...
...
@@ -152,9 +176,28 @@ struct sout_chain_t
int
i_options
;
char
**
ppsz_options
;
int
i_pcats
;
sout_pcat_t
**
pp_pcats
;
};
struct
sout_gui_descr_t
static
inline
sout_chain_t
*
streaming_ChainNew
()
{
DECMALLOC_NULL
(
p_chain
,
sout_chain_t
);
memset
(
p_chain
,
0
,
sizeof
(
sout_chain_t
)
);
p_chain
->
i_options
=
0
;
return
p_chain
;
}
struct
streaming_profile_t
{
char
*
psz_title
;
char
*
psz_description
;
sout_chain_t
*
p_chain
;
};
/**************** GUI interaction *****************/
struct
sout_gui_descr_t
{
/* Access */
vlc_bool_t
b_local
,
b_file
,
b_http
,
b_mms
,
b_rtp
,
b_udp
,
b_dump
;
...
...
@@ -176,21 +219,7 @@ struct sout_gui_descr_t
int
i_ttl
;
};
struct
streaming_profile_t
{
i18n_string_t
*
p_title
;
i18n_string_t
*
p_description
;
sout_chain_t
*
p_chain
;
};
static
inline
sout_chain_t
*
streaming_ChainNew
()
{
DECMALLOC_NULL
(
p_chain
,
sout_chain_t
);
memset
(
p_chain
,
0
,
sizeof
(
sout_chain_t
)
);
p_chain
->
i_options
=
0
;
return
p_chain
;
}
/***************** Profile parsing ***********************/
struct
profile_parser_t
{
...
...
@@ -198,8 +227,4 @@ struct profile_parser_t
streaming_profile_t
*
p_profile
;
};
//VLC_XEXPORT( char *, streaming_ChainToPsz, (sout_chain_t * ) );
#endif
include/vlc_strings.h
View file @
6192caae
...
...
@@ -34,38 +34,6 @@
VLC_EXPORT
(
void
,
resolve_xml_special_chars
,
(
char
*
psz_value
)
);
VLC_EXPORT
(
char
*
,
convert_xml_special_chars
,
(
const
char
*
psz_content
)
);
struct
localized_string_t
{
char
*
psz_lang
;
char
*
psz_text
;
};
struct
i18n_string_t
{
int
i_langs
;
localized_string_t
**
pp_langs
;
};
static
inline
void
i18n_AddLang
(
i18n_string_t
*
p_src
,
char
*
psz_lang
,
char
*
psz_text
)
{
DECMALLOC_VOID
(
pl10n
,
localized_string_t
);
pl10n
->
psz_lang
=
strdup
(
psz_lang
);
pl10n
->
psz_text
=
strdup
(
psz_text
);
INSERT_ELEM
(
p_src
->
pp_langs
,
p_src
->
i_langs
,
p_src
->
i_langs
,
pl10n
);
};
static
inline
char
*
i18n_Get
(
i18n_string_t
*
p_src
,
char
*
psz_lang
)
{
int
i
;
for
(
i
=
0
;
i
<
p_src
->
i_langs
;
i
++
)
{
if
(
!
strcmp
(
p_src
->
pp_langs
[
i
]
->
psz_lang
,
psz_lang
)
)
return
p_src
->
pp_langs
[
i
]
->
psz_text
;
}
return
strdup
(
""
);
};
/**
* @}
*/
...
...
src/stream_output/profiles.c
View file @
6192caae
This diff is collapsed.
Click to expand it.
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