Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
46c5bf59
Commit
46c5bf59
authored
Nov 03, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_es: add defines for priority levels
parent
b20aa40e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
24 additions
and
19 deletions
+24
-19
include/vlc_es.h
include/vlc_es.h
+4
-0
modules/access/bd/bd.c
modules/access/bd/bd.c
+3
-3
modules/access/bluray.c
modules/access/bluray.c
+2
-2
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+2
-2
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+1
-1
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+4
-4
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+2
-2
modules/demux/ts.c
modules/demux/ts.c
+3
-2
modules/video_filter/remoteosd.c
modules/video_filter/remoteosd.c
+1
-1
src/input/es_out.c
src/input/es_out.c
+1
-1
src/misc/es_format.c
src/misc/es_format.c
+1
-1
No files found.
include/vlc_es.h
View file @
46c5bf59
...
...
@@ -320,6 +320,10 @@ typedef struct extra_languages_t
/**
* ES format definition
*/
#define ES_PRIORITY_NOT_SELECTABLE -2
#define ES_PRIORITY_NOT_DEFAULTABLE -1
#define ES_PRIORITY_SELECTABLE_MIN 0
#define ES_PRIORITY_MIN ES_PRIORITY_NOT_SELECTABLE
struct
es_format_t
{
int
i_cat
;
/**< ES category @see es_format_category_e */
...
...
modules/access/bd/bd.c
View file @
46c5bf59
...
...
@@ -1255,7 +1255,7 @@ static es_out_id_t *EsOutAdd( es_out_t *p_out, const es_format_t *p_fmt )
es_format_t
fmt
;
es_format_Copy
(
&
fmt
,
p_fmt
);
fmt
.
i_priority
=
-
2
;
fmt
.
i_priority
=
ES_PRIORITY_NOT_SELECTABLE
;
for
(
int
i
=
0
;
i
<
p_item
->
i_stream
;
i
++
)
{
...
...
@@ -1267,7 +1267,7 @@ static es_out_id_t *EsOutAdd( es_out_t *p_out, const es_format_t *p_fmt )
/* TODO improved priority for higher quality stream ?
* if so, extending stream attributes parsing might be a good idea
*/
fmt
.
i_priority
=
0
;
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
;
#if 0
/* Useless, and beside not sure it is the right thing to do */
...
...
@@ -1297,7 +1297,7 @@ static es_out_id_t *EsOutAdd( es_out_t *p_out, const es_format_t *p_fmt )
}
break
;
}
if
(
fmt
.
i_priority
<
0
)
if
(
fmt
.
i_priority
<
ES_PRIORITY_SELECTABLE_MIN
)
msg_Dbg
(
p_demux
,
"Hiding one stream (pid=%d)"
,
fmt
.
i_id
);
/* */
...
...
modules/access/bluray.c
View file @
46c5bf59
...
...
@@ -525,11 +525,11 @@ static es_out_id_t *esOutAdd(es_out_t *p_out, const es_format_t *p_fmt)
switch
(
fmt
.
i_cat
)
{
case
VIDEO_ES
:
if
(
p_sys
->
i_video_stream
!=
-
1
&&
p_sys
->
i_video_stream
!=
p_fmt
->
i_id
)
fmt
.
i_priority
=
-
2
;
fmt
.
i_priority
=
ES_PRIORITY_NOT_SELECTABLE
;
break
;
case
AUDIO_ES
:
if
(
p_sys
->
i_audio_stream
!=
-
1
&&
p_sys
->
i_audio_stream
!=
p_fmt
->
i_id
)
fmt
.
i_priority
=
-
2
;
fmt
.
i_priority
=
ES_PRIORITY_NOT_SELECTABLE
;
break
;
case
SPU_ES
:
break
;
...
...
modules/access/dshow/dshow.cpp
View file @
46c5bf59
...
...
@@ -1400,7 +1400,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
BYTE
*
pSCC
=
(
BYTE
*
)
CoTaskMemAlloc
(
piSize
);
if
(
NULL
!=
pSCC
)
{
int
i_priority
=
-
1
;
int
i_priority
=
ES_PRIORITY_NOT_DEFAULTABLE
;
for
(
int
i
=
0
;
i
<
piCount
;
++
i
)
{
if
(
SUCCEEDED
(
pSC
->
GetStreamCaps
(
i
,
&
p_mt
,
pSCC
))
)
...
...
@@ -1581,7 +1581,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
}
}
CoTaskMemFree
(
(
LPVOID
)
pSCC
);
if
(
i_priority
>=
0
)
if
(
i_priority
>=
ES_PRIORITY_SELECTABLE_MIN
)
msg_Dbg
(
p_this
,
"EnumDeviceCaps: input pin default format configured"
);
}
}
...
...
modules/demux/avformat/demux.c
View file @
46c5bf59
...
...
@@ -427,7 +427,7 @@ int OpenDemux( vlc_object_t *p_this )
fmt
.
psz_language
=
strdup
(
language
->
value
);
if
(
s
->
disposition
&
AV_DISPOSITION_DEFAULT
)
fmt
.
i_priority
=
1000
;
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
+
1000
;
#ifdef HAVE_AVUTIL_CODEC_ATTACHMENT
if
(
cc
->
codec_type
!=
AVMEDIA_TYPE_ATTACHMENT
)
...
...
modules/demux/mkv/matroska_segment.cpp
View file @
46c5bf59
...
...
@@ -1119,13 +1119,13 @@ void matroska_segment_c::ComputeTrackPriority()
b_has_default_audio
=
true
;
}
if
(
unlikely
(
!
p_tk
->
b_enabled
)
)
p_tk
->
fmt
.
i_priority
=
-
2
;
p_tk
->
fmt
.
i_priority
=
ES_PRIORITY_NOT_SELECTABLE
;
else
if
(
p_tk
->
b_forced
)
p_tk
->
fmt
.
i_priority
=
2
;
p_tk
->
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
+
2
;
else
if
(
p_tk
->
b_default
)
p_tk
->
fmt
.
i_priority
=
1
;
p_tk
->
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
+
1
;
else
p_tk
->
fmt
.
i_priority
=
0
;
p_tk
->
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
;
/* Avoid multivideo tracks when unnecessary */
if
(
p_tk
->
fmt
.
i_cat
==
VIDEO_ES
)
...
...
modules/demux/mp4/mp4.c
View file @
46c5bf59
...
...
@@ -2505,7 +2505,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track
->
b_enable
=
(
(
p_tkhd
->
data
.
p_tkhd
->
i_flags
&
MP4_TRACK_ENABLED
)
!=
0
);
if
(
!
p_track
->
b_enable
)
p_track
->
fmt
.
i_priority
=
-
1
;
p_track
->
fmt
.
i_priority
=
ES_PRIORITY_NOT_DEFAULTABLE
;
p_track
->
i_track_ID
=
p_tkhd
->
data
.
p_tkhd
->
i_track_ID
;
...
...
@@ -2666,7 +2666,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
msg_Warn
(
p_demux
,
"Enabling track[Id 0x%x] (buggy file without enabled track)"
,
p_track
->
i_track_ID
);
p_track
->
b_enable
=
true
;
p_track
->
fmt
.
i_priority
=
0
;
p_track
->
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
;
}
p_track
->
p_es
=
NULL
;
...
...
modules/demux/ts.c
View file @
46c5bf59
...
...
@@ -3527,7 +3527,8 @@ static void PMTSetupEsTeletext( demux_t *p_demux, ts_pid_t *pid,
/* */
const
ts_teletext_page_t
*
p
=
&
p_page
[
i
];
p_es
->
fmt
.
i_priority
=
(
p
->
i_type
==
0x02
||
p
->
i_type
==
0x05
)
?
0
:
-
1
;
p_es
->
fmt
.
i_priority
=
(
p
->
i_type
==
0x02
||
p
->
i_type
==
0x05
)
?
ES_PRIORITY_SELECTABLE_MIN
:
ES_PRIORITY_NOT_DEFAULTABLE
;
p_es
->
fmt
.
psz_language
=
strndup
(
p
->
p_iso639
,
3
);
p_es
->
fmt
.
psz_description
=
strdup
(
vlc_gettext
(
ppsz_teletext_type
[
p
->
i_type
]));
p_es
->
fmt
.
subs
.
teletext
.
i_magazine
=
p
->
i_magazine
;
...
...
@@ -3922,7 +3923,7 @@ static void PMTParseEsIso639( demux_t *p_demux, ts_pid_t *pid,
int
type
=
p_decoded
->
code
[
0
].
i_audio_type
;
pid
->
es
->
fmt
.
psz_description
=
GetAudioTypeDesc
(
p_demux
,
type
);
if
(
type
==
0
)
pid
->
es
->
fmt
.
i_priority
=
1
;
// prioritize normal audio tracks
pid
->
es
->
fmt
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
+
1
;
// prioritize normal audio tracks
pid
->
es
->
fmt
.
i_extra_languages
=
p_decoded
->
i_code_count
-
1
;
if
(
pid
->
es
->
fmt
.
i_extra_languages
>
0
)
...
...
modules/video_filter/remoteosd.c
View file @
46c5bf59
...
...
@@ -308,7 +308,7 @@ static int CreateFilter ( vlc_object_t *p_this )
var_AddCallback
(
p_filter
->
p_libvlc
,
"key-pressed"
,
KeyEvent
,
p_this
);
es_format_Init
(
&
p_filter
->
fmt_out
,
SPU_ES
,
VLC_CODEC_SPU
);
p_filter
->
fmt_out
.
i_priority
=
0
;
p_filter
->
fmt_out
.
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
;
vlc_gcrypt_init
();
...
...
src/input/es_out.c
View file @
46c5bf59
...
...
@@ -1716,7 +1716,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
int
i_cat
=
es
->
fmt
.
i_cat
;
if
(
!
p_sys
->
b_active
||
(
!
b_force
&&
es
->
fmt
.
i_priority
<
0
)
)
(
!
b_force
&&
es
->
fmt
.
i_priority
<
ES_PRIORITY_SELECTABLE_MIN
)
)
{
return
;
}
...
...
src/misc/es_format.c
View file @
46c5bf59
...
...
@@ -296,7 +296,7 @@ void es_format_Init( es_format_t *fmt,
fmt
->
i_level
=
-
1
;
fmt
->
i_id
=
-
1
;
fmt
->
i_group
=
0
;
fmt
->
i_priority
=
0
;
fmt
->
i_priority
=
ES_PRIORITY_SELECTABLE_MIN
;
fmt
->
psz_language
=
NULL
;
fmt
->
psz_description
=
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