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
bbca512a
Commit
bbca512a
authored
Mar 08, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: Add an ES manipulation skeleton.
parent
3aa0de6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
2 deletions
+66
-2
modules/access/bluray.c
modules/access/bluray.c
+66
-2
No files found.
modules/access/bluray.c
View file @
bbca512a
...
@@ -112,6 +112,7 @@ struct demux_sys_t
...
@@ -112,6 +112,7 @@ struct demux_sys_t
vout_thread_t
*
p_vout
;
vout_thread_t
*
p_vout
;
/* TS stream */
/* TS stream */
es_out_t
*
p_out
;
stream_t
*
p_parser
;
stream_t
*
p_parser
;
};
};
...
@@ -123,6 +124,8 @@ struct subpicture_updater_sys_t
...
@@ -123,6 +124,8 @@ struct subpicture_updater_sys_t
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
static
es_out_t
*
esOutNew
(
demux_t
*
p_demux
);
static
int
blurayControl
(
demux_t
*
,
int
,
va_list
);
static
int
blurayControl
(
demux_t
*
,
int
,
va_list
);
static
int
blurayDemux
(
demux_t
*
);
static
int
blurayDemux
(
demux_t
*
);
...
@@ -282,6 +285,11 @@ static int blurayOpen( vlc_object_t *object )
...
@@ -282,6 +285,11 @@ static int blurayOpen( vlc_object_t *object )
}
}
}
}
p_sys
->
p_out
=
esOutNew
(
p_demux
);
if
(
unlikely
(
p_sys
->
p_out
==
NULL
))
{
goto
error
;
}
blurayResetParser
(
p_demux
);
blurayResetParser
(
p_demux
);
if
(
!
p_sys
->
p_parser
)
{
if
(
!
p_sys
->
p_parser
)
{
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
...
@@ -326,7 +334,8 @@ static void blurayClose( vlc_object_t *object )
...
@@ -326,7 +334,8 @@ static void blurayClose( vlc_object_t *object )
vlc_object_release
(
p_sys
->
p_input
);
vlc_object_release
(
p_sys
->
p_input
);
if
(
p_sys
->
p_parser
)
if
(
p_sys
->
p_parser
)
stream_Delete
(
p_sys
->
p_parser
);
stream_Delete
(
p_sys
->
p_parser
);
if
(
p_sys
->
p_out
!=
NULL
)
es_out_Delete
(
p_sys
->
p_out
);
/* Titles */
/* Titles */
for
(
unsigned
int
i
=
0
;
i
<
p_sys
->
i_title
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
p_sys
->
i_title
;
i
++
)
vlc_input_title_Delete
(
p_sys
->
pp_title
[
i
]);
vlc_input_title_Delete
(
p_sys
->
pp_title
[
i
]);
...
@@ -335,6 +344,61 @@ static void blurayClose( vlc_object_t *object )
...
@@ -335,6 +344,61 @@ static void blurayClose( vlc_object_t *object )
free
(
p_sys
);
free
(
p_sys
);
}
}
/*****************************************************************************
* Elementary streams handling
*****************************************************************************/
struct
es_out_sys_t
{
demux_t
*
p_demux
;
};
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
p_out
,
const
es_format_t
*
p_fmt
)
{
return
es_out_Add
(
p_out
->
p_sys
->
p_demux
->
out
,
p_fmt
);
}
static
int
esOutSend
(
es_out_t
*
p_out
,
es_out_id_t
*
p_es
,
block_t
*
p_block
)
{
return
es_out_Send
(
p_out
->
p_sys
->
p_demux
->
out
,
p_es
,
p_block
);
}
static
void
esOutDel
(
es_out_t
*
p_out
,
es_out_id_t
*
p_es
)
{
es_out_Del
(
p_out
->
p_sys
->
p_demux
->
out
,
p_es
);
}
static
int
esOutControl
(
es_out_t
*
p_out
,
int
i_query
,
va_list
args
)
{
return
es_out_vaControl
(
p_out
->
p_sys
->
p_demux
->
out
,
i_query
,
args
);
}
static
void
esOutDestroy
(
es_out_t
*
p_out
)
{
free
(
p_out
->
p_sys
);
free
(
p_out
);
}
static
es_out_t
*
esOutNew
(
demux_t
*
p_demux
)
{
es_out_t
*
p_out
=
malloc
(
sizeof
(
*
p_out
)
);
if
(
unlikely
(
p_out
==
NULL
)
)
return
NULL
;
p_out
->
pf_add
=
&
esOutAdd
;
p_out
->
pf_control
=
&
esOutControl
;
p_out
->
pf_del
=
&
esOutDel
;
p_out
->
pf_destroy
=
&
esOutDestroy
;
p_out
->
pf_send
=
&
esOutSend
;
p_out
->
p_sys
=
malloc
(
sizeof
(
*
p_out
->
p_sys
)
);
if
(
unlikely
(
p_out
->
p_sys
==
NULL
)
)
{
free
(
p_out
);
return
NULL
;
}
p_out
->
p_sys
->
p_demux
=
p_demux
;
return
p_out
;
}
/*****************************************************************************
/*****************************************************************************
* subpicture_updater_t functions:
* subpicture_updater_t functions:
*****************************************************************************/
*****************************************************************************/
...
@@ -747,7 +811,7 @@ static void blurayResetParser( demux_t *p_demux )
...
@@ -747,7 +811,7 @@ static void blurayResetParser( demux_t *p_demux )
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
p_parser
)
if
(
p_sys
->
p_parser
)
stream_Delete
(
p_sys
->
p_parser
);
stream_Delete
(
p_sys
->
p_parser
);
p_sys
->
p_parser
=
stream_DemuxNew
(
p_demux
,
"ts"
,
p_
demux
->
out
);
p_sys
->
p_parser
=
stream_DemuxNew
(
p_demux
,
"ts"
,
p_
sys
->
p_
out
);
if
(
!
p_sys
->
p_parser
)
{
if
(
!
p_sys
->
p_parser
)
{
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
}
}
...
...
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