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
e4306960
Commit
e4306960
authored
Mar 17, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_ggi: fix return value.
parent
48aef0f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
modules/video_output/ggi.c
modules/video_output/ggi.c
+15
-15
No files found.
modules/video_output/ggi.c
View file @
e4306960
/*****************************************************************************
/*****************************************************************************
* ggi.c : GGI plugin for vlc
* ggi.c : GGI plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000
, 2001
the VideoLAN team
* Copyright (C) 2000
-2009
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Authors: Vincent Seguin <seguin@via.ecp.fr>
...
@@ -104,14 +104,14 @@ static int Create( vlc_object_t *p_this )
...
@@ -104,14 +104,14 @@ static int Create( vlc_object_t *p_this )
/* Allocate structure */
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
return
(
1
)
;
return
VLC_ENOMEM
;
/* Open and initialize device */
/* Open and initialize device */
if
(
OpenDisplay
(
p_vout
)
)
if
(
OpenDisplay
(
p_vout
)
)
{
{
msg_Err
(
p_vout
,
"cannot initialize GGI display"
);
msg_Err
(
p_vout
,
"cannot initialize GGI display"
);
free
(
p_vout
->
p_sys
);
free
(
p_vout
->
p_sys
);
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
...
@@ -120,7 +120,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -120,7 +120,7 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_render
=
NULL
;
p_vout
->
pf_render
=
NULL
;
p_vout
->
pf_display
=
Display
;
p_vout
->
pf_display
=
Display
;
return
(
0
)
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -159,7 +159,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -159,7 +159,7 @@ static int Init( vout_thread_t *p_vout )
default:
default:
msg_Err
(
p_vout
,
"unknown screen depth %i"
,
msg_Err
(
p_vout
,
"unknown screen depth %i"
,
p_vout
->
p_sys
->
i_bits_per_pixel
);
p_vout
->
p_sys
->
i_bits_per_pixel
);
return
0
;
return
VLC_EGENERIC
;
}
}
/* Only useful for bits_per_pixel != 8 */
/* Only useful for bits_per_pixel != 8 */
...
@@ -181,7 +181,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -181,7 +181,7 @@ static int Init( vout_thread_t *p_vout )
if
(
p_pic
==
NULL
)
if
(
p_pic
==
NULL
)
{
{
return
0
;
return
VLC_EGENERIC
;
}
}
/* We know the chroma, allocate a buffer which will be used
/* We know the chroma, allocate a buffer which will be used
...
@@ -229,7 +229,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -229,7 +229,7 @@ static int Init( vout_thread_t *p_vout )
/* Set asynchronous display mode -- usually quite faster */
/* Set asynchronous display mode -- usually quite faster */
ggiAddFlags
(
p_vout
->
p_sys
->
p_display
,
GGIFLAG_ASYNC
);
ggiAddFlags
(
p_vout
->
p_sys
->
p_display
,
GGIFLAG_ASYNC
);
return
(
0
)
;
return
VLC_SUCCESS
;
#undef p_b
#undef p_b
}
}
...
@@ -376,7 +376,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -376,7 +376,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
if
(
ggiInit
()
)
if
(
ggiInit
()
)
{
{
msg_Err
(
p_vout
,
"cannot initialize GGI library"
);
msg_Err
(
p_vout
,
"cannot initialize GGI library"
);
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Open display */
/* Open display */
...
@@ -389,7 +389,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -389,7 +389,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
{
{
msg_Err
(
p_vout
,
"cannot open GGI default display"
);
msg_Err
(
p_vout
,
"cannot open GGI default display"
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Find most appropriate mode */
/* Find most appropriate mode */
...
@@ -413,7 +413,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -413,7 +413,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"cannot set GGI mode"
);
msg_Err
(
p_vout
,
"cannot set GGI mode"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Check buffers properties */
/* Check buffers properties */
...
@@ -429,7 +429,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -429,7 +429,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"double buffering is not possible"
);
msg_Err
(
p_vout
,
"double buffering is not possible"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Check buffer properties */
/* Check buffer properties */
...
@@ -442,7 +442,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -442,7 +442,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"incorrect video memory type"
);
msg_Err
(
p_vout
,
"incorrect video memory type"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Check if buffer needs to be acquired before write */
/* Check if buffer needs to be acquired before write */
...
@@ -463,7 +463,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -463,7 +463,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"cannot set colors"
);
msg_Err
(
p_vout
,
"cannot set colors"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* Set clipping for text */
/* Set clipping for text */
...
@@ -474,13 +474,13 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -474,13 +474,13 @@ static int OpenDisplay( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"cannot set clipping"
);
msg_Err
(
p_vout
,
"cannot set clipping"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
ggiExit
();
ggiExit
();
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
/* FIXME: set palette in 8bpp */
/* FIXME: set palette in 8bpp */
p_vout
->
p_sys
->
i_bits_per_pixel
=
p_b
[
0
]
->
buffer
.
plb
.
pixelformat
->
depth
;
p_vout
->
p_sys
->
i_bits_per_pixel
=
p_b
[
0
]
->
buffer
.
plb
.
pixelformat
->
depth
;
return
(
0
)
;
return
VLC_SUCCESS
;
#undef p_b
#undef p_b
}
}
...
...
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