Commit f732680c authored by Olivier Aubert's avatar Olivier Aubert

snapshot.c:

 * added some comments
 * updated module description
 * try to fix timestamping
parent 1614fdf0
...@@ -21,6 +21,20 @@ ...@@ -21,6 +21,20 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
/*****************************************************************************
* This module is a pseudo video output the offers the possibility to
* keep a cache of low-res snapshots.
* The snapshot structure is defined in include/snapshot.h
* In order to access the current snapshot cache, object variables are used:
* snapshot-list-pointer : the pointer on the first element in the list
* snapshot-datasize : size of a snapshot
* (also available in snapshot_t->i_datasize)
* snapshot-cache-size : size of the cache list
*
* It is used for the moment by the CORBA module and a specialized
* python-vlc binding.
*****************************************************************************/
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
...@@ -58,7 +72,11 @@ static void Display ( vout_thread_t *, picture_t * ); ...@@ -58,7 +72,11 @@ static void Display ( vout_thread_t *, picture_t * );
vlc_module_begin( ); vlc_module_begin( );
set_description( _( "snapshot module" ) ); set_description( _( "snapshot module" ) );
set_capability( "video output", 0 ); set_shortname( N_("Snapshot") );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
set_capability( "video output", 1 );
add_integer( "snapshot-width", 320, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE ); add_integer( "snapshot-width", 320, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE );
add_integer( "snapshot-height", 200, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE ); add_integer( "snapshot-height", 200, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE );
...@@ -94,11 +112,11 @@ static int Create( vlc_object_t *p_this ) ...@@ -94,11 +112,11 @@ static int Create( vlc_object_t *p_this )
if( ! p_vout->p_sys ) if( ! p_vout->p_sys )
return VLC_ENOMEM; return VLC_ENOMEM;
var_Create( p_this, "snapshot-width", VLC_VAR_INTEGER ); var_Create( p_vout, "snapshot-width", VLC_VAR_INTEGER );
var_Create( p_this, "snapshot-height", VLC_VAR_INTEGER ); var_Create( p_vout, "snapshot-height", VLC_VAR_INTEGER );
var_Create( p_this, "snapshot-datasize", VLC_VAR_INTEGER ); var_Create( p_vout, "snapshot-datasize", VLC_VAR_INTEGER );
var_Create( p_this, "snapshot-cache-size", VLC_VAR_INTEGER ); var_Create( p_vout, "snapshot-cache-size", VLC_VAR_INTEGER );
var_Create( p_this, "snapshot-list-pointer", VLC_VAR_ADDRESS ); var_Create( p_vout, "snapshot-list-pointer", VLC_VAR_ADDRESS );
p_vout->pf_init = Init; p_vout->pf_init = Init;
p_vout->pf_end = NULL; p_vout->pf_end = NULL;
...@@ -342,7 +360,7 @@ static mtime_t snapshot_GetMovietime( vout_thread_t *p_vout ) ...@@ -342,7 +360,7 @@ static mtime_t snapshot_GetMovietime( vout_thread_t *p_vout )
var_Get( p_input, "time", &val ); var_Get( p_input, "time", &val );
i_result = val.i_time; i_result = val.i_time - p_input->i_pts_delay;
return( i_result / 1000 ); return( i_result / 1000 );
} }
......
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