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
6deffd85
Commit
6deffd85
authored
Aug 09, 2013
by
Petri Hintukainen
Committed by
Rafaël Carré
Aug 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: make overlay helper function interfaces ARGB compatible
Signed-off-by:
Rafaël Carré
<
funman@videolan.org
>
parent
f2838593
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
modules/access/bluray.c
modules/access/bluray.c
+32
-32
No files found.
modules/access/bluray.c
View file @
6deffd85
...
...
@@ -725,7 +725,7 @@ static void blurayCloseAllOverlays(demux_t *p_demux)
* If is has already been acquired, the overlay has already been sent to it,
* therefore, we only flag the overlay as "Outdated"
*/
static
void
blurayActivateOverlay
(
demux_t
*
p_demux
,
const
BD_OVERLAY
*
const
ov
)
static
void
blurayActivateOverlay
(
demux_t
*
p_demux
,
int
plane
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
...
...
@@ -733,12 +733,12 @@ static void blurayActivateOverlay(demux_t *p_demux, const BD_OVERLAY* const ov)
* If the overlay is already displayed, mark the picture as outdated.
* We must NOT use vout_PutSubpicture if a picture is already displayed.
*/
vlc_mutex_lock
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
if
((
p_sys
->
p_overlays
[
ov
->
plane
]
->
status
==
Displayed
||
p_sys
->
p_overlays
[
ov
->
plane
]
->
status
==
Outdated
)
vlc_mutex_lock
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
if
((
p_sys
->
p_overlays
[
plane
]
->
status
==
Displayed
||
p_sys
->
p_overlays
[
plane
]
->
status
==
Outdated
)
&&
p_sys
->
p_vout
)
{
p_sys
->
p_overlays
[
ov
->
plane
]
->
status
=
Outdated
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
p_sys
->
p_overlays
[
plane
]
->
status
=
Outdated
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
return
;
}
/*
...
...
@@ -746,43 +746,43 @@ static void blurayActivateOverlay(demux_t *p_demux, const BD_OVERLAY* const ov)
* the blurayDemuxMenu will send it to vout, as it may be unavailable when
* the overlay is computed
*/
p_sys
->
current_overlay
=
ov
->
plane
;
p_sys
->
p_overlays
[
ov
->
plane
]
->
status
=
ToDisplay
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
p_sys
->
current_overlay
=
plane
;
p_sys
->
p_overlays
[
plane
]
->
status
=
ToDisplay
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
}
static
void
blurayInitOverlay
(
demux_t
*
p_demux
,
const
BD_OVERLAY
*
const
ov
)
static
void
blurayInitOverlay
(
demux_t
*
p_demux
,
int
plane
,
int
width
,
int
height
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
assert
(
p_sys
->
p_overlays
[
ov
->
plane
]
==
NULL
);
assert
(
p_sys
->
p_overlays
[
plane
]
==
NULL
);
p_sys
->
p_overlays
[
ov
->
plane
]
=
calloc
(
1
,
sizeof
(
**
p_sys
->
p_overlays
));
if
(
unlikely
(
!
p_sys
->
p_overlays
[
ov
->
plane
]))
p_sys
->
p_overlays
[
plane
]
=
calloc
(
1
,
sizeof
(
**
p_sys
->
p_overlays
));
if
(
unlikely
(
!
p_sys
->
p_overlays
[
plane
]))
return
;
subpicture_updater_sys_t
*
p_upd_sys
=
malloc
(
sizeof
(
*
p_upd_sys
));
if
(
unlikely
(
!
p_upd_sys
))
{
free
(
p_sys
->
p_overlays
[
ov
->
plane
]);
p_sys
->
p_overlays
[
ov
->
plane
]
=
NULL
;
free
(
p_sys
->
p_overlays
[
plane
]);
p_sys
->
p_overlays
[
plane
]
=
NULL
;
return
;
}
/* two references: vout + demux */
p_sys
->
p_overlays
[
ov
->
plane
]
->
released_once
=
ATOMIC_FLAG_INIT
;
p_sys
->
p_overlays
[
plane
]
->
released_once
=
ATOMIC_FLAG_INIT
;
p_upd_sys
->
p_overlay
=
p_sys
->
p_overlays
[
ov
->
plane
];
p_upd_sys
->
p_overlay
=
p_sys
->
p_overlays
[
plane
];
subpicture_updater_t
updater
=
{
.
pf_validate
=
subpictureUpdaterValidate
,
.
pf_update
=
subpictureUpdaterUpdate
,
.
pf_destroy
=
subpictureUpdaterDestroy
,
.
p_sys
=
p_upd_sys
,
};
vlc_mutex_init
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_pic
=
subpicture_New
(
&
updater
);
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_pic
->
i_original_picture_width
=
ov
->
w
;
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_pic
->
i_original_picture_height
=
ov
->
h
;
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_pic
->
b_ephemer
=
true
;
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_pic
->
b_absolute
=
true
;
vlc_mutex_init
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
p_sys
->
p_overlays
[
plane
]
->
p_pic
=
subpicture_New
(
&
updater
);
p_sys
->
p_overlays
[
plane
]
->
p_pic
->
i_original_picture_width
=
width
;
p_sys
->
p_overlays
[
plane
]
->
p_pic
->
i_original_picture_height
=
height
;
p_sys
->
p_overlays
[
plane
]
->
p_pic
->
b_ephemer
=
true
;
p_sys
->
p_overlays
[
plane
]
->
p_pic
->
b_absolute
=
true
;
}
/**
...
...
@@ -793,16 +793,16 @@ static void blurayInitOverlay(demux_t *p_demux, const BD_OVERLAY* const ov)
* the subpicture_updater_t::pf_update
* This doesn't destroy the subpicture, as the overlay may be used again by libbluray.
*/
static
void
blurayClearOverlay
(
demux_t
*
p_demux
,
const
BD_OVERLAY
*
const
ov
)
static
void
blurayClearOverlay
(
demux_t
*
p_demux
,
int
plane
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
vlc_mutex_lock
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
subpicture_region_ChainDelete
(
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_regions
);
p_sys
->
p_overlays
[
ov
->
plane
]
->
p_regions
=
NULL
;
p_sys
->
p_overlays
[
ov
->
plane
]
->
status
=
Outdated
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
ov
->
plane
]
->
lock
);
subpicture_region_ChainDelete
(
p_sys
->
p_overlays
[
plane
]
->
p_regions
);
p_sys
->
p_overlays
[
plane
]
->
p_regions
=
NULL
;
p_sys
->
p_overlays
[
plane
]
->
status
=
Outdated
;
vlc_mutex_unlock
(
&
p_sys
->
p_overlays
[
plane
]
->
lock
);
}
/*
...
...
@@ -887,13 +887,13 @@ static void blurayOverlayProc(void *ptr, const BD_OVERLAY *const overlay)
switch
(
overlay
->
cmd
)
{
case
BD_OVERLAY_INIT
:
msg_Info
(
p_demux
,
"Initializing overlay"
);
blurayInitOverlay
(
p_demux
,
overlay
);
blurayInitOverlay
(
p_demux
,
overlay
->
plane
,
overlay
->
w
,
overlay
->
h
);
break
;
case
BD_OVERLAY_CLEAR
:
blurayClearOverlay
(
p_demux
,
overlay
);
blurayClearOverlay
(
p_demux
,
overlay
->
plane
);
break
;
case
BD_OVERLAY_FLUSH
:
blurayActivateOverlay
(
p_demux
,
overlay
);
blurayActivateOverlay
(
p_demux
,
overlay
->
plane
);
break
;
case
BD_OVERLAY_DRAW
:
blurayDrawOverlay
(
p_demux
,
overlay
);
...
...
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