Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
35e8bb43
Commit
35e8bb43
authored
Jan 17, 2000
by
Vincent Seguin
Browse files
Resize sous X11, gestion du screen saver.
Nettoyage de config.h Nettoyage de vout et intf
parent
023206d0
Changes
12
Hide whitespace changes
Inline
Side-by-side
.cvsignore
View file @
35e8bb43
.*
*.ts
core
dep
gmon.out
...
...
Makefile
View file @
35e8bb43
...
...
@@ -209,10 +209,6 @@ misc_obj = misc/mtime.o \
misc/rsc_files.o
\
misc/netutils.o
ifeq
($(VIDEO),X11)
misc_obj
+=
misc/xutils.o
endif
ifeq
($(ARCH),MMX)
ASM_OBJ
=
video_decoder_ref/idctmmx.o
\
video_output/yuv_mmx.o
...
...
include/config.h
View file @
35e8bb43
...
...
@@ -16,7 +16,6 @@
* + variable names should end with '_VAR'
* + environment variable default value should end with '_DEFAULT'
* + values having a special meaning with '_VAL'
* + complete environment strings with '_ENV'
*
*/
...
...
@@ -24,26 +23,29 @@
* Program information
*******************************************************************************/
/* Program options */
/* Program options - this part will produce a copyright message with compilation
* options informations, based on some definines set in the Makefile - do not
* edit */
#if defined(VIDEO_X11)
#define VIDEO_OPTIONS "X11"
#define VIDEO_OPTIONS
"X11"
#elif defined(VIDEO_FB)
#define VIDEO_OPTIONS "Framebuffer"
#define VIDEO_OPTIONS
"Framebuffer"
#elif defined(VIDEO_GGI)
#define VIDEO_OPTIONS "GGI"
#define VIDEO_OPTIONS
"GGI"
#else
#define VIDEO_OPTIONS ""
#define VIDEO_OPTIONS
""
#endif
#if defined(HAVE_MMX)
#define ARCH_OPTIONS "MMX"
#define ARCH_OPTIONS
"MMX"
#else
#define ARCH_OPTIONS ""
#define ARCH_OPTIONS
""
#endif
#define PROGRAM_OPTIONS VIDEO_OPTIONS " " ARCH_OPTIONS
#define PROGRAM_OPTIONS
VIDEO_OPTIONS " " ARCH_OPTIONS
/* Program version and copyright message */
#define PROGRAM_VERSION "1.0-dev"
#define COPYRIGHT_MESSAGE "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - " PROGRAM_OPTIONS " - (c)1999-2000 VideoLAN\n"
#define PROGRAM_VERSION "DR 2.1"
#define COPYRIGHT_MESSAGE "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - " \
PROGRAM_OPTIONS " - (c)1999 VideoLAN"
/*******************************************************************************
* General compilation options
...
...
@@ -59,7 +61,8 @@
* and might cause problems with some very weird streams. */
//#define MPEG2_COMPLIANT
/* Define for profiling support */
/* Define for profiling and statistics support - such informations, like FPS
* or pictures count won't be available if it not set */
#define STATS
/* Define for unthreaded version of the program - ?? not yet implemented */
...
...
@@ -72,11 +75,8 @@
/* General debugging support */
#define DEBUG
/* Extended debugging support - in this mode, debugging messages will have their
* date and context printed */
#define DEBUG_CONTEXT
/* Modules specific debugging */
/* Modules specific debugging - this will produce a lot of output, but can be
* usefull to track a bug */
#define DEBUG_INTF
#define DEBUG_INPUT
#define DEBUG_AUDIO
...
...
@@ -85,39 +85,49 @@
/* Debugging log file - if defined, a file can be used to store all messages. If
* DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
* will not appear on the screen */
#define DEBUG_LOG "vlc-debug.log"
#define DEBUG_LOG_ONLY
#define DEBUG_LOG "vlc-debug.log"
#define DEBUG_LOG_ONLY
/*******************************************************************************
*
Common settings
*
General configuration
*******************************************************************************/
/* Automagically spawn input, audio and video threads ? */
// ?? used ?
#define AUTO_SPAWN
/* Startup script */
#define INTF_INIT_SCRIPT_VAR "vlc_init"
#define INTF_INIT_SCRIPT_DEFAULT "vlc.init"
/* ?? */
#define THREAD_SLEEP 100000
/* When creating or destroying threads in blocking mode, delay to poll thread
* status */
#define THREAD_SLEEP 10000
/*
*
X11/XLib settings
*
Decoders FIFO configuration
*/
/* Default font used when a wished font could not be loaded - note that this
* font should be universal, else the program will exit when it can't find
* a font */
#define X11_DEFAULT_FONT "fixed"
/* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
#define FIFO_SIZE 1023
/*******************************************************************************
* Interface configuration
*******************************************************************************/
/* Environment variable used to store startup script name and default value */
#define INTF_INIT_SCRIPT_VAR "vlc_init"
#define INTF_INIT_SCRIPT_DEFAULT "vlc.init"
/* Base delay in micro second for interface sleeps */
#define INTF_IDLE_SLEEP 100000
/*
*
Decoders FIFO configuration
*
X11 settings
*/
/* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
#define FIFO_SIZE 1023
/* Title of the X11 window */
#define VOUT_TITLE "VideoLAN Client"
/* Environment variable used in place of DISPLAY if available */
#define ENV_VLC_DISPLAY "vlc_DISPLAY"
/*******************************************************************************
* Input thread configuration
...
...
@@ -218,9 +228,6 @@
* Default settings for video output threads
*/
/* Title of the window */
#define VOUT_TITLE "VideoLAN Client"
/* Default dimensions for display window - these dimensions are the standard
* width and height for broadcasted MPEG-2 */
#define VOUT_WIDTH 544
...
...
@@ -234,9 +241,6 @@
#define VOUT_GRAYSCALE_VAR "vlc_grayscale"
#define VOUT_GRAYSCALE_DEFAULT 0
/* Number of pictures required to computes the FPS rate */
#define VOUT_FPS_SAMPLES 5
/*
* Time settings
*/
...
...
@@ -254,6 +258,12 @@
/* ?? this constant will probably evolve to a calculated value */
#define VOUT_DISPLAY_DELAY 100000
/* Delay (in microseconds) between increments in idle levels */
#define VOUT_IDLE_DELAY 5000000
/* Number of pictures required to computes the FPS rate */
#define VOUT_FPS_SAMPLES 5
/*
* Framebuffer settings
*/
...
...
@@ -271,8 +281,8 @@
/* Font maximum and minimum characters - characters outside this range are not
* printed - maximum range is 1-256 */
#define VOUT_MIN_CHAR 1
#define VOUT_MAX_CHAR 128
#define VOUT_MIN_CHAR
1
#define VOUT_MAX_CHAR
128
/*******************************************************************************
* Video parser configuration
...
...
@@ -310,66 +320,7 @@
#define GDEC_IDLE_SLEEP 100000
/*******************************************************************************
* Interface (main) thread configuration
*******************************************************************************/
/*
* Interface configuration
*/
/* Base delay in micro second for interface sleeps ?? */
#define INTF_IDLE_SLEEP 100000
/* Maximal number of arguments on a command line, including the function name */
#define INTF_MAX_ARGS 20
/* Maximal size of a command line in a script */
#define INTF_MAX_CMD_SIZE 240
/*
* X11 interface properties
*/
#define INTF_APP_CLASS "vlc"
#define INTF_APP_NAME "vlc"
/*
* X11 console properties
*/
/* Title of the X11 console interface window */
#define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
/* Welcome message: this message is always displayed when a new console is
* openned */
#define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
/* Background pixmap - if not defined, no pixmap is used */
#define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
/* Default X11 console interface window geometry. It should at least give a
* default size */
#define INTF_XCONSOLE_GEOMETRY "400x100"
/* Font used in console. If first font is not found, the fallback font is
* used. Therefore, the fallback font should be a universal one. */
#define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
/* Number of memorized lines in X11 console window text zone */
#define INTF_CONSOLE_MAX_TEXT 100
/* Maximal number of commands which can be saved in history list */
#define INTF_CONSOLE_MAX_HISTORY 20
/* Maximum width of a line in an X11 console window. If a larger line is
* printed, it will be wrapped. */
#define INTF_XCONSOLE_MAX_LINE_WIDTH 120
#define ENV_VLC_DISPLAY "vlc_DISPLAY"
#define INTF_MAIN_WIDTH 600
#define INTF_MAIN_HEIGHT 600
/*******************************************************************************
* Interface messages functions
* Messages and console interfaces configuration
*******************************************************************************/
/* Maximal size of the message queue - in case of overflow, all messages in the
...
...
@@ -384,7 +335,19 @@
/* Format of the header for debug messages. The arguments following this header
* are the file (char *), the function (char *) and the line (int) in which the
* message function was called */
#define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
#define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
/* Maximal number of arguments on a command line, including the function name */
#define INTF_MAX_ARGS 20
/* Maximal size of a command line in a script */
#define INTF_MAX_CMD_SIZE 240
/* Number of memorized lines in console window text zone */
#define INTF_CONSOLE_MAX_TEXT 100
/* Maximal number of commands which can be saved in history list */
#define INTF_CONSOLE_MAX_HISTORY 20
/*******************************************************************************
* Network and VLAN management
...
...
include/video_output.h
View file @
35e8bb43
...
...
@@ -35,15 +35,17 @@ typedef struct vout_thread_s
float
f_x_ratio
;
/* horizontal display ratio */
float
f_y_ratio
;
/* vertical display ratio */
/* New size for resizeable windows - they may be ignored or handled by
* vout_SysManage */
int
i_new_width
;
/* new width */
int
i_new_height
;
/* new height */
#ifdef STATS
/* Statistics */
/* Statistics
- these numbers are not supposed to be accurate
*/
count_t
c_loops
;
/* number of loops */
count_t
c_idle_loops
;
/* number of idle loops */
count_t
c_pictures
;
/* number of pictures added to heap */
/* FPS */
mtime_t
fps_sample
[
VOUT_FPS_SAMPLES
];
/* samples dates */
int
i_fps_index
;
/* index in samples */
count_t
c_fps_samples
;
/* picture counts */
mtime_t
fps_sample
[
VOUT_FPS_SAMPLES
];
/* FPS samples dates */
#endif
#ifdef DEBUG_VIDEO
...
...
@@ -55,7 +57,6 @@ typedef struct vout_thread_s
p_vout_sys_t
p_sys
;
/* system output method */
/* Video heap */
int
i_pictures
;
/* current heap size */
picture_t
p_picture
[
VOUT_MAX_PICTURES
];
/* pictures */
/* YUV translation tables, for 15,16 and 24/32 bpp displays. 16 bits and 32
...
...
include/vlc.h
View file @
35e8bb43
...
...
@@ -49,7 +49,6 @@
#include "vlc_thread.h"
#include "netutils.h"
#include "debug.h"
#include "xutils.h"
#include "intf_msg.h"
/* Input */
...
...
include/xutils.h
deleted
100644 → 0
View file @
023206d0
/*******************************************************************************
* xutils.h: X11 utilities
* (c)1999 VideoLAN
*******************************************************************************
* This library includes many usefull functions to perform simple operations
* using Xlib.
*******************************************************************************
* Required headers:
* <X11/Xlib.h>
*******************************************************************************/
/*******************************************************************************
* Prototypes
*******************************************************************************/
int
XTryLoadFont
(
Display
*
p_display
,
char
*
psz_font
,
XFontStruct
**
p_font
);
void
XEnableScreenSaver
(
Display
*
p_display
);
void
XDisableScreenSaver
(
Display
*
p_display
);
src/interface/main.c
View file @
35e8bb43
...
...
@@ -116,7 +116,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
intf_MsgDestroy
();
return
(
errno
);
}
intf_MsgImm
(
COPYRIGHT_MESSAGE
);
/* print welcome message */
intf_MsgImm
(
COPYRIGHT_MESSAGE
"
\n
"
);
/* print welcome message */
/*
* Initialize shared resources and libraries
...
...
src/misc/mtime.c
View file @
35e8bb43
...
...
@@ -41,10 +41,6 @@ char *mstrtime( char *psz_buffer, mtime_t date )
******************************************************************************
* Uses the gettimeofday() function when possible (1 MHz resolution) or the
* ftime() function (1 kHz resolution).
******************************************************************************
* to-do list: ??
* implement the function when gettimeofday is not available
* this function should be decalred as inline
******************************************************************************/
mtime_t
mdate
(
void
)
{
...
...
@@ -63,11 +59,6 @@ mtime_t mdate( void )
* This function uses select() and an system date function to wake up at a
* precise date. It should be used for process synchronization. If current date
* is posterior to wished date, the function returns immediately.
******************************************************************************
* to-do list:
* implement the function when gettimeofday is not available
* optimize delay calculation
* ?? declare as inline
******************************************************************************/
void
mwait
(
mtime_t
date
)
{
...
...
src/misc/xutils.c
deleted
100644 → 0
View file @
023206d0
/*******************************************************************************
* xutils.c: X11 utilities
* (c)1998 VideoLAN
*******************************************************************************
* This library includes many usefull functions to perform simple operations
* using Xlib.
*******************************************************************************/
/*******************************************************************************
* Preamble
*******************************************************************************/
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
#include "config.h"
#include "common.h"
#include "mtime.h"
#include "intf_msg.h"
#include "xutils.h"
/*******************************************************************************
* XTryLoadFont: try to load a font and a fallback font
*******************************************************************************
* This function try to load a font, and, on failure, a default fallback font
* (usually 'fixed'). This function returns 0 on success, >0 if it failed but
* the default font
*******************************************************************************/
int
XTryLoadFont
(
Display
*
p_display
,
char
*
psz_font
,
XFontStruct
**
p_font
)
{
*
p_font
=
XLoadQueryFont
(
p_display
,
psz_font
);
if
(
*
p_font
)
/* success */
{
return
(
0
);
}
intf_DbgMsg
(
"X11 error: can't load font `%s', using `%s' instead
\n
"
,
p_font
,
X11_DEFAULT_FONT
);
*
p_font
=
XLoadQueryFont
(
p_display
,
X11_DEFAULT_FONT
);
if
(
*
p_font
)
/* success */
{
return
(
1
);
}
/* Fatal error */
intf_ErrMsg
(
"X11 error: can't load fallback font `%s'
\n
"
,
X11_DEFAULT_FONT
);
return
(
-
1
);
}
/*******************************************************************************
* XEnableScreenSaver: enable screen saver
*******************************************************************************
* This function enable the screen saver on a display after it had been
* disabled by XDisableScreenSaver. Both functions use a counter mechanism to
* know wether the screen saver can be activated or not: if n successive calls
* are made to XDisableScreenSaver, n successive calls to XEnableScreenSaver
* will be required before the screen saver could effectively be activated.
*******************************************************************************/
void
XEnableScreenSaver
(
Display
*
p_display
)
{
/* ?? */
}
/*******************************************************************************
* XDisableScreenSaver: disable screen saver
*******************************************************************************
* See XEnableScreenSaver
*******************************************************************************/
void
XDisableScreenSaver
(
Display
*
p_display
)
{
/* ?? */
}
src/video_output/video_ggi.c
View file @
35e8bb43
...
...
@@ -34,7 +34,7 @@ typedef struct vout_sys_s
/* Buffers informations */
int
i_buffer_index
;
/* buffer index */
ggi_directbuffer
*
p
p_buffer
[
2
];
/* buffers */
ggi_directbuffer
*
p_buffer
[
2
];
/* buffers */
boolean_t
b_must_acquire
;
/* must be acquired before writing */
/* Characters size */
...
...
@@ -87,7 +87,7 @@ int vout_SysInit( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_buffer_index
=
0
;
if
(
p_vout
->
p_sys
->
b_must_acquire
)
{
ggiResourceAcquire
(
p_vout
->
p_sys
->
p
p
_buffer
[
0
]
->
resource
,
GGI_ACTYPE_WRITE
);
ggiResourceAcquire
(
p_vout
->
p_sys
->
p_buffer
[
0
]
->
resource
,
GGI_ACTYPE_WRITE
);
}
return
(
0
);
...
...
@@ -103,7 +103,7 @@ void vout_SysEnd( vout_thread_t *p_vout )
/* Release buffer */
if
(
p_vout
->
p_sys
->
b_must_acquire
)
{
ggiResourceRelease
(
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
);
ggiResourceRelease
(
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
);
}
}
...
...
@@ -144,21 +144,21 @@ void vout_SysDisplay( vout_thread_t *p_vout )
/* Change display frame */
if
(
p_vout
->
p_sys
->
b_must_acquire
)
{
ggiResourceRelease
(
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
);
ggiResourceRelease
(
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
);
}
ggiFlush
(
p_vout
->
p_sys
->
p_display
);
// ??
ggiSetDisplayFrame
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
frame
);
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
frame
);
/* Swap buffers and change write frame */
p_vout
->
p_sys
->
i_buffer_index
=
++
p_vout
->
p_sys
->
i_buffer_index
&
1
;
if
(
p_vout
->
p_sys
->
b_must_acquire
)
{
ggiResourceAcquire
(
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
,
ggiResourceAcquire
(
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
resource
,
GGI_ACTYPE_WRITE
);
}
ggiSetWriteFrame
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
frame
);
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
frame
);
}
/*******************************************************************************
...
...
@@ -168,7 +168,7 @@ void vout_SysDisplay( vout_thread_t *p_vout )
*******************************************************************************/
byte_t
*
vout_SysGetPicture
(
vout_thread_t
*
p_vout
)
{
return
(
p_vout
->
p_sys
->
p
p
_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
write
);
return
(
p_vout
->
p_sys
->
p_buffer
[
p_vout
->
p_sys
->
i_buffer_index
]
->
write
);
}
/*******************************************************************************
...
...
@@ -265,9 +265,9 @@ static int GGIOpenDisplay( vout_thread_t *p_vout )
for
(
i_index
=
0
;
i_index
<
2
;
i_index
++
)
{
/* Get buffer address */
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
=
p_vout
->
p_sys
->
p_buffer
[
i_index
]
=
ggiDBGetBuffer
(
p_vout
->
p_sys
->
p_display
,
i_index
);
if
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
==
NULL
)
if
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
==
NULL
)
{
intf_ErrMsg
(
"error: double buffering is not possible
\n
"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
...
...
@@ -276,11 +276,11 @@ static int GGIOpenDisplay( vout_thread_t *p_vout )
}
/* Check buffer properties */
if
(
!
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
type
&
GGI_DB_SIMPLE_PLB
)
||
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
page_size
!=
0
)
||
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
write
==
NULL
)
||
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
noaccess
!=
0
)
||
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
align
!=
0
)
)
if
(
!
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
type
&
GGI_DB_SIMPLE_PLB
)
||
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
page_size
!=
0
)
||
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
write
==
NULL
)
||
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
noaccess
!=
0
)
||
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
align
!=
0
)
)
{
intf_ErrMsg
(
"error: incorrect video memory type
\n
"
);
ggiClose
(
p_vout
->
p_sys
->
p_display
);
...
...
@@ -289,7 +289,7 @@ static int GGIOpenDisplay( vout_thread_t *p_vout )
}
/* Check if buffer needs to be acquired before write */
if
(
ggiResourceMustAcquire
(
p_vout
->
p_sys
->
p
p
_buffer
[
i_index
]
->
resource
)
)
if
(
ggiResourceMustAcquire
(
p_vout
->
p_sys
->
p_buffer
[
i_index
]
->
resource
)
)
{
p_vout
->
p_sys
->
b_must_acquire
=
1
;
}
...
...
@@ -328,7 +328,7 @@ static int GGIOpenDisplay( vout_thread_t *p_vout )
/* Set thread information */
p_vout
->
i_width
=
mode
.
visible
.
x
;
p_vout
->
i_height
=
mode
.
visible
.
y
;
p_vout
->
i_bytes_per_line
=
p_vout
->
p_sys
->
p
p
_buffer
[
0
]
->
buffer
.
plb
.
stride
;
p_vout
->
i_bytes_per_line
=
p_vout
->
p_sys
->
p_buffer
[
0
]
->
buffer
.
plb
.
stride
;
switch
(
mode
.
graphtype
)
{
case
GT_15BIT
:
...
...
src/video_output/video_output.c
View file @
35e8bb43
...
...
@@ -16,7 +16,7 @@
#include <string.h>
#ifdef VIDEO_X11
#include <X11/Xlib.h>
#include <X11/Xlib.h>
/* for video_sys.h in X11 mode */
#endif
#include "common.h"
...
...
@@ -34,7 +34,7 @@
*******************************************************************************/
/* CLIP_BYTE: return value if between 0 and 255, else return nearest boundary
* (0 or 255) */
* (0 or 255)
, used to build translations tables
*/
#define CLIP_BYTE( i_val ) ( (i_val < 0) ? 0 : ((i_val > 255) ? 255 : i_val) )
/* YUV_GRAYSCALE: parametric macro for YUV grayscale transformation.
...
...
@@ -148,6 +148,7 @@ static void RenderYUVGrayPicture ( vout_thread_t *p_vout, picture_t *p_pi
static
void
RenderYUV16Picture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
static
void
RenderYUV32Picture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
static
void
RenderInfo
(
vout_thread_t
*
p_vout
);
static
int
RenderIdle
(
vout_thread_t
*
p_vout
,
int
i_level
);
/*******************************************************************************
* vout_CreateThread: creates a new video output thread
...
...
@@ -221,7 +222,7 @@ vout_thread_t * vout_CreateThread (
#ifdef STATS
p_vout
->
c_loops
=
0
;
p_vout
->
c_idle_loops
=
0
;
p_vout
->
c_
pictures
=
0
;
p_vout
->
c_
fps_samples
=
0
;
#endif
/* Create thread and set locks */
...
...
@@ -297,23 +298,17 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
char
psz_date
[
MSTRTIME_MAX_SIZE
];
/* buffer for date string */
#endif
#ifdef DEBUG
_VIDEO
#ifdef DEBUG
/* Check if picture status is valid */
if
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
{
intf_DbgMsg
(
"error: picture %d has invalid status %d
\n
"
,
p_pic
,
p_pic
->
i_status
);
intf_DbgMsg
(
"error: picture %d has invalid status %d
\n
"
,
p_pic
,
p_pic
->
i_status
);
}
#endif
/* Remove reservation flag */
p_pic
->
i_status
=
READY_PICTURE
;
#ifdef STATS
/* Update stats */
p_vout
->
c_pictures
++
;
#endif
#ifdef DEBUG_VIDEO
/* Send picture informations */
intf_DbgMsg
(
"picture %p: type=%d, %dx%d, date=%s
\n
"
,
p_pic
,
p_pic
->
i_type
,
...
...
@@ -457,12 +452,11 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, int i_type,
*******************************************************************************/
void
vout_DestroyPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
#ifdef DEBUG
_VIDEO
#ifdef DEBUG
/* Check if picture status is valid */
if
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
{
intf_DbgMsg
(
"error: picture %d has invalid status %d
\n
"
,
p_pic
,
p_pic
->
i_status
);
intf_DbgMsg
(
"error: picture %d has invalid status %d
\n
"
,
p_pic
,
p_pic
->
i_status
);
}
#endif
...
...
@@ -483,12 +477,11 @@ void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
vlc_mutex_lock
(
&
p_vout
->
lock
);
p_pic
->
i_refcount
++
;
vlc_mutex_unlock
(
&
p_vout
->
lock
);
#ifdef DEBUG_VIDEO
intf_DbgMsg
(
"picture %p
\n
"
,
p_pic
);
#endif