Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
172c2460
Commit
172c2460
authored
Jun 28, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed --program behavior.
parent
3c1e28fa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
5 deletions
+41
-5
src/input/es_out.c
src/input/es_out.c
+23
-3
src/input/es_out.h
src/input/es_out.h
+10
-0
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+7
-1
src/input/input.c
src/input/input.c
+1
-1
No files found.
src/input/es_out.c
View file @
172c2460
...
...
@@ -130,7 +130,8 @@ struct es_out_sys_t
int
i_video
;
int
i_sub
;
/* es to select */
/* es/group to select */
int
i_group_id
;
int
i_audio_last
,
i_audio_id
;
int
i_sub_last
,
i_sub_id
;
int
i_default_sub_id
;
/* As specified in container; if applicable */
...
...
@@ -259,6 +260,8 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
p_sys
->
i_sub
=
0
;
/* */
p_sys
->
i_group_id
=
var_GetInteger
(
p_input
,
"program"
);
p_sys
->
i_audio_last
=
var_GetInteger
(
p_input
,
"audio-track"
);
p_sys
->
i_sub_last
=
var_GetInteger
(
p_input
,
"sub-track"
);
...
...
@@ -978,6 +981,11 @@ static void EsOutESVarUpdate( es_out_t *out, es_out_id_t *es,
EsOutESVarUpdateGeneric
(
out
,
es
->
i_id
,
&
es
->
fmt
,
es
->
psz_language
,
b_delete
);
}
static
bool
EsOutIsProgramVisible
(
es_out_t
*
out
,
int
i_group
)
{
return
out
->
p_sys
->
i_group_id
==
0
||
out
->
p_sys
->
i_group_id
==
i_group
;
}
/* EsOutProgramSelect:
* Select a program and update the object variable
*/
...
...
@@ -1076,9 +1084,10 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
TAB_APPEND
(
p_sys
->
i_pgrm
,
p_sys
->
pgrm
,
p_pgrm
);
/* Update "program" variable */
if
(
EsOutIsProgramVisible
(
out
,
i_group
)
)
input_SendEventProgramAdd
(
p_input
,
i_group
,
NULL
);
if
(
i_group
==
var_GetInteger
(
p_input
,
"program"
)
)
if
(
i_group
==
p_sys
->
i_group_id
||
(
!
p_sys
->
p_pgrm
&&
p_sys
->
i_group_id
==
0
)
)
EsOutProgramSelect
(
out
,
p_pgrm
);
return
p_pgrm
;
...
...
@@ -1184,6 +1193,8 @@ static void EsOutProgramMeta( es_out_t *out, int i_group, const vlc_meta_t *p_me
return
;
}
/* Find program */
if
(
!
EsOutIsProgramVisible
(
out
,
i_group
)
)
return
;
p_pgrm
=
EsOutProgramFind
(
out
,
i_group
);
if
(
!
p_pgrm
)
return
;
...
...
@@ -1275,6 +1286,8 @@ static void EsOutProgramEpg( es_out_t *out, int i_group, const vlc_epg_t *p_epg
char
*
psz_cat
;
/* Find program */
if
(
!
EsOutIsProgramVisible
(
out
,
i_group
)
)
return
;
p_pgrm
=
EsOutProgramFind
(
out
,
i_group
);
if
(
!
p_pgrm
)
return
;
...
...
@@ -2144,6 +2157,13 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return
VLC_SUCCESS
;
}
case
ES_OUT_GET_GROUP_FORCED
:
{
int
*
pi_group
=
va_arg
(
args
,
int
*
);
*
pi_group
=
p_sys
->
i_group_id
;
return
VLC_SUCCESS
;
}
case
ES_OUT_SET_MODE
:
{
const
int
i_mode
=
va_arg
(
args
,
int
);
...
...
src/input/es_out.h
View file @
172c2460
...
...
@@ -80,6 +80,9 @@ enum es_out_query_private_e
/* Set jitter */
ES_OUT_SET_JITTER
,
/* arg1=mtime_t i_pts_delay arg2= mtime_t i_pts_jitter, arg2=int i_cr_average res=cannot fail */
/* Get forced group */
ES_OUT_GET_GROUP_FORCED
,
/* arg1=int * res=cannot fail */
};
static
inline
void
es_out_SetMode
(
es_out_t
*
p_out
,
int
i_mode
)
...
...
@@ -153,6 +156,13 @@ static inline int es_out_GetEsObjects( es_out_t *p_out, int i_id,
{
return
es_out_Control
(
p_out
,
ES_OUT_GET_ES_OBJECTS_BY_ID
,
i_id
,
pp_decoder
,
pp_vout
,
pp_aout
);
}
static
inline
int
es_out_GetGroupForced
(
es_out_t
*
p_out
)
{
int
i_group
;
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_GET_GROUP_FORCED
,
&
i_group
);
assert
(
!
i_ret
);
return
i_group
;
}
es_out_t
*
input_EsOutNew
(
input_thread_t
*
,
int
i_rate
);
...
...
src/input/es_out_timeshift.c
View file @
172c2460
...
...
@@ -633,7 +633,6 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
}
return
es_out_Control
(
p_sys
->
p_out
,
ES_OUT_GET_ES_STATE
,
p_es
->
p_es
,
pb_enabled
);
}
/* Special internal input control */
case
ES_OUT_GET_EMPTY
:
{
...
...
@@ -694,6 +693,13 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
return
es_out_ControlModifyPcrSystem
(
p_sys
->
p_out
,
b_absolute
,
i_system
);
}
case
ES_OUT_GET_GROUP_FORCED
:
{
int
*
pi_group
=
va_arg
(
args
,
int
*
);
return
es_out_Control
(
p_sys
->
p_out
,
ES_OUT_GET_GROUP_FORCED
,
pi_group
);
}
default:
msg_Err
(
p_sys
->
p_input
,
"Unknown es_out_Control query !"
);
assert
(
0
);
...
...
src/input/input.c
View file @
172c2460
...
...
@@ -1193,7 +1193,7 @@ static void InitPrograms( input_thread_t * p_input )
else
{
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_GROUP
,
(
int
)
var_GetInteger
(
p_input
,
"program"
),
NULL
);
es_out_GetGroupForced
(
p_input
->
p
->
p_es_out
),
NULL
);
}
}
...
...
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