Changeset 21d4c7c7e8743d9849cfcd338496d3a613ab39fa

Show
Ignore:
Timestamp:
12/05/03 06:01:17 (5 years ago)
Author:
Rocky Bernstein <rocky@videolan.org>
git-committer:
Rocky Bernstein <rocky@videolan.org> 1070600477 +0000
git-parent:

[39a7f7e696685c58885539226344c9c93e24fce5]

git-author:
Rocky Bernstein <rocky@videolan.org> 1070600477 +0000
Message:

A little cleanup on wait timing. No bug fixes yet, though.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/vcdx/access.c

    r39a7f7e r21d4c7c  
    55 ***************************************************************************** 
    66 * Copyright (C) 2000,2003 VideoLAN 
    7  * $Id: access.c,v 1.8 2003/12/05 04:24:47 rocky Exp $ 
     7 * $Id: access.c,v 1.9 2003/12/05 05:01:17 rocky Exp $ 
    88 * 
    99 * Authors: Rocky Bernstein <rocky@panix.com>  
     
    411411    input_area_t *          p_area; 
    412412     
    413     p_vcd->in_still = 0
     413    p_vcd->in_still = false
    414414 
    415415    dbg_print(INPUT_DBG_CALL, "itemid.num: %d, itemid.type: %d\n",  
     
    455455          case VCDINFO_FILES_VIDEO_PAL_STILL2: 
    456456            p_input->stream.b_seekable = 0; 
    457             p_vcd->in_still = -5
     457            p_vcd->in_still = true
    458458            break; 
    459459          default: 
    460460            p_input->stream.b_seekable = 1; 
    461             p_vcd->in_still = 0
     461            p_vcd->in_still = false
    462462          } 
    463463      } 
  • modules/access/vcdx/intf.c

    r39a7f7e r21d4c7c  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002,2003 VideoLAN 
    5  * $Id: intf.c,v 1.10 2003/12/05 04:24:47 rocky Exp $ 
     5 * $Id: intf.c,v 1.11 2003/12/05 05:01:17 rocky Exp $ 
    66 * 
    77 * Authors: Rocky Bernstein <rocky@panix.com> 
     
    120120 
    121121        /* 
    122          * still images 
     122         * Have we timed-out in showing a still frame?  
    123123         */ 
    124124        if( p_intf->p_sys->b_still && !p_intf->p_sys->b_inf_still ) 
     
    126126            if( p_intf->p_sys->m_still_time > 0 ) 
    127127            { 
    128                 /* update remaining still time */ 
     128                /* Update remaining still time */ 
    129129            dbg_print(INPUT_DBG_STILL, "updating still time"); 
    130130                mtime = mdate(); 
     
    138138            else 
    139139            { 
    140                 /* still time elasped */ 
     140                /* Still time has elasped; set to continue playing. */ 
    141141            dbg_print(INPUT_DBG_STILL, "wait time done - setting play"); 
    142142                input_SetStatus( p_intf->p_sys->p_input, 
     
    149149 
    150150      /* 
    151        * keyboard event 
     151       * Do we have a keyboard event?  
    152152       */ 
    153153      if( p_vout && p_intf->p_sys->b_key_pressed ) 
     
    228228        number_addend = 0; 
    229229 
    230         /* we can safely interact with the VCD player 
    231          * with the stream lock */ 
     230        /* Any keypress gets rid of still frame waiting. 
     231           FIXME - should handle just the ones that cause an action. 
     232        */ 
    232233        if( p_intf->p_sys->b_still ) 
    233234          { 
     
    361362    vlc_mutex_lock( &p_intf->change_lock ); 
    362363 
    363     if( i_sec == 0xff
    364     { 
    365         p_intf->p_sys->b_still = 1; 
     364    if( i_sec == -1
     365    { 
     366        p_intf->p_sys->b_still     = 1; 
    366367        p_intf->p_sys->b_inf_still = 1; 
    367368    } 
  • modules/access/vcdx/intf.h

    r39a7f7e r21d4c7c  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf.h,v 1.2 2003/12/05 04:24:47 rocky Exp $ 
     5 * $Id: intf.h,v 1.3 2003/12/05 05:01:17 rocky Exp $ 
    66 * 
    77 * Author: St�ane Borel <stef@via.ecp.fr> 
     
    2727struct intf_sys_t 
    2828{ 
    29     input_thread_t    * p_input; 
    30     thread_vcd_data_t * p_vcd; 
    31  
    32     vlc_bool_t          b_still; 
    33     vlc_bool_t          b_inf_still; 
    34     mtime_t             m_still_time; 
    35  
     29  input_thread_t    * p_input; 
     30  thread_vcd_data_t * p_vcd; 
     31   
     32  vlc_bool_t          b_still;        /* True if we are in a still frame */ 
     33  vlc_bool_t          b_inf_still;    /* True if still wait time is infinite */ 
     34  mtime_t             m_still_time;   /* Time in microseconds remaining  
     35                     to wait in still frame. 
     36                       */ 
    3637#if FINISHED 
    37     vcdplay_ctrl_t      control; 
     38  vcdplay_ctrl_t      control; 
    3839#else  
    39     int                 control; 
     40  int                 control; 
    4041#endif 
    41     vlc_bool_t          b_click, b_move, b_key_pressed; 
     42  vlc_bool_t          b_click, b_move, b_key_pressed; 
    4243}; 
    4344 
  • modules/access/vcdx/vcdplayer.c

    r39a7f7e r21d4c7c  
    44 ***************************************************************************** 
    55 * Copyright (C) 2003 Rocky Bernstein <rocky@panix.com> 
    6  * $Id: vcdplayer.c,v 1.6 2003/12/05 04:24:47 rocky Exp $ 
     6 * $Id: vcdplayer.c,v 1.7 2003/12/05 05:01:17 rocky Exp $ 
    77 * 
    88 * This program is free software; you can redistribute it and/or modify 
     
    137137} 
    138138 
    139 /* FIXME: Will do whatever the right thing is later. */ 
    140 #define SLEEP_1_SEC_AND_HANDLE_EVENTS sleep(1) 
    141  
    142139/* Handles PBC navigation when reaching the end of a play item. */ 
    143140vcdplayer_read_status_t 
     
    148145  /* We are in playback control. */ 
    149146  vcdinfo_itemid_t itemid; 
    150  
    151   if (0 != p_vcd->in_still && p_vcd->in_still != -5) { 
    152       SLEEP_1_SEC_AND_HANDLE_EVENTS; 
    153       if (p_vcd->in_still > 0) p_vcd->in_still--; 
    154       return READ_STILL_FRAME; 
    155   } 
    156147 
    157148  /* The end of an entry is really the end of the associated  
     
    182173 
    183174    /* Handle any wait time given. */ 
    184     if (-5 == p_vcd->in_still) { 
    185       if (wait_time != 0) { 
    186         /* FIXME */ 
    187         p_vcd->in_still = wait_time - 1; 
    188     p_vcd->p_intf->p_sys->m_still_time = (wait_time - 1) * 1000000; 
    189         return READ_STILL_FRAME; 
    190       } else { 
    191     p_vcd->p_intf->p_sys->m_still_time = 0; 
    192     p_vcd->p_intf->p_sys->b_inf_still  = 1; 
    193       } 
    194  
    195     } 
     175    if (p_vcd->in_still) { 
     176      vcdIntfStillTime( p_vcd->p_intf, wait_time ); 
     177      return READ_STILL_FRAME; 
     178    } 
     179 
    196180    vcdplayer_update_entry( p_input,  
    197181                            vcdinf_pld_get_next_offset(p_vcd->pxd.pld), 
     
    214198       
    215199      /* Handle any wait time given */ 
    216       if (-5 == p_vcd->in_still) { 
    217     if (wait_time != 0) { 
    218       /* FIXME */ 
    219       p_vcd->in_still = wait_time - 1; 
    220       p_vcd->p_intf->p_sys->m_still_time = (wait_time - 1) * 1000000; 
    221       return READ_STILL_FRAME; 
    222     } else { 
    223       p_vcd->p_intf->p_sys->m_still_time = 0; 
    224       p_vcd->p_intf->p_sys->b_inf_still  = 1; 
    225     } 
     200      if (p_vcd->in_still) { 
     201    vcdIntfStillTime( p_vcd->p_intf, wait_time ); 
    226202    return READ_STILL_FRAME; 
    227       } 
     203      }  
    228204       
    229205      /* Handle any looping given. */ 
     
    264240        } else if (p_vcd->in_still) { 
    265241          /* Hack: Just go back and do still again */ 
    266           SLEEP_1_SEC_AND_HANDLE_EVENTS
     242          sleep(1)
    267243          return READ_STILL_FRAME; 
    268244        } 
  • modules/access/vcdx/vcdplayer.h

    r5383df0 r21d4c7c  
    11/***************************************************************************** 
    22 * Copyright (C) 2003 Rocky Bernstein (for VideoLAN) 
    3  * $Id: vcdplayer.h,v 1.3 2003/12/04 05:14:39 rocky Exp $ 
     3 * $Id: vcdplayer.h,v 1.4 2003/12/05 05:01:17 rocky Exp $ 
    44 * 
    55 * Authors: Rocky Bernstein <rocky@panix.com>  
     
    6666{ 
    6767  vcdinfo_obj_t *vcd;                   /* CD device descriptor */ 
    68   int            in_still;              /*  0 if not in still,  
    69                                             -2 if in infinite loop 
    70                                             -5 if a still but haven't  
    71                                             read wait time yet 
    72                                             >0 number of seconds yet to  
    73                                             wait */ 
     68  bool           in_still;              /*  true if in still */ 
    7469  unsigned int num_tracks;              /* Nb of tracks (titles) */ 
    7570  unsigned int num_segments;            /* Nb of segments */