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
4351c7ef
Commit
4351c7ef
authored
Feb 07, 2000
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
. rajout du mode video 'dummy' pour les gens qui n'ont pas de carte
video. Le premier qui se marre se prend une claque.
parent
0a16e81d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
176 additions
and
0 deletions
+176
-0
Makefile
Makefile
+1
-0
src/video_output/video_dummy.c
src/video_output/video_dummy.c
+175
-0
No files found.
Makefile
View file @
4351c7ef
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
# Video output settings
# Video output settings
VIDEO
=
X11
VIDEO
=
X11
#VIDEO=DGA (not yet supported)
#VIDEO=DGA (not yet supported)
#VIDEO=DUMMY
#VIDEO=FB
#VIDEO=FB
#VIDEO=GGI
#VIDEO=GGI
#VIDEO=BEOS (not yet supported)
#VIDEO=BEOS (not yet supported)
...
...
src/video_output/video_dummy.c
0 → 100644
View file @
4351c7ef
/******************************************************************************
* vout_dummy.c: Dummy video output display method for testing purposes
* (c)2000 VideoLAN
******************************************************************************/
/******************************************************************************
* Preamble
******************************************************************************/
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/uio.h>
/* for input.h */
#include "config.h"
#include "common.h"
#include "mtime.h"
#include "vlc_thread.h"
#include "input.h"
#include "video.h"
#include "video_output.h"
#include "video_sys.h"
#include "intf_msg.h"
#include "main.h"
#define WIDTH 128
#define HEIGHT 64
#define BITS_PER_PLANE 16
#define BYTES_PER_PIXEL 2
/******************************************************************************
* vout_sys_t: dummy video output method descriptor
******************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the dummy specific properties of an output thread.
******************************************************************************/
typedef
struct
vout_sys_s
{
/* Dummy video memory */
byte_t
*
p_video
;
/* base adress */
size_t
i_page_size
;
/* page size */
}
vout_sys_t
;
/******************************************************************************
* Local prototypes
******************************************************************************/
static
int
DummyOpenDisplay
(
vout_thread_t
*
p_vout
);
static
void
DummyCloseDisplay
(
vout_thread_t
*
p_vout
);
/******************************************************************************
* vout_SysCreate: allocates dummy video thread output method
******************************************************************************
* This function allocates and initializes a dummy vout method.
******************************************************************************/
int
vout_SysCreate
(
vout_thread_t
*
p_vout
,
char
*
psz_display
,
int
i_root_window
)
{
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
{
intf_ErrMsg
(
"error: %s
\n
"
,
strerror
(
ENOMEM
)
);
return
(
1
);
}
/* Open and initialize device */
if
(
DummyOpenDisplay
(
p_vout
)
)
{
intf_ErrMsg
(
"vout error: can't open display
\n
"
);
free
(
p_vout
->
p_sys
);
return
(
1
);
}
return
(
0
);
}
/******************************************************************************
* vout_SysInit: initialize dummy video thread output method
******************************************************************************/
int
vout_SysInit
(
vout_thread_t
*
p_vout
)
{
return
(
0
);
}
/******************************************************************************
* vout_SysEnd: terminate dummy video thread output method
******************************************************************************/
void
vout_SysEnd
(
vout_thread_t
*
p_vout
)
{
;
}
/******************************************************************************
* vout_SysDestroy: destroy dummy video thread output method
******************************************************************************
* Terminate an output method created by vout_DummyCreateOutputMethod
******************************************************************************/
void
vout_SysDestroy
(
vout_thread_t
*
p_vout
)
{
DummyCloseDisplay
(
p_vout
);
free
(
p_vout
->
p_sys
);
}
/******************************************************************************
* vout_SysManage: handle dummy events
******************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
******************************************************************************/
int
vout_SysManage
(
vout_thread_t
*
p_vout
)
{
return
0
;
}
/******************************************************************************
* vout_SysDisplay: displays previously rendered output
******************************************************************************
* This function send the currently rendered image to dummy image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame.
******************************************************************************/
void
vout_SysDisplay
(
vout_thread_t
*
p_vout
)
{
;
}
/* following functions are local */
/******************************************************************************
* DummyOpenDisplay: open and initialize dummy device
******************************************************************************
* ?? The framebuffer mode is only provided as a fast and efficient way to
* display video, providing the card is configured and the mode ok. It is
* not portable, and is not supposed to work with many cards. Use at your
* own risk !
******************************************************************************/
static
int
DummyOpenDisplay
(
vout_thread_t
*
p_vout
)
{
p_vout
->
i_width
=
WIDTH
;
p_vout
->
i_height
=
HEIGHT
;
p_vout
->
i_screen_depth
=
BITS_PER_PLANE
;
p_vout
->
i_bytes_per_pixel
=
BYTES_PER_PIXEL
;
p_vout
->
i_bytes_per_line
=
WIDTH
*
BYTES_PER_PIXEL
;
p_vout
->
p_sys
->
i_page_size
=
WIDTH
*
HEIGHT
*
BYTES_PER_PIXEL
;
/* Map two framebuffers a the very beginning of the fb */
p_vout
->
p_sys
->
p_video
=
malloc
(
p_vout
->
p_sys
->
i_page_size
*
2
);
if
(
(
int
)
p_vout
->
p_sys
->
p_video
==
-
1
)
{
intf_ErrMsg
(
"vout error: can't map video memory (%s)
\n
"
,
strerror
(
errno
)
);
return
(
1
);
}
/* Set and initialize buffers */
vout_SetBuffers
(
p_vout
,
p_vout
->
p_sys
->
p_video
,
p_vout
->
p_sys
->
p_video
+
p_vout
->
p_sys
->
i_page_size
);
return
(
0
);
}
/******************************************************************************
* DummyCloseDisplay: close and reset dummy device
******************************************************************************
* Returns all resources allocated by DummyOpenDisplay and restore the original
* state of the device.
******************************************************************************/
static
void
DummyCloseDisplay
(
vout_thread_t
*
p_vout
)
{
free
(
p_vout
->
p_sys
->
p_video
);
}
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