Commit 665782c8 authored by Sam Hocevar's avatar Sam Hocevar

l'output framebuffer fonctionne presque.

 ca va *pas* merder.
parent 4ffdf05c
/******************************************************************************* /******************************************************************************
* vout_fb.c: framebuffer video output display method * vout_fb.c: Linux framebuffer video output display method
* (c)1998 VideoLAN * (c)1998 VideoLAN
*******************************************************************************/ ******************************************************************************/
/******************************************************************************* /******************************************************************************
* Preamble * Preamble
*******************************************************************************/ ******************************************************************************/
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -32,208 +31,219 @@ ...@@ -32,208 +31,219 @@
#include "intf_msg.h" #include "intf_msg.h"
#include "main.h" #include "main.h"
/******************************************************************************* /******************************************************************************
* vout_sys_t: video output framebuffer method descriptor * vout_sys_t: video output framebuffer method descriptor
******************************************************************************* ******************************************************************************
* This structure is part of the video output thread descriptor. * This structure is part of the video output thread descriptor.
* It describes the FB specific properties of an output thread. FB video * It describes the FB specific properties of an output thread.
* output is performed through regular resizable windows. Windows can be ******************************************************************************/
* dynamically resized to adapt to the size of the streams.
*******************************************************************************/
typedef struct vout_sys_s typedef struct vout_sys_s
{ {
/* System informations */ /* System informations */
int i_fb_dev; /* framebuffer device handle */ int i_fb_dev; /* framebuffer device handle */
size_t i_page_size; /* page size */ size_t i_page_size; /* page size */
struct fb_var_screeninfo var_info; /* framebuffer mode informations */
/* Video memory */ /* Video memory */
byte_t * p_video; byte_t * p_video;
/* User settings */
boolean_t b_shm; /* shared memory extension flag */
/* Font information */
int i_char_bytes_per_line; /* character width (bytes) */
int i_char_height; /* character height (lines) */
int i_char_interspacing;/* space between centers (pixels) */
byte_t * pi_font; /* pointer to font data */
/* Display buffers information */
int i_buffer_index; /* buffer index */
void * p_image[2]; /* image */
} vout_sys_t; } vout_sys_t;
/******************************************************************************* /******************************************************************************
* Local prototypes * Local prototypes
*******************************************************************************/ ******************************************************************************/
static int FBOpenDisplay ( vout_thread_t *p_vout ); static int FBOpenDisplay ( vout_thread_t *p_vout );
static void FBCloseDisplay ( vout_thread_t *p_vout ); static void FBCloseDisplay ( vout_thread_t *p_vout );
/*******************************************************************************
* vout_SysCreate: allocate framebuffer video thread output method /******************************************************************************
******************************************************************************* * vout_SysCreate: allocates FB video thread output method
* This function allocate and initialize a framebuffer vout method. ******************************************************************************
*******************************************************************************/ * This function allocates and initializes a FB vout method.
int vout_SysCreate( vout_thread_t *p_vout ) ******************************************************************************/
{ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, int i_root_window )
{
/* 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 )
{ {
intf_ErrMsg("vout error: %s\n", strerror(ENOMEM) ); intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
return( 1 ); return( 1 );
} }
/* Open and initialize device */ /* Open and initialize device */
if( FBOpenDisplay( p_vout ) ) if( FBOpenDisplay( p_vout ) )
{ {
intf_ErrMsg("vout error: can't open display\n"); intf_ErrMsg("vout error: can't open display\n");
free( p_vout->p_sys ); free( p_vout->p_sys );
return( 1 ); return( 1 );
} }
return( 0 ); return( 0 );
} }
/******************************************************************************* /******************************************************************************
* vout_SysInit: initialize Sys video thread output method * vout_SysInit: initialize framebuffer video thread output method
******************************************************************************* ******************************************************************************
* This function initialize the framebuffer device. * This function creates the images needed by the output thread. It is called
*******************************************************************************/ * at the beginning of the thread, but also each time the display is resized.
******************************************************************************/
int vout_SysInit( vout_thread_t *p_vout ) int vout_SysInit( vout_thread_t *p_vout )
{ {
// Blank both screens // Blank both screens
memset( p_vout->p_sys->p_video, 0x00, 2*p_vout->p_sys->i_page_size ); memset( p_vout->p_sys->p_video, 0x00, 2*p_vout->p_sys->i_page_size );
//memset( p_vout->p_sys->p_image[0], 0xf0, p_vout->p_sys->i_page_size );
//memset( p_vout->p_sys->p_image[1], 0x0f, p_vout->p_sys->i_page_size );
/* Set buffer index to 0 */
p_vout->p_sys->i_buffer_index = 0;
//??
//??
// intf_Msg("vout: framebuffer display initialized (%s), %dx%d depth=%d bpp",
// fb_fix_screeninfo.id, p_vout->i_witdh, p_vout->i_height,
// p_vout->i_screen_depth );
return( 0 ); return( 0 );
} }
/******************************************************************************* /******************************************************************************
* vout_SysEnd: terminate Sys video thread output method * vout_SysEnd: terminate FB video thread output method
******************************************************************************* ******************************************************************************
* Terminate an output method created by vout_SysCreateOutputMethod * Destroy the FB images created by vout_SysInit. It is called at the end of
*******************************************************************************/ * the thread, but also each time the window is resized.
******************************************************************************/
void vout_SysEnd( vout_thread_t *p_vout ) void vout_SysEnd( vout_thread_t *p_vout )
{ {
intf_DbgMsg("%p\n", p_vout ); intf_DbgMsg("%p\n", p_vout );
//??
} }
/******************************************************************************* /******************************************************************************
* vout_SysDestroy: destroy Sys video thread output method * vout_SysDestroy: destroy FB video thread output method
******************************************************************************* ******************************************************************************
* Terminate an output method created by vout_SysCreateOutputMethod * Terminate an output method created by vout_FBCreateOutputMethod
*******************************************************************************/ ******************************************************************************/
void vout_SysDestroy( vout_thread_t *p_vout ) void vout_SysDestroy( vout_thread_t *p_vout )
{ {
FBCloseDisplay( p_vout ); FBCloseDisplay( p_vout );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
/******************************************************************************* /******************************************************************************
* vout_SysManage: handle Sys events * vout_SysManage: handle FB events
******************************************************************************* ******************************************************************************
* This function should be called regularly by video output thread. It manages * This function should be called regularly by video output thread. It manages
* Sys events and allows window resizing. It returns a negative value if * console events and allows screen resizing. It returns a non null value on
* something happened which does not allow the thread to continue, and a * error.
* positive one if the thread can go on, but the images have been modified and ******************************************************************************/
* therefore it is useless to display them.
*******************************************************************************
* Messages type: vout, major code: 103
*******************************************************************************/
int vout_SysManage( vout_thread_t *p_vout ) int vout_SysManage( vout_thread_t *p_vout )
{ {
//?? /* XXX */
return( 0 ); return 0;
} }
/******************************************************************************* /******************************************************************************
* vout_SysDisplay: displays previously rendered output * vout_SysDisplay: displays previously rendered output
******************************************************************************* ******************************************************************************
* This function send the currently rendered image to Sys server, wait until * This function send the currently rendered image to FB image, waits until
* it is displayed and switch the two rendering buffer, preparing next frame. * it is displayed and switch the two rendering buffers, preparing next frame.
*******************************************************************************/ ******************************************************************************/
void vout_SysDisplay( vout_thread_t *p_vout ) void vout_SysDisplay( vout_thread_t *p_vout )
{ {
/* Swap buffers */ /* Swap buffers */
//?? p_vout->p_sys->i_buffer_index = ++p_vout->p_sys->i_buffer_index & 1; //p_vout->p_sys->i_buffer_index = ++p_vout->p_sys->i_buffer_index & 1;
/* tout est bien affich, on peut changer les 2 crans */
p_vout->p_sys->var_info.yoffset =
/*p_vout->p_sys->i_buffer_index ?*/ 0 /*: p_vout->p_sys->var_info.yres*/;
ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
} }
/******************************************************************************* /******************************************************************************
* vout_SysGetPicture: get current display buffer informations * vout_SysGetPicture: get current display buffer informations
******************************************************************************* ******************************************************************************
* This function returns the address of the current display buffer, and the * This function returns the address of the current display buffer.
* number of samples per line. For 15, 16 and 32 bits displays, this value is ******************************************************************************/
* the number of pixels in a line. void * vout_SysGetPicture( vout_thread_t *p_vout )
*******************************************************************************/
byte_t * vout_SysGetPicture( vout_thread_t *p_vout, int *pi_eol_offset )
{ {
*pi_eol_offset = p_vout->i_width; return( p_vout->p_sys->p_image[ p_vout->p_sys->i_buffer_index ] );
//????
// return( p_vout->p_sys->p_ximage[ p_vout->p_sys->i_buffer_index ].data );
} }
/* following functions are local */ /* following functions are local */
/******************************************************************************* /******************************************************************************
* FBOpenDisplay: open and initialize framebuffer device * FBOpenDisplay: open and initialize framebuffer device
******************************************************************************* ******************************************************************************
* ?? The framebuffer mode is only provided as a fast and efficient way to * ?? 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 * 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 * not portable, and is not supposed to work with many cards. Use at your
* own risks ! * own risk !
*******************************************************************************/ ******************************************************************************/
static int FBOpenDisplay( vout_thread_t *p_vout ) static int FBOpenDisplay( vout_thread_t *p_vout )
{ {
char *psz_device; /* framebuffer device path */ char *psz_device; /* framebuffer device path */
struct fb_fix_screeninfo fix_info; /* framebuffer fix information */ struct fb_fix_screeninfo fix_info; /* framebuffer fix information */
struct fb_var_screeninfo var_info; /* frambuffer mode informations */
/* Open framebuffer device */ /* Open framebuffer device */
psz_device = main_GetPszVariable( VOUT_FB_DEV_VAR, VOUT_FB_DEV_DEFAULT ); psz_device = main_GetPszVariable( VOUT_FB_DEV_VAR, VOUT_FB_DEV_DEFAULT );
p_vout->p_sys->i_fb_dev = open( psz_device, O_RDWR); p_vout->p_sys->i_fb_dev = open( psz_device, O_RDWR);
if( p_vout->p_sys->i_fb_dev == -1 ) if( p_vout->p_sys->i_fb_dev == -1 )
{ {
intf_ErrMsg("vout error: can't open %s (%s)\n", psz_device, strerror(errno) ); intf_ErrMsg("vout error: can't open %s (%s)\n", psz_device, strerror(errno) );
return( 1 ); return( 1 );
} }
// ?? here would be the code used to save the current mode and // ?? here would be the code used to save the current mode and
// ?? change to the most appropriate mode... // ?? change to the most appropriate mode...
/* Get framebuffer device informations */ /* Get framebuffer device informations */
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &var_info ) ) if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
{ {
intf_ErrMsg("vout error: can't get framebuffer informations (%s)\n", strerror(errno) ); intf_ErrMsg("vout error: can't get framebuffer informations (%s)\n", strerror(errno) );
close( p_vout->p_sys->i_fb_dev ); close( p_vout->p_sys->i_fb_dev );
return( 1 ); return( 1 );
} }
/* Framebuffer must have some basic properties to be usable */ /* Framebuffer must have some basic properties to be usable */
//?? //??
/* Set some attributes */ /* Set some attributes */
var_info.activate = FB_ACTIVATE_NXTOPEN; p_vout->p_sys->var_info.activate = FB_ACTIVATE_NXTOPEN;
var_info.xoffset = 0; p_vout->p_sys->var_info.xoffset = 0;
var_info.yoffset = 0; p_vout->p_sys->var_info.yoffset = 0;
//??ask sam p_vout->p_sys->mode_info.sync = FB_SYNC_VERT_HIGH_ACT; //??ask sam p_vout->p_sys->mode_info.sync = FB_SYNC_VERT_HIGH_ACT;
//??? //???
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &var_info ) ) if( ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info ) )
{ {
intf_ErrMsg("vout error: can't set framebuffer informations (%s)\n", strerror(errno) ); intf_ErrMsg("vout error: can't set framebuffer informations (%s)\n", strerror(errno) );
close( p_vout->p_sys->i_fb_dev ); close( p_vout->p_sys->i_fb_dev );
return( 1 ); return( 1 );
} }
/* Get some informations again, in the definitive configuration */ /* Get some informations again, in the definitive configuration */
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_FSCREENINFO, &fix_info ) || if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_FSCREENINFO, &fix_info ) ||
ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &var_info ) ) ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
{ {
intf_ErrMsg("vout error: can't get framebuffer informations (%s)\n", strerror(errno) ); intf_ErrMsg("vout error: can't get framebuffer informations (%s)\n", strerror(errno) );
// ?? restore fb config // ?? restore fb config
close( p_vout->p_sys->i_fb_dev ); close( p_vout->p_sys->i_fb_dev );
return( 1 ); return( 1 );
} }
p_vout->i_width = var_info.xres; p_vout->i_width = p_vout->p_sys->var_info.xres;
p_vout->i_height = var_info.yres; p_vout->i_height = p_vout->p_sys->var_info.yres;
p_vout->i_screen_depth = var_info.bits_per_pixel; p_vout->i_bytes_per_line = p_vout->i_width * 2;
p_vout->i_screen_depth = p_vout->p_sys->var_info.bits_per_pixel;
switch( p_vout->i_screen_depth ) switch( p_vout->i_screen_depth )
{ {
case 15: /* 15 bpp (16bpp with a missing green bit) */ case 15: /* 15 bpp (16bpp with a missing green bit) */
...@@ -250,43 +260,48 @@ static int FBOpenDisplay( vout_thread_t *p_vout ) ...@@ -250,43 +260,48 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
break; break;
default: /* unsupported screen depth */ default: /* unsupported screen depth */
intf_ErrMsg("vout error: screen depth %i is not supported\n", intf_ErrMsg("vout error: screen depth %i is not supported\n",
p_vout->i_screen_depth); p_vout->i_screen_depth);
return( 1 ); return( 1 );
break; break;
} }
p_vout->p_sys->i_page_size = var_info.xres * p_vout->p_sys->i_page_size = p_vout->p_sys->var_info.xres *
var_info.yres * p_vout->i_bytes_per_pixel; p_vout->p_sys->var_info.yres * p_vout->i_bytes_per_pixel;
/* Map two framebuffers a the very beginning of the fb */ /* Map two framebuffers a the very beginning of the fb */
p_vout->p_sys->p_video = mmap(0, p_vout->p_sys->i_page_size * 2, p_vout->p_sys->p_video = mmap(0, p_vout->p_sys->i_page_size * 2,
PROT_READ | PROT_WRITE, MAP_SHARED, PROT_READ | PROT_WRITE, MAP_SHARED,
p_vout->p_sys->i_fb_dev, 0 ); p_vout->p_sys->i_fb_dev, 0 );
if( p_vout->p_sys->p_video == -1 ) //?? according to man, it is -1. What about NULL ? if( (int)p_vout->p_sys->p_video == -1 ) //?? according to man, it is -1. What about NULL ?
{ {
intf_ErrMsg("vout error: can't map video memory (%s)\n", strerror(errno) ); intf_ErrMsg("vout error: can't map video memory (%s)\n", strerror(errno) );
// ?? restore fb config // ?? restore fb config
close( p_vout->p_sys->i_fb_dev ); close( p_vout->p_sys->i_fb_dev );
return( 1 ); return( 1 );
} }
p_vout->p_sys->p_image[ 0 ] = p_vout->p_sys->p_video;
intf_DbgMsg("framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d\n", p_vout->p_sys->p_image[ 1 ] = p_vout->p_sys->p_video + p_vout->p_sys->i_page_size;
intf_DbgMsg("framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d\n",
fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel ); fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
intf_Msg("vout: framebuffer display initialized (%s), %dx%d depth=%d bpp\n", intf_Msg("vout: framebuffer display initialized (%s), %dx%d depth=%d bpp\n",
fix_info.id, p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth ); fix_info.id, p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth );
return( 0 );
}
/******************************************************************************* return( 0 );
}
/******************************************************************************
* FBCloseDisplay: close and reset framebuffer device * FBCloseDisplay: close and reset framebuffer device
******************************************************************************* ******************************************************************************
* This function returns all resources allocated by FBOpenDisplay and restore * Returns all resources allocated by FBOpenDisplay and restore the original
* the original state of the device. * state of the device.
*******************************************************************************/ ******************************************************************************/
static void FBCloseDisplay( vout_thread_t *p_vout ) static void FBCloseDisplay( vout_thread_t *p_vout )
{ {
//?? unmap memory // Free font info
//?? restore original mode free( p_vout->p_sys->pi_font );
close( p_vout->p_sys->i_fb_dev );
// Destroy window and close display
close( p_vout->p_sys->i_fb_dev );
} }
/******************************************************************************* /******************************************************************************
* video_output.c : video output thread * video_output.c : video output thread
* (c)2000 VideoLAN * (c)2000 VideoLAN
******************************************************************************* ******************************************************************************
* This module describes the programming interface for video output threads. * This module describes the programming interface for video output threads.
* It includes functions allowing to open a new thread, send pictures to a * It includes functions allowing to open a new thread, send pictures to a
* thread, and destroy a previously oppenned video output thread. * thread, and destroy a previously oppenned video output thread.
*******************************************************************************/ ******************************************************************************/
/******************************************************************************* /******************************************************************************
* Preamble * Preamble
*******************************************************************************/ ******************************************************************************/
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include "intf_msg.h" #include "intf_msg.h"
#include "main.h" #include "main.h"
/******************************************************************************* /******************************************************************************
* Local prototypes * Local prototypes
*******************************************************************************/ ******************************************************************************/
static int InitThread ( vout_thread_t *p_vout ); static int InitThread ( vout_thread_t *p_vout );
static void RunThread ( vout_thread_t *p_vout ); static void RunThread ( vout_thread_t *p_vout );
static void ErrorThread ( vout_thread_t *p_vout ); static void ErrorThread ( vout_thread_t *p_vout );
...@@ -40,19 +40,19 @@ static int RenderIdle ( vout_thread_t *p_vout, boolean_t b_bla ...@@ -40,19 +40,19 @@ static int RenderIdle ( vout_thread_t *p_vout, boolean_t b_bla
static int RenderInfo ( vout_thread_t *p_vout, boolean_t b_balnk ); static int RenderInfo ( vout_thread_t *p_vout, boolean_t b_balnk );
static int Manage ( vout_thread_t *p_vout ); static int Manage ( vout_thread_t *p_vout );
/******************************************************************************* /******************************************************************************
* vout_CreateThread: creates a new video output thread * vout_CreateThread: creates a new video output thread
******************************************************************************* ******************************************************************************
* This function creates a new video output thread, and returns a pointer * This function creates a new video output thread, and returns a pointer
* to its description. On error, it returns NULL. * to its description. On error, it returns NULL.
* If pi_status is NULL, then the function will block until the thread is ready. * If pi_status is NULL, then the function will block until the thread is ready.
* If not, it will be updated using one of the THREAD_* constants. * If not, it will be updated using one of the THREAD_* constants.
*******************************************************************************/ ******************************************************************************/
vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window, vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window,
int i_width, int i_height, int *pi_status ) int i_width, int i_height, int *pi_status )
{ {
vout_thread_t * p_vout; /* thread descriptor */ vout_thread_t * p_vout; /* thread descriptor */
int i_status; /* thread status */ int i_status; /* thread status */
/* Allocate descriptor */ /* Allocate descriptor */
intf_DbgMsg("\n"); intf_DbgMsg("\n");
...@@ -143,17 +143,17 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_ ...@@ -143,17 +143,17 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_
return( p_vout ); return( p_vout );
} }
/******************************************************************************* /******************************************************************************
* vout_DestroyThread: destroys a previously created thread * vout_DestroyThread: destroys a previously created thread
******************************************************************************* ******************************************************************************
* Destroy a terminated thread. * Destroy a terminated thread.
* The function will request a destruction of the specified thread. If pi_error * The function will request a destruction of the specified thread. If pi_error
* is NULL, it will return once the thread is destroyed. Else, it will be * is NULL, it will return once the thread is destroyed. Else, it will be
* update using one of the THREAD_* constants. * update using one of the THREAD_* constants.
*******************************************************************************/ ******************************************************************************/
void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status ) void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
{ {
int i_status; /* thread status */ int i_status; /* thread status */
/* Set status */ /* Set status */
intf_DbgMsg("\n"); intf_DbgMsg("\n");
...@@ -174,18 +174,18 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status ) ...@@ -174,18 +174,18 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
} }
} }
/******************************************************************************* /******************************************************************************
* vout_DisplaySubtitle: display a subtitle * vout_DisplaySubtitle: display a subtitle
******************************************************************************* ******************************************************************************
* Remove the reservation flag of a subtitle, which will cause it to be ready for * Remove the reservation flag of a subtitle, which will cause it to be ready for
* display. The picture does not need to be locked, since it is ignored by * display. The picture does not need to be locked, since it is ignored by
* the output thread if is reserved. * the output thread if is reserved.
*******************************************************************************/ ******************************************************************************/
void vout_DisplaySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub ) void vout_DisplaySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub )
{ {
#ifdef DEBUG_VIDEO #ifdef DEBUG_VIDEO
char psz_begin_date[MSTRTIME_MAX_SIZE]; /* buffer for date string */ char psz_begin_date[MSTRTIME_MAX_SIZE]; /* buffer for date string */
char psz_end_date[MSTRTIME_MAX_SIZE]; /* buffer for date string */ char psz_end_date[MSTRTIME_MAX_SIZE]; /* buffer for date string */
#endif #endif
#ifdef DEBUG #ifdef DEBUG
...@@ -207,28 +207,28 @@ void vout_DisplaySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub ) ...@@ -207,28 +207,28 @@ void vout_DisplaySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub )
#endif #endif
} }
/******************************************************************************* /******************************************************************************
* vout_CreateSubtitle: allocate a subtitle in the video output heap. * vout_CreateSubtitle: allocate a subtitle in the video output heap.
******************************************************************************* ******************************************************************************
* This function create a reserved subtitle in the video output heap. * This function create a reserved subtitle in the video output heap.
* A null pointer is returned if the function fails. This method provides an * A null pointer is returned if the function fails. This method provides an
* already allocated zone of memory in the subtitle data fields. It needs locking * already allocated zone of memory in the subtitle data fields. It needs locking
* since several pictures can be created by several producers threads. * since several pictures can be created by several producers threads.
*******************************************************************************/ ******************************************************************************/
subtitle_t *vout_CreateSubtitle( vout_thread_t *p_vout, int i_type, subtitle_t *vout_CreateSubtitle( vout_thread_t *p_vout, int i_type,
int i_size ) int i_size )
{ {
//??? //???
} }
/******************************************************************************* /******************************************************************************
* vout_DestroySubtitle: remove a permanent or reserved subtitle from the heap * vout_DestroySubtitle: remove a permanent or reserved subtitle from the heap
******************************************************************************* ******************************************************************************
* This function frees a previously reserved subtitle. * This function frees a previously reserved subtitle.
* It is meant to be used when the construction of a picture aborted. * It is meant to be used when the construction of a picture aborted.
* This function does not need locking since reserved subtitles are ignored by * This function does not need locking since reserved subtitles are ignored by
* the output thread. * the output thread.
*******************************************************************************/ ******************************************************************************/
void vout_DestroySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub ) void vout_DestroySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub )
{ {
#ifdef DEBUG #ifdef DEBUG
...@@ -246,13 +246,13 @@ void vout_DestroySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub ) ...@@ -246,13 +246,13 @@ void vout_DestroySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub )
#endif #endif
} }
/******************************************************************************* /******************************************************************************
* vout_DisplayPicture: display a picture * vout_DisplayPicture: display a picture
******************************************************************************* ******************************************************************************
* Remove the reservation flag of a picture, which will cause it to be ready for * Remove the reservation flag of a picture, which will cause it to be ready for
* display. The picture won't be displayed until vout_DatePicture has been * display. The picture won't be displayed until vout_DatePicture has been
* called. * called.
*******************************************************************************/ ******************************************************************************/
void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic ) void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vlc_mutex_lock( &p_vout->picture_lock ); vlc_mutex_lock( &p_vout->picture_lock );
...@@ -278,13 +278,13 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -278,13 +278,13 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
vlc_mutex_unlock( &p_vout->picture_lock ); vlc_mutex_unlock( &p_vout->picture_lock );
} }
/******************************************************************************* /******************************************************************************
* vout_DatePicture: date a picture * vout_DatePicture: date a picture
******************************************************************************* ******************************************************************************
* Remove the reservation flag of a picture, which will cause it to be ready for * Remove the reservation flag of a picture, which will cause it to be ready for
* display. The picture won't be displayed until vout_DisplayPicture has been * display. The picture won't be displayed until vout_DisplayPicture has been
* called. * called.
*******************************************************************************/