]> git.sesse.net Git - vlc/commitdiff
. support 8 bits pour X (avec private colormap)
authorSam Hocevar <sam@videolan.org>
Fri, 26 May 2000 01:55:07 +0000 (01:55 +0000)
committerSam Hocevar <sam@videolan.org>
Fri, 26 May 2000 01:55:07 +0000 (01:55 +0000)
 . affinement de la dur�e d'affichage des sous-titres
 . correction d'un bug dans les sous-titres

include/video_output.h
src/spu_decoder/spu_decoder.c
src/video_output/video_output.c
src/video_output/video_spu.c

index e1cb00a60b6b777dbd340a76db07b825330111ed..80fb7f82a686713fd236d89f6703e276b821345a 100644 (file)
@@ -102,7 +102,8 @@ typedef struct vout_buffer_s
  * structure.
  *****************************************************************************/
 typedef int  (vout_sys_create_t)    ( p_vout_thread_t p_vout,
-                                      char *psz_display, int i_root_window );
+                                      char *psz_display,
+                                      int i_root_window, void *p_data );
 typedef int  (vout_sys_init_t)      ( p_vout_thread_t p_vout );
 typedef void (vout_sys_end_t)       ( p_vout_thread_t p_vout );
 typedef void (vout_sys_destroy_t)   ( p_vout_thread_t p_vout );
@@ -224,7 +225,8 @@ typedef struct vout_thread_s
  * Prototypes
  *****************************************************************************/
 vout_thread_t * vout_CreateThread       ( char *psz_display, int i_root_window,
-                                          int i_width, int i_height, int *pi_status, int i_method );
+                                          int i_width, int i_height, int *pi_status,
+                                          int i_method, void *p_data );
 void            vout_DestroyThread      ( vout_thread_t *p_vout, int *pi_status );
 picture_t *     vout_CreatePicture      ( vout_thread_t *p_vout, int i_type,
                                           int i_width, int i_height );
index 20630dd0149330d3f2e9a402200dea0d44328d01..e94ccd81e0ce50d5948e36ab4cf557165c82fb68 100644 (file)
@@ -288,16 +288,16 @@ static void RunThread( spudec_thread_t *p_spudec )
                                 /* 00 (force displaying) */
                                 break;
                             /* FIXME: here we have to calculate dates. It's
-                             * around i_date * 10000 but I don't know
+                             * around i_date * 12000 but I don't know
                              * how much exactly.
                              */
                             case 0x01:
                                 /* 01 (start displaying) */
-                                p_spu->begin_date += ( i_date * 10000 );
+                                p_spu->begin_date += ( i_date * 12000 );
                                 break;
                             case 0x02:
                                 /* 02 (stop displaying) */
-                                p_spu->end_date += ( i_date * 10000 );
+                                p_spu->end_date += ( i_date * 12000 );
                                 break;
                             case 0x03:
                                 /* 03xxxx (palette) */
index 5228e990fc268235ecf03ad00c73adacfb329dbb..0421499f7a650e84669d46d544e6fda55f333ecc 100644 (file)
@@ -87,7 +87,8 @@ static void     SetPalette        ( p_vout_thread_t p_vout, u16 *red,
  * If not, it will be updated using one of the THREAD_* constants.
  *****************************************************************************/
 vout_thread_t * vout_CreateThread   ( char *psz_display, int i_root_window,
-                          int i_width, int i_height, int *pi_status, int i_method )
+                          int i_width, int i_height, int *pi_status,
+                          int i_method, void *p_data )
 {
     vout_thread_t * p_vout;                             /* thread descriptor */
     int             i_status;                               /* thread status */
@@ -190,7 +191,7 @@ vout_thread_t * vout_CreateThread   ( char *psz_display, int i_root_window,
 
     /* Create and initialize system-dependant method - this function issues its
      * own error messages */
-    if( p_vout->p_sys_create( p_vout, psz_display, i_root_window ) )
+    if( p_vout->p_sys_create( p_vout, psz_display, i_root_window, p_data ) )
     {
         TrashPlugin( p_vout->vout_plugin );
         free( p_vout );
@@ -1856,7 +1857,6 @@ static void RenderSubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
             {
                 /* too late, destroying the subpic */
                 vout_DestroySubPicture( p_vout, p_subpic );
-                printf( "destroying subpicture\n" );
                 break;
             }
             vout_RenderSPU( p_subpic->p_data, p_subpic->type.spu.i_offset,
index 0627bebe84d26e1e1dddb87568152a1a8b65fc58..11bce15d4e647f36df2740a6e676825444c7f48a 100644 (file)
@@ -135,9 +135,9 @@ void vout_RenderSPU( byte_t *p_data, int p_offset[2],
             {
                 if( (i_color = i_code & 0x3) )
                 {
-                    u8 *p_target = &vspu.p_data[ 2 * 
+                    u8 *p_target = &vspu.p_data[ i_bytes_per_pixel *
                                     ( vspu.x + vspu.y * vspu.width ) ];
-                    memset( p_target, p_palette[i_color], 2 * (i_code >> 2) );
+                    memset( p_target, p_palette[i_color], i_bytes_per_pixel * (i_code >> 2) );
                 }
                 vspu.x += i_code >> 2;
             }