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
5d6ac228
Commit
5d6ac228
authored
Mar 08, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: Implement BD_EVENT_AUDIO_STREAM event
parent
2eb87d93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
modules/access/bluray.c
modules/access/bluray.c
+41
-4
No files found.
modules/access/bluray.c
View file @
5d6ac228
...
@@ -115,6 +115,7 @@ struct demux_sys_t
...
@@ -115,6 +115,7 @@ struct demux_sys_t
/* TS stream */
/* TS stream */
es_out_t
*
p_out
;
es_out_t
*
p_out
;
vlc_array_t
es
;
vlc_array_t
es
;
int
i_audio_stream
;
/* Selected audio stream. -1 if default */
stream_t
*
p_parser
;
stream_t
*
p_parser
;
};
};
...
@@ -167,6 +168,7 @@ static int blurayOpen( vlc_object_t *object )
...
@@ -167,6 +168,7 @@ static int blurayOpen( vlc_object_t *object )
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
p_sys
->
current_overlay
=
-
1
;
p_sys
->
current_overlay
=
-
1
;
p_sys
->
i_audio_stream
=
-
1
;
/* init demux info fields */
/* init demux info fields */
p_demux
->
info
.
i_update
=
0
;
p_demux
->
info
.
i_update
=
0
;
...
@@ -383,19 +385,37 @@ static int findEsPairIndexByEs( demux_sys_t *p_sys, es_out_id_t *p_es )
...
@@ -383,19 +385,37 @@ static int findEsPairIndexByEs( demux_sys_t *p_sys, es_out_id_t *p_es )
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
p_out
,
const
es_format_t
*
p_fmt
)
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
p_out
,
const
es_format_t
*
p_fmt
)
{
{
es_out_id_t
*
p_es
=
es_out_Add
(
p_out
->
p_sys
->
p_demux
->
out
,
p_fmt
);
demux_sys_t
*
p_sys
=
p_out
->
p_sys
->
p_demux
->
p_sys
;
es_format_t
fmt
;
es_format_Copy
(
&
fmt
,
p_fmt
);
switch
(
fmt
.
i_cat
)
{
case
VIDEO_ES
:
break
;
case
AUDIO_ES
:
if
(
p_sys
->
i_audio_stream
!=
-
1
&&
p_sys
->
i_audio_stream
!=
p_fmt
->
i_id
)
fmt
.
i_priority
=
-
2
;
break
;
case
SPU_ES
:
break
;
}
es_out_id_t
*
p_es
=
es_out_Add
(
p_out
->
p_sys
->
p_demux
->
out
,
&
fmt
);
if
(
p_fmt
->
i_id
>=
0
)
{
if
(
p_fmt
->
i_id
>=
0
)
{
/* Ensure we are not overriding anything */
/* Ensure we are not overriding anything */
int
idx
=
findEsPairIndex
(
p_
out
->
p_sys
->
p_demux
->
p_
sys
,
p_fmt
->
i_id
);
int
idx
=
findEsPairIndex
(
p_sys
,
p_fmt
->
i_id
);
if
(
idx
==
-
1
)
{
if
(
idx
==
-
1
)
{
fmt_es_pair_t
*
p_pair
=
malloc
(
sizeof
(
*
p_pair
)
);
fmt_es_pair_t
*
p_pair
=
malloc
(
sizeof
(
*
p_pair
)
);
if
(
likely
(
p_pair
!=
NULL
)
)
{
if
(
likely
(
p_pair
!=
NULL
)
)
{
p_pair
->
i_id
=
p_fmt
->
i_id
;
p_pair
->
i_id
=
p_fmt
->
i_id
;
p_pair
->
p_es
=
p_es
;
p_pair
->
p_es
=
p_es
;
vlc_array_append
(
&
p_out
->
p_sys
->
p_demux
->
p_sys
->
es
,
p_pair
);
msg_Err
(
p_out
->
p_sys
->
p_demux
,
"Adding ES %d"
,
p_fmt
->
i_id
);
vlc_array_append
(
&
p_sys
->
es
,
p_pair
);
}
}
}
}
}
}
es_format_Clean
(
&
fmt
);
return
p_es
;
return
p_es
;
}
}
...
@@ -1051,7 +1071,24 @@ static void blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e )
...
@@ -1051,7 +1071,24 @@ static void blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e )
p_sys
->
i_current_clip
=
e
->
param
;
p_sys
->
i_current_clip
=
e
->
param
;
break
;
break
;
case
BD_EVENT_AUDIO_STREAM
:
case
BD_EVENT_AUDIO_STREAM
:
break
;
{
if
(
e
->
param
==
0xFF
)
break
;
BLURAY_TITLE_INFO
*
info
=
bd_get_title_info
(
p_sys
->
bluray
,
bd_get_current_title
(
p_sys
->
bluray
),
0
);
if
(
info
==
NULL
)
break
;
/* The param we get is the real stream id, not an index, ie. it starts from 1 */
int
pid
=
info
->
clips
[
p_sys
->
i_current_clip
].
audio_streams
[
e
->
param
-
1
].
pid
;
int
idx
=
findEsPairIndex
(
p_sys
,
pid
);
if
(
idx
>=
0
)
{
es_out_id_t
*
p_es
=
vlc_array_item_at_index
(
&
p_sys
->
es
,
idx
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_ES
,
p_es
);
}
bd_free_title_info
(
info
);
p_sys
->
i_audio_stream
=
pid
;
break
;
}
case
BD_EVENT_CHAPTER
:
case
BD_EVENT_CHAPTER
:
p_demux
->
info
.
i_update
|=
INPUT_UPDATE_SEEKPOINT
;
p_demux
->
info
.
i_update
|=
INPUT_UPDATE_SEEKPOINT
;
p_demux
->
info
.
i_seekpoint
=
e
->
param
;
p_demux
->
info
.
i_seekpoint
=
e
->
param
;
...
...
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