Changeset 33983554b25e79aad349e6703573449f7799e672

Show
Ignore:
Timestamp:
06/04/06 21:26:55 (2 years ago)
Author:
Filippo Carone <littlejohn@videolan.org>
git-committer:
Filippo Carone <littlejohn@videolan.org> 1149449215 +0000
git-parent:

[840f845c8c4d723a7d84ab28bf9cc43e315b4695]

git-author:
Filippo Carone <littlejohn@videolan.org> 1149449215 +0000
Message:

* added video height/width getters in libvlc
* libvlc playlist play uses locking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc/libvlc.h

    r54b0c48 r3398355  
    270270float libvlc_input_get_position( libvlc_input_t *, libvlc_exception_t *); 
    271271vlc_bool_t libvlc_input_will_play( libvlc_input_t *, libvlc_exception_t *); 
     272 
     273/** @} */ 
     274 
     275/** defgroup libvlc_video Video 
     276 * \ingroup libvlc 
     277 * LibVLC Video handling 
     278 * @{ 
     279 */ 
     280 
     281/** 
     282 * Toggle fullscreen status on video output 
     283 * \param p_input the input 
     284 * \param p_exception an initialized exception 
     285 */ 
     286void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
     287 
     288/** 
     289 * Enable or disable fullscreen on a video output 
     290 * \param p_input the input 
     291 * \param b_fullscreen boolean for fullscreen status 
     292 * \param p_exception an initialized exception 
     293 */ 
     294void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); 
     295 
     296/** 
     297 * Get current fullscreen status 
     298 * \param p_input the input 
     299 * \param p_exception an initialized exception 
     300 * \return the fullscreen status (boolean) 
     301 */ 
     302int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
    272303     
    273  
    274  
    275 /** @} */ 
    276  
    277 /** defgroup libvlc_video Video 
    278  * \ingroup libvlc 
    279  * LibVLC Video handling 
    280  * @{ 
    281  */ 
    282  
    283 /** 
    284  * Toggle fullscreen status on video output 
    285  * \param p_input the input 
    286  * \param p_exception an initialized exception 
    287  */ 
    288 void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
    289  
    290 /** 
    291  * Enable or disable fullscreen on a video output 
    292  * \param p_input the input 
    293  * \param b_fullscreen boolean for fullscreen status 
    294  * \param p_exception an initialized exception 
    295  */ 
    296 void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); 
    297  
    298 /** 
    299  * Get current fullscreen status 
    300  * \param p_input the input 
    301  * \param p_exception an initialized exception 
    302  * \return the fullscreen status (boolean) 
    303  */ 
    304 int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
    305  
    306  
     304/** 
     305 * Get current video height 
     306 * \param p_input the input 
     307 * \param p_exception an initialized exception 
     308 * \return the video height 
     309 */ 
     310int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * ); 
     311 
     312/** 
     313 * Get current video width 
     314 * \param p_input the input 
     315 * \param p_exception an initialized exception 
     316 * \return the video width 
     317 */ 
     318int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * ); 
     319 
     320/** 
     321 * Take a snapshot of the current video window 
     322 * \param p_input the input 
     323 * \param psz_filepath the path where to save the screenshot to 
     324 * \param p_exception an initialized exception 
     325 */ 
    307326void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * ); 
    308327     
  • src/control/playlist.c

    r5314d9e r3398355  
    4747            return; 
    4848        } 
    49         playlist_Control( p_instance->p_playlist, PLAYLIST_VIEWPLAY, 
     49        playlist_LockControl( p_instance->p_playlist, PLAYLIST_VIEWPLAY, 
    5050                          p_instance->p_playlist->status.p_node, p_item ); 
    5151    } 
  • src/control/video.c

    r54b0c48 r3398355  
    126126 
    127127void 
    128 libvlc_video_take_snapshot( libvlc_input_t *p_input, char *filepath, 
     128libvlc_video_take_snapshot( libvlc_input_t *p_input, char *psz_filepath, 
    129129                       libvlc_exception_t *p_e ) 
    130130{ 
     
    149149    } 
    150150    
    151     snprintf( path, 255, "%s", filepath ); 
     151    snprintf( path, 255, "%s", psz_filepath ); 
    152152    var_SetString( p_vout, "snapshot-path", path ); 
    153153    var_SetString( p_vout, "snapshot-format", "png" ); 
     
    159159     
    160160} 
     161 
     162int libvlc_video_get_height( libvlc_input_t *p_input, 
     163                             libvlc_exception_t *p_e )  
     164{ 
     165    vout_thread_t *p_vout1 = GetVout( p_input, p_e ); 
     166    if( !p_vout1 ) 
     167        return 0; 
     168 
     169    vlc_object_release( p_vout1 ); 
     170 
     171    return p_vout1->i_window_height; 
     172} 
     173 
     174int libvlc_video_get_width( libvlc_input_t *p_input, 
     175                            libvlc_exception_t *p_e )  
     176{ 
     177    vout_thread_t *p_vout1 = GetVout( p_input, p_e ); 
     178    if( !p_vout1 ) 
     179        return 0; 
     180 
     181    vlc_object_release( p_vout1 ); 
     182 
     183    return p_vout1->i_window_width; 
     184}