Commit f93b233d authored by Laurent Aimar's avatar Laurent Aimar

Removed b_pausable flag in favour of b_subtitle.

parent 4f66b077
...@@ -344,8 +344,6 @@ struct subpicture_t ...@@ -344,8 +344,6 @@ struct subpicture_t
bool b_ephemer; /**< If this flag is set to true the subtitle bool b_ephemer; /**< If this flag is set to true the subtitle
will be displayed untill the next one appear */ will be displayed untill the next one appear */
bool b_fade; /**< enable fading */ bool b_fade; /**< enable fading */
bool b_pausable; /**< subpicture will be paused if
stream is paused */
/**@}*/ /**@}*/
subpicture_region_t *p_region; /**< region list composing this subtitle */ subpicture_region_t *p_region; /**< region list composing this subtitle */
......
...@@ -338,8 +338,6 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h ...@@ -338,8 +338,6 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
return NULL; return NULL;
} }
p_spu->b_pausable = true;
/* Create a new subpicture region */ /* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) ); memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('T','E','X','T'); fmt.i_chroma = VLC_FOURCC('T','E','X','T');
......
...@@ -210,7 +210,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -210,7 +210,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_spu->i_stop = p_block->i_pts + p_block->i_length; p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = false; p_spu->b_ephemer = false;
p_spu->b_absolute = false; p_spu->b_absolute = false;
p_spu->b_pausable = true;
//msg_Dbg( p_dec, "BS %lf..%lf", p_spu->i_start * 0.000001, p_spu->i_stop * 0.000001); //msg_Dbg( p_dec, "BS %lf..%lf", p_spu->i_start * 0.000001, p_spu->i_stop * 0.000001);
p_sys->pf_push_packet( p_sys->p_instance, p_sys->pf_push_packet( p_sys->p_instance,
......
...@@ -504,8 +504,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data ) ...@@ -504,8 +504,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
p_spu = p_dec->pf_spu_buffer_new( p_dec ); p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL; if( !p_spu ) return NULL;
p_spu->b_pausable = true;
p_spu->i_x = p_sys->i_x_start; p_spu->i_x = p_sys->i_x_start;
p_spu->i_x = p_spu->i_x * 3 / 4; /* FIXME: use aspect ratio for x? */ p_spu->i_x = p_spu->i_x * 3 / 4; /* FIXME: use aspect ratio for x? */
p_spu->i_y = p_sys->i_y_start; p_spu->i_y = p_sys->i_y_start;
......
...@@ -1586,7 +1586,6 @@ static subpicture_t *render( decoder_t *p_dec ) ...@@ -1586,7 +1586,6 @@ static subpicture_t *render( decoder_t *p_dec )
p_spu->i_start = (mtime_t) p_sys->i_pts; p_spu->i_start = (mtime_t) p_sys->i_pts;
//p_spu->i_stop = (mtime_t) 0; //p_spu->i_stop = (mtime_t) 0;
p_spu->b_ephemer = true; p_spu->b_ephemer = true;
p_spu->b_pausable = true;
//p_spu->b_fade = true; //p_spu->b_fade = true;
//p_spu->i_stop = p_spu->i_start + (mtime_t) (i_timeout * 1000000); //p_spu->i_stop = p_spu->i_start + (mtime_t) (i_timeout * 1000000);
......
...@@ -584,8 +584,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, kate_packet *p_kp, block_t ...@@ -584,8 +584,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, kate_packet *p_kp, block_t
return NULL; return NULL;
} }
p_spu->b_pausable = true;
/* these may be 0 for "not specified" */ /* these may be 0 for "not specified" */
p_spu->i_original_picture_width = p_sys->ki.original_canvas_width; p_spu->i_original_picture_width = p_sys->ki.original_canvas_width;
p_spu->i_original_picture_height = p_sys->ki.original_canvas_height; p_spu->i_original_picture_height = p_sys->ki.original_canvas_height;
......
...@@ -278,7 +278,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -278,7 +278,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_spu->i_stop = p_block->i_pts + p_block->i_length; p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = true; p_spu->b_ephemer = true;
p_spu->b_absolute = true; p_spu->b_absolute = true;
p_spu->b_pausable = true; /* ? */
vlc_mutex_lock( p_sys->p_ass->p_lock ); vlc_mutex_lock( p_sys->p_ass->p_lock );
if( p_sys->p_track ) if( p_sys->p_track )
......
...@@ -76,8 +76,6 @@ subpicture_t * ParsePacket( decoder_t *p_dec ) ...@@ -76,8 +76,6 @@ subpicture_t * ParsePacket( decoder_t *p_dec )
p_spu = p_dec->pf_spu_buffer_new( p_dec ); p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL; if( !p_spu ) return NULL;
p_spu->b_pausable = true;
/* Rationale for the "p_spudec->i_rle_size * 4": we are going to /* Rationale for the "p_spudec->i_rle_size * 4": we are going to
* expand the RLE stuff so that we won't need to read nibbles later * expand the RLE stuff so that we won't need to read nibbles later
* on. This will speed things up a lot. Plus, we'll only need to do * on. This will speed things up a lot. Plus, we'll only need to do
......
...@@ -407,8 +407,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block ) ...@@ -407,8 +407,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
return NULL; return NULL;
} }
p_spu->b_pausable = true;
/* Create a new subpicture region */ /* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) ); memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('T','E','X','T'); fmt.i_chroma = VLC_FOURCC('T','E','X','T');
......
...@@ -225,8 +225,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block ) ...@@ -225,8 +225,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
return NULL; return NULL;
} }
p_spu->b_pausable = true;
/* Decode USF strings */ /* Decode USF strings */
p_spu->p_region = ParseUSFString( p_dec, psz_subtitle, p_spu ); p_spu->p_region = ParseUSFString( p_dec, psz_subtitle, p_spu );
......
...@@ -473,8 +473,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data ) ...@@ -473,8 +473,6 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
p_spu = p_dec->pf_spu_buffer_new( p_dec ); p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL; if( !p_spu ) return NULL;
p_spu->b_pausable = true;
p_spu->i_x = p_sys->i_x_start; p_spu->i_x = p_sys->i_x_start;
p_spu->i_y = p_sys->i_y_start; p_spu->i_y = p_sys->i_y_start;
p_spu->i_start = p_data->i_pts; p_spu->i_start = p_data->i_pts;
......
...@@ -725,7 +725,6 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -725,7 +725,6 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_spu->i_stop = p_block->i_pts + p_block->i_length; p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0); p_spu->b_ephemer = (p_block->i_length == 0);
p_spu->b_absolute = false; p_spu->b_absolute = false;
p_spu->b_pausable = true;
dbg((p_dec, "%ld --> %ld\n", (long int) p_block->i_pts/100000, (long int)p_block->i_length/100000)); dbg((p_dec, "%ld --> %ld\n", (long int) p_block->i_pts/100000, (long int)p_block->i_length/100000));
block_Release( p_block ); block_Release( p_block );
......
...@@ -502,7 +502,6 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt, ...@@ -502,7 +502,6 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
p_spu->i_stop = 0; p_spu->i_stop = 0;
p_spu->b_ephemer = true; p_spu->b_ephemer = true;
p_spu->b_absolute = false; p_spu->b_absolute = false;
p_spu->b_pausable = true;
if( !b_text ) if( !b_text )
{ {
......
...@@ -392,7 +392,6 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu ) ...@@ -392,7 +392,6 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
memset( p_subpic, 0, sizeof(subpicture_t) ); memset( p_subpic, 0, sizeof(subpicture_t) );
p_subpic->i_status = RESERVED_SUBPICTURE; p_subpic->i_status = RESERVED_SUBPICTURE;
p_subpic->b_absolute = true; p_subpic->b_absolute = true;
p_subpic->b_pausable = false;
p_subpic->b_fade = false; p_subpic->b_fade = false;
p_subpic->b_subtitle = false; p_subpic->b_subtitle = false;
p_subpic->i_alpha = 0xFF; p_subpic->i_alpha = 0xFF;
...@@ -1225,7 +1224,7 @@ subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date, ...@@ -1225,7 +1224,7 @@ subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date,
if( display_date > p_current->i_stop && if( display_date > p_current->i_stop &&
( !p_current->b_ephemer || p_current->i_stop > p_current->i_start ) && ( !p_current->b_ephemer || p_current->i_stop > p_current->i_start ) &&
!( p_current->b_pausable && b_paused ) ) !( p_current->b_subtitle && b_paused ) ) /* XXX Assume that subtitle are pausable */
{ {
/* Too late, destroy the subpic */ /* Too late, destroy the subpic */
spu_DestroySubpicture( p_spu, &p_spu->p_subpicture[i_index] ); spu_DestroySubpicture( p_spu, &p_spu->p_subpicture[i_index] );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment