Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d99cd04f
Commit
d99cd04f
authored
May 13, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./plugins/x11/xcommon.c, ./plugins/x11/xvideo.c: --xvideo-chroma flag to
force the XVimage format used.
parent
1ed6cff4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
plugins/x11/xcommon.c
plugins/x11/xcommon.c
+43
-3
plugins/x11/xvideo.c
plugins/x11/xvideo.c
+7
-1
No files found.
plugins/x11/xcommon.c
View file @
d99cd04f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.3
1 2002/05/06 21:05:26 gbazin
Exp $
* $Id: xcommon.c,v 1.3
2 2002/05/13 17:58:08 sam
Exp $
*
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -287,7 +287,12 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
...
@@ -287,7 +287,12 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
*****************************************************************************/
static
int
vout_Create
(
vout_thread_t
*
p_vout
)
static
int
vout_Create
(
vout_thread_t
*
p_vout
)
{
{
char
*
psz_display
;
char
*
psz_display
;
#ifdef MODULE_NAME_IS_xvideo
char
*
psz_chroma
;
u32
i_chroma
=
0
;
boolean_t
b_chroma
=
0
;
#endif
/* Allocate structure */
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
...
@@ -316,12 +321,47 @@ static int vout_Create( vout_thread_t *p_vout )
...
@@ -316,12 +321,47 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_screen
=
DefaultScreen
(
p_vout
->
p_sys
->
p_display
);
p_vout
->
p_sys
->
i_screen
=
DefaultScreen
(
p_vout
->
p_sys
->
p_display
);
#ifdef MODULE_NAME_IS_xvideo
#ifdef MODULE_NAME_IS_xvideo
psz_chroma
=
config_GetPszVariable
(
"xvideo-chroma"
);
if
(
psz_chroma
)
{
if
(
strlen
(
psz_chroma
)
>=
4
)
{
i_chroma
=
(
unsigned
char
)
psz_chroma
[
0
]
<<
0
;
i_chroma
|=
(
unsigned
char
)
psz_chroma
[
1
]
<<
8
;
i_chroma
|=
(
unsigned
char
)
psz_chroma
[
2
]
<<
16
;
i_chroma
|=
(
unsigned
char
)
psz_chroma
[
3
]
<<
24
;
b_chroma
=
1
;
}
free
(
psz_chroma
);
}
if
(
b_chroma
)
{
intf_WarnMsg
(
3
,
"vout info: forcing chroma 0x%.8x (%4.4s)"
,
i_chroma
,
(
char
*
)
&
i_chroma
);
}
else
{
i_chroma
=
p_vout
->
render
.
i_chroma
;
}
/* 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
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_xvport
=
XVideoGetPort
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
render
.
i_chroma
,
i_chroma
,
&
p_vout
->
output
.
i_chroma
);
&
p_vout
->
output
.
i_chroma
);
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
* be cleverer than the user. He knows pretty well what he wants. */
if
(
b_chroma
)
{
XCloseDisplay
(
p_vout
->
p_sys
->
p_display
);
free
(
p_vout
->
p_sys
);
return
1
;
}
/* 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
* XVideo port for an YUY2 picture. We'll need to do an YUV
* XVideo port for an YUY2 picture. We'll need to do an YUV
* conversion, but at least it has got scaling. */
* conversion, but at least it has got scaling. */
...
...
plugins/x11/xvideo.c
View file @
d99cd04f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* xvideo.c : Xvideo plugin for vlc
* xvideo.c : Xvideo plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: xvideo.c,v 1.1
1 2002/04/23 14:16:20
sam Exp $
* $Id: xvideo.c,v 1.1
2 2002/05/13 17:58:08
sam Exp $
*
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
@@ -56,11 +56,17 @@
...
@@ -56,11 +56,17 @@
"Specify the X11 hardware display you want to use.\nBy default vlc will " \
"Specify the X11 hardware display you want to use.\nBy default vlc will " \
"use the value of the DISPLAY environment variable.")
"use the value of the DISPLAY environment variable.")
#define CHROMA_TEXT N_("XVimage chroma format")
#define CHROMA_LONGTEXT N_( \
"Force the XVideo renderer to use a specific chroma format instead of " \
"trying to improve performances by using the most efficient one.")
MODULE_CONFIG_START
MODULE_CONFIG_START
ADD_CATEGORY_HINT
(
N_
(
"Miscellaneous"
),
NULL
)
ADD_CATEGORY_HINT
(
N_
(
"Miscellaneous"
),
NULL
)
ADD_STRING
(
"xvideo-display"
,
NULL
,
NULL
,
DISPLAY_TEXT
,
DISPLAY_LONGTEXT
)
ADD_STRING
(
"xvideo-display"
,
NULL
,
NULL
,
DISPLAY_TEXT
,
DISPLAY_LONGTEXT
)
ADD_INTEGER
(
"xvideo-adaptor"
,
-
1
,
NULL
,
ADAPTOR_TEXT
,
ADAPTOR_LONGTEXT
)
ADD_INTEGER
(
"xvideo-adaptor"
,
-
1
,
NULL
,
ADAPTOR_TEXT
,
ADAPTOR_LONGTEXT
)
ADD_BOOL
(
"xvideo-altfullscreen"
,
NULL
,
ALT_FS_TEXT
,
ALT_FS_LONGTEXT
)
ADD_BOOL
(
"xvideo-altfullscreen"
,
NULL
,
ALT_FS_TEXT
,
ALT_FS_LONGTEXT
)
ADD_STRING
(
"xvideo-chroma"
,
NULL
,
NULL
,
CHROMA_TEXT
,
CHROMA_LONGTEXT
)
MODULE_CONFIG_STOP
MODULE_CONFIG_STOP
MODULE_INIT_START
MODULE_INIT_START
...
...
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