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
6d633f85
Commit
6d633f85
authored
Jul 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed csri decoder integration.
parent
9c462ffb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
modules/codec/csri.c
modules/codec/csri.c
+17
-21
No files found.
modules/codec/csri.c
View file @
6d633f85
...
...
@@ -61,7 +61,6 @@ vlc_module_end ()
*****************************************************************************/
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
void
DestroySubpicture
(
subpicture_t
*
);
static
void
PreRender
(
spu_t
*
,
subpicture_t
*
,
const
video_format_t
*
);
static
void
UpdateRegions
(
spu_t
*
,
subpicture_t
*
,
const
video_format_t
*
,
mtime_t
);
...
...
@@ -70,7 +69,6 @@ static void UpdateRegions( spu_t *, subpicture_t *,
*****************************************************************************/
struct
decoder_sys_t
{
subpicture_t
*
p_spu_final
;
video_format_t
fmt_cached
;
csri_inst
*
p_instance
;
...
...
@@ -79,6 +77,7 @@ struct decoder_sys_t
void
(
*
pf_push_packet
)(
csri_inst
*
inst
,
const
void
*
packet
,
size_t
packetlen
,
double
pts_start
,
double
pts_end
);
mtime_t
i_max_stop
;
};
struct
subpicture_sys_t
...
...
@@ -129,9 +128,12 @@ static int Create( vlc_object_t *p_this )
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
p_extra
?
strnlen
(
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
)
:
0
,
NULL
);
p_sys
->
i_max_stop
=
VLC_TS_INVALID
;
p_dec
->
fmt_out
.
i_cat
=
SPU_ES
;
p_dec
->
fmt_out
.
i_codec
=
VLC_CODEC_RGBA
;
return
VLC_SUCCESS
;
}
...
...
@@ -167,6 +169,12 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
{
p_sys
->
i_max_stop
=
VLC_TS_INVALID
;
block_Release
(
p_block
);
return
NULL
;
}
*
pp_block
=
NULL
;
if
(
p_block
->
i_buffer
==
0
||
p_block
->
p_buffer
[
0
]
==
'\0'
)
...
...
@@ -206,17 +214,18 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_spu
->
p_sys
->
i_pts
=
p_block
->
i_pts
;
p_spu
->
i_start
=
p_block
->
i_pts
;
p_spu
->
i_stop
=
p_block
->
i_pts
+
p_block
->
i_length
;
p_spu
->
b_ephemer
=
false
;
p_spu
->
b_absolute
=
false
;
p_spu
->
i_stop
=
__MAX
(
p_sys
->
i_max_stop
,
p_block
->
i_pts
+
p_block
->
i_length
);
p_spu
->
b_ephemer
=
true
;
p_spu
->
b_absolute
=
true
;
p_sys
->
i_max_stop
=
p_spu
->
i_stop
;
//msg_Dbg( p_dec, "BS %lf..%lf", p_spu->i_start * 0.000001, p_spu->i_stop * 0.000001);
p_sys
->
pf_push_packet
(
p_sys
->
p_instance
,
p_spu
->
p_sys
->
p_subs_data
,
p_spu
->
p_sys
->
i_subs_len
,
p_
spu
->
i_start
*
0
.
000001
,
p_spu
->
i_stop
*
0
.
000001
);
p_
block
->
i_pts
*
0
.
000001
,
(
p_block
->
i_pts
+
p_block
->
i_length
)
*
0
.
000001
);
p_spu
->
pf_pre_render
=
PreRender
;
p_spu
->
pf_update_regions
=
UpdateRegions
;
p_spu
->
pf_destroy
=
DestroySubpicture
;
...
...
@@ -232,15 +241,6 @@ static void DestroySubpicture( subpicture_t *p_subpic )
free
(
p_subpic
->
p_sys
);
}
static
void
PreRender
(
spu_t
*
p_spu
,
subpicture_t
*
p_subpic
,
const
video_format_t
*
p_fmt
)
{
decoder_t
*
p_dec
=
p_subpic
->
p_sys
->
p_dec
;
p_dec
->
p_sys
->
p_spu_final
=
p_subpic
;
VLC_UNUSED
(
p_fmt
);
VLC_UNUSED
(
p_spu
);
}
static
void
UpdateRegions
(
spu_t
*
p_spu
,
subpicture_t
*
p_subpic
,
const
video_format_t
*
p_fmt
,
mtime_t
i_ts
)
{
...
...
@@ -254,10 +254,6 @@ static void UpdateRegions( spu_t *p_spu, subpicture_t *p_subpic,
subpicture_region_ChainDelete
(
p_subpic
->
p_region
);
p_subpic
->
p_region
=
NULL
;
/* FIXME check why this is needed */
if
(
p_subpic
!=
p_sys
->
p_spu_final
)
return
;
#if 0
msg_Warn( p_dec, "---- fmt: %dx%d %dx%d chroma=%4.4s",
p_fmt->i_width, p_fmt->i_height,
...
...
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