Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
131a15b6
Commit
131a15b6
authored
Aug 20, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly set rgb mask for xvideo output too.
parent
35a248f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+13
-6
No files found.
modules/video_output/x11/xcommon.c
View file @
131a15b6
...
@@ -138,7 +138,7 @@ static void DestroyCursor ( vout_thread_t * );
...
@@ -138,7 +138,7 @@ static void DestroyCursor ( vout_thread_t * );
static
void
ToggleCursor
(
vout_thread_t
*
);
static
void
ToggleCursor
(
vout_thread_t
*
);
#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
static
int
XVideoGetPort
(
vout_thread_t
*
,
vlc_fourcc_t
,
vlc_fourcc
_t
*
);
static
int
XVideoGetPort
(
vout_thread_t
*
,
vlc_fourcc_t
,
picture_heap
_t
*
);
static
void
XVideoReleasePort
(
vout_thread_t
*
,
int
);
static
void
XVideoReleasePort
(
vout_thread_t
*
,
int
);
#endif
#endif
...
@@ -259,7 +259,7 @@ int Activate ( vlc_object_t *p_this )
...
@@ -259,7 +259,7 @@ int Activate ( vlc_object_t *p_this )
/* Check that we have access to an XVideo port providing this chroma */
/* Check that we have access to an XVideo port providing this chroma */
p_vout
->
p_sys
->
i_xvport
=
XVideoGetPort
(
p_vout
,
VLC2X11_FOURCC
(
i_chroma
),
p_vout
->
p_sys
->
i_xvport
=
XVideoGetPort
(
p_vout
,
VLC2X11_FOURCC
(
i_chroma
),
&
p_vout
->
output
.
i_chroma
);
&
p_vout
->
output
);
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
{
{
/* If a specific chroma format was requested, then we don't try to
/* If a specific chroma format was requested, then we don't try to
...
@@ -276,7 +276,7 @@ int Activate ( vlc_object_t *p_this )
...
@@ -276,7 +276,7 @@ int Activate ( vlc_object_t *p_this )
* conversion, but at least it has got scaling. */
* conversion, but at least it has got scaling. */
p_vout
->
p_sys
->
i_xvport
=
p_vout
->
p_sys
->
i_xvport
=
XVideoGetPort
(
p_vout
,
X11_FOURCC
(
'Y'
,
'U'
,
'Y'
,
'2'
),
XVideoGetPort
(
p_vout
,
X11_FOURCC
(
'Y'
,
'U'
,
'Y'
,
'2'
),
&
p_vout
->
output
.
i_chroma
);
&
p_vout
->
output
);
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
{
{
/* It failed, but it's not completely lost ! We try to open an
/* It failed, but it's not completely lost ! We try to open an
...
@@ -284,7 +284,7 @@ int Activate ( vlc_object_t *p_this )
...
@@ -284,7 +284,7 @@ int Activate ( vlc_object_t *p_this )
* an YUV conversion, but at least it has got scaling. */
* an YUV conversion, but at least it has got scaling. */
p_vout
->
p_sys
->
i_xvport
=
p_vout
->
p_sys
->
i_xvport
=
XVideoGetPort
(
p_vout
,
X11_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
XVideoGetPort
(
p_vout
,
X11_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
&
p_vout
->
output
.
i_chroma
);
&
p_vout
->
output
);
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
if
(
p_vout
->
p_sys
->
i_xvport
<
0
)
{
{
XCloseDisplay
(
p_vout
->
p_sys
->
p_display
);
XCloseDisplay
(
p_vout
->
p_sys
->
p_display
);
...
@@ -821,6 +821,7 @@ static int InitVideo( vout_thread_t *p_vout )
...
@@ -821,6 +821,7 @@ static int InitVideo( vout_thread_t *p_vout )
p_vout
->
fmt_out
=
p_vout
->
fmt_in
;
p_vout
->
fmt_out
=
p_vout
->
fmt_in
;
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
#if XvVersion < 2 || ( XvVersion == 2 && XvRevision < 2 )
switch
(
p_vout
->
output
.
i_chroma
)
switch
(
p_vout
->
output
.
i_chroma
)
{
{
case
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
):
case
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
):
...
@@ -846,6 +847,7 @@ static int InitVideo( vout_thread_t *p_vout )
...
@@ -846,6 +847,7 @@ static int InitVideo( vout_thread_t *p_vout )
#endif
#endif
break
;
break
;
}
}
#endif
#elif defined(MODULE_NAME_IS_x11)
#elif defined(MODULE_NAME_IS_x11)
/* Initialize the output structure: RGB with square pixels, whatever
/* Initialize the output structure: RGB with square pixels, whatever
...
@@ -2461,7 +2463,7 @@ static void ToggleCursor( vout_thread_t *p_vout )
...
@@ -2461,7 +2463,7 @@ static void ToggleCursor( vout_thread_t *p_vout )
* XVideoGetPort: get YUV12 port
* XVideoGetPort: get YUV12 port
*****************************************************************************/
*****************************************************************************/
static
int
XVideoGetPort
(
vout_thread_t
*
p_vout
,
static
int
XVideoGetPort
(
vout_thread_t
*
p_vout
,
vlc_fourcc_t
i_chroma
,
vlc_fourcc_t
*
pi_newchroma
)
vlc_fourcc_t
i_chroma
,
picture_heap_t
*
p_heap
)
{
{
XvAdaptorInfo
*
p_adaptor
;
XvAdaptorInfo
*
p_adaptor
;
unsigned
int
i
;
unsigned
int
i
;
...
@@ -2564,7 +2566,12 @@ static int XVideoGetPort( vout_thread_t *p_vout,
...
@@ -2564,7 +2566,12 @@ static int XVideoGetPort( vout_thread_t *p_vout,
==
Success
)
==
Success
)
{
{
i_selected_port
=
i_port
;
i_selected_port
=
i_port
;
*
pi_newchroma
=
p_formats
[
i_format
].
id
;
p_heap
->
i_chroma
=
p_formats
[
i_format
].
id
;
#if XvVersion > 2 || ( XvVersion == 2 && XvRevision >= 2 )
p_heap
->
i_rmask
=
p_formats
[
i_format
].
red_mask
;
p_heap
->
i_gmask
=
p_formats
[
i_format
].
green_mask
;
p_heap
->
i_bmask
=
p_formats
[
i_format
].
blue_mask
;
#endif
}
}
}
}
...
...
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