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
d4e9d57d
Commit
d4e9d57d
authored
Feb 13, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed "teletext-es" to be a list of teletext spu id.
This change is needed to fix teletext support.
parent
1a082467
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
28 deletions
+37
-28
include/vlc_input.h
include/vlc_input.h
+2
-1
src/input/es_out.c
src/input/es_out.c
+15
-13
src/input/event.c
src/input/event.c
+16
-13
src/input/event.h
src/input/event.h
+4
-1
No files found.
include/vlc_input.h
View file @
d4e9d57d
...
@@ -298,7 +298,8 @@ struct input_thread_t
...
@@ -298,7 +298,8 @@ struct input_thread_t
* - "can-rate"
* - "can-rate"
* - "can-rewind"
* - "can-rewind"
* - "can-record" (if a stream can be recorded while playing)
* - "can-record" (if a stream can be recorded while playing)
* - "teletext-es" to get the index of spu track that is teletext -1 if no teletext)
* - "teletext-es" (list of id from the spu tracks (spu-es) that are teletext, the
* variable value being the one currently selected, -1 if no teletext)
* - "signal-quality"
* - "signal-quality"
* - "signal-strength"
* - "signal-strength"
* - "cache" (level of data cached [0 .. 1])
* - "cache" (level of data cached [0 .. 1])
...
...
src/input/es_out.c
View file @
d4e9d57d
...
@@ -205,7 +205,10 @@ static inline int EsOutGetClosedCaptionsChannel( vlc_fourcc_t fcc )
...
@@ -205,7 +205,10 @@ static inline int EsOutGetClosedCaptionsChannel( vlc_fourcc_t fcc )
}
}
return
-
1
;
return
-
1
;
}
}
static
inline
bool
EsFmtIsTeletext
(
const
es_format_t
*
p_fmt
)
{
return
p_fmt
->
i_cat
==
SPU_ES
&&
p_fmt
->
i_codec
==
VLC_FOURCC
(
't'
,
'e'
,
'l'
,
'x'
);
}
/*****************************************************************************
/*****************************************************************************
* input_EsOutNew:
* input_EsOutNew:
...
@@ -853,19 +856,18 @@ static mtime_t EsOutGetBuffering( es_out_t *out )
...
@@ -853,19 +856,18 @@ static mtime_t EsOutGetBuffering( es_out_t *out )
return
i_delay
;
return
i_delay
;
}
}
static
void
EsOutESVarUpdateGeneric
(
es_out_t
*
out
,
int
i_id
,
es_format_t
*
fmt
,
const
char
*
psz_language
,
static
void
EsOutESVarUpdateGeneric
(
es_out_t
*
out
,
int
i_id
,
const
es_format_t
*
fmt
,
const
char
*
psz_language
,
bool
b_delete
)
bool
b_delete
)
{
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
const
bool
b_teletext
=
fmt
->
i_cat
==
SPU_ES
&&
fmt
->
i_codec
==
VLC_FOURCC
(
't'
,
'e'
,
'l'
,
'x'
);
vlc_value_t
val
,
text
;
vlc_value_t
val
,
text
;
if
(
b_delete
)
if
(
b_delete
)
{
{
/* TODO it should probably be a list */
if
(
EsFmtIsTeletext
(
fmt
)
)
if
(
b_teletext
)
input_SendEventTeletextDel
(
p_sys
->
p_input
,
i_id
);
input_SendEventTeletext
(
p_sys
->
p_input
,
-
1
);
input_SendEventEsDel
(
p_input
,
fmt
->
i_cat
,
i_id
);
input_SendEventEsDel
(
p_input
,
fmt
->
i_cat
,
i_id
);
return
;
return
;
...
@@ -918,15 +920,10 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
...
@@ -918,15 +920,10 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
}
}
input_SendEventEsAdd
(
p_input
,
fmt
->
i_cat
,
i_id
,
text
.
psz_string
);
input_SendEventEsAdd
(
p_input
,
fmt
->
i_cat
,
i_id
,
text
.
psz_string
);
if
(
EsFmtIsTeletext
(
fmt
)
)
input_SendEventTeletextAdd
(
p_sys
->
p_input
,
i_id
,
NULL
);
free
(
text
.
psz_string
);
free
(
text
.
psz_string
);
if
(
b_teletext
)
{
/* TODO it should probably be a list */
if
(
var_GetInteger
(
p_sys
->
p_input
,
"teletext-es"
)
<
0
)
input_SendEventTeletext
(
p_sys
->
p_input
,
i_id
);
}
}
}
static
void
EsOutESVarUpdate
(
es_out_t
*
out
,
es_out_id_t
*
es
,
static
void
EsOutESVarUpdate
(
es_out_t
*
out
,
es_out_id_t
*
es
,
...
@@ -979,6 +976,7 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
...
@@ -979,6 +976,7 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
input_SendEventEsDel
(
p_input
,
AUDIO_ES
,
-
1
);
input_SendEventEsDel
(
p_input
,
AUDIO_ES
,
-
1
);
input_SendEventEsDel
(
p_input
,
VIDEO_ES
,
-
1
);
input_SendEventEsDel
(
p_input
,
VIDEO_ES
,
-
1
);
input_SendEventEsDel
(
p_input
,
SPU_ES
,
-
1
);
input_SendEventEsDel
(
p_input
,
SPU_ES
,
-
1
);
input_SendEventTeletextDel
(
p_input
,
-
1
);
/* TODO event */
/* TODO event */
var_SetInteger
(
p_input
,
"teletext-es"
,
-
1
);
var_SetInteger
(
p_input
,
"teletext-es"
,
-
1
);
...
@@ -1577,6 +1575,8 @@ static void EsSelect( es_out_t *out, es_out_id_t *es )
...
@@ -1577,6 +1575,8 @@ static void EsSelect( es_out_t *out, es_out_id_t *es )
/* Mark it as selected */
/* Mark it as selected */
input_SendEventEsSelect
(
p_input
,
es
->
fmt
.
i_cat
,
es
->
i_id
);
input_SendEventEsSelect
(
p_input
,
es
->
fmt
.
i_cat
,
es
->
i_id
);
if
(
EsFmtIsTeletext
(
&
es
->
fmt
)
)
input_SendEventTeletextSelect
(
p_input
,
es
->
i_id
);
}
}
static
void
EsUnselect
(
es_out_t
*
out
,
es_out_id_t
*
es
,
bool
b_update
)
static
void
EsUnselect
(
es_out_t
*
out
,
es_out_id_t
*
es
,
bool
b_update
)
...
@@ -1629,6 +1629,8 @@ static void EsUnselect( es_out_t *out, es_out_id_t *es, bool b_update )
...
@@ -1629,6 +1629,8 @@ static void EsUnselect( es_out_t *out, es_out_id_t *es, bool b_update )
/* Mark it as unselected */
/* Mark it as unselected */
input_SendEventEsSelect
(
p_input
,
es
->
fmt
.
i_cat
,
-
1
);
input_SendEventEsSelect
(
p_input
,
es
->
fmt
.
i_cat
,
-
1
);
if
(
EsFmtIsTeletext
(
&
es
->
fmt
)
)
input_SendEventTeletextSelect
(
p_input
,
-
1
);
}
}
/**
/**
...
...
src/input/event.c
View file @
d4e9d57d
...
@@ -245,17 +245,17 @@ static const char *GetEsVarName( int i_cat )
...
@@ -245,17 +245,17 @@ static const char *GetEsVarName( int i_cat )
return
"spu-es"
;
return
"spu-es"
;
}
}
}
}
void
input_SendEventEsDel
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
)
{
if
(
i_cat
!=
UNKNOWN_ES
)
VarListDel
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
i_id
);
}
void
input_SendEventEsAdd
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
,
const
char
*
psz_text
)
void
input_SendEventEsAdd
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
,
const
char
*
psz_text
)
{
{
if
(
i_cat
!=
UNKNOWN_ES
)
if
(
i_cat
!=
UNKNOWN_ES
)
VarListAdd
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
VarListAdd
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
i_id
,
psz_text
);
i_id
,
psz_text
);
}
}
void
input_SendEventEsDel
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
)
{
if
(
i_cat
!=
UNKNOWN_ES
)
VarListDel
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
i_id
);
}
/* i_id == -1 will unselect */
/* i_id == -1 will unselect */
void
input_SendEventEsSelect
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
)
void
input_SendEventEsSelect
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
)
{
{
...
@@ -263,15 +263,18 @@ void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
...
@@ -263,15 +263,18 @@ void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
VarListSelect
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
i_id
);
VarListSelect
(
p_input
,
GetEsVarName
(
i_cat
),
INPUT_EVENT_ES
,
i_id
);
}
}
void
input_SendEventTeletext
(
input_thread_t
*
p_input
,
int
i_id
)
void
input_SendEventTeletextAdd
(
input_thread_t
*
p_input
,
int
i_teletext
,
const
char
*
psz_text
)
{
{
vlc_value_t
val
;
VarListAdd
(
p_input
,
"teletext-es"
,
INPUT_EVENT_TELETEXT
,
i_teletext
,
psz_text
);
}
val
.
i_int
=
i_id
;
void
input_SendEventTeletextDel
(
input_thread_t
*
p_input
,
int
i_teletext
)
var_Change
(
p_input
,
"teletext-es"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
{
VarListDel
(
p_input
,
"teletext-es"
,
INPUT_EVENT_TELETEXT
,
i_teletext
);
Trigger
(
p_input
,
INPUT_EVENT_TELETEXT
);
}
void
input_SendEventTeletextSelect
(
input_thread_t
*
p_input
,
int
i_teletext
)
{
VarListSelect
(
p_input
,
"teletext-es"
,
INPUT_EVENT_TELETEXT
,
i_teletext
);
}
}
void
input_SendEventVout
(
input_thread_t
*
p_input
)
void
input_SendEventVout
(
input_thread_t
*
p_input
)
...
...
src/input/event.h
View file @
d4e9d57d
...
@@ -63,7 +63,10 @@ void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id );
...
@@ -63,7 +63,10 @@ void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id );
void
input_SendEventEsAdd
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
,
const
char
*
psz_text
);
void
input_SendEventEsAdd
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
,
const
char
*
psz_text
);
void
input_SendEventEsSelect
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
);
/* i_id == -1 will unselect */
void
input_SendEventEsSelect
(
input_thread_t
*
p_input
,
int
i_cat
,
int
i_id
);
/* i_id == -1 will unselect */
void
input_SendEventTeletext
(
input_thread_t
*
p_input
,
int
i_id
);
void
input_SendEventTeletextAdd
(
input_thread_t
*
p_input
,
int
i_teletext
,
const
char
*
psz_text
);
void
input_SendEventTeletextDel
(
input_thread_t
*
p_input
,
int
i_teletext
);
void
input_SendEventTeletextSelect
(
input_thread_t
*
p_input
,
int
i_teletext
);
/*****************************************************************************
/*****************************************************************************
* Event for decoder.c
* Event for decoder.c
...
...
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