/*****************************************************************************
* snapshot.c : snapshot plugin for vlc
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
+ * Copyright (C) 2002 the VideoLAN team
* $Id$
*
* Authors: Olivier Aubert <oaubert@lisi.univ-lyon1.fr>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 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.
*****************************************************************************/
/*****************************************************************************
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define WIDTH_TEXT N_( "snapshot width" )
-#define WIDTH_LONGTEXT N_( "Set the width of the snapshot image" )
+#define WIDTH_TEXT N_( "Snapshot width" )
+#define WIDTH_LONGTEXT N_( "Width of the snapshot image." )
-#define HEIGHT_TEXT N_( "snapshot height" )
-#define HEIGHT_LONGTEXT N_( "Set the height of the snapshot image" )
+#define HEIGHT_TEXT N_( "Snapshot height" )
+#define HEIGHT_LONGTEXT N_( "Height of the snapshot image." )
-#define CHROMA_TEXT N_( "chroma" )
-#define CHROMA_LONGTEXT N_( "Set the desired chroma for the snapshot image (a 4 character string)" )
+#define CHROMA_TEXT N_( "Chroma" )
+#define CHROMA_LONGTEXT N_( "Output chroma for the snapshot image " \
+ "(a 4 character string, like \"RV32\")." )
-#define CACHE_TEXT N_( "cache size (number of images)" )
-#define CACHE_LONGTEXT N_( "Set the cache size (number of images to keep)" )
+#define CACHE_TEXT N_( "Cache size (number of images)" )
+#define CACHE_LONGTEXT N_( "Snapshot cache size (number of images to keep)." )
vlc_module_begin( );
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-height", 200, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE );
if( ! p_vout->p_sys )
return VLC_ENOMEM;
- var_Create( p_this, "snapshot-width", VLC_VAR_INTEGER );
- var_Create( p_this, "snapshot-height", VLC_VAR_INTEGER );
- var_Create( p_this, "snapshot-datasize", VLC_VAR_INTEGER );
- var_Create( p_this, "snapshot-cache-size", VLC_VAR_INTEGER );
- var_Create( p_this, "snapshot-list-pointer", VLC_VAR_ADDRESS );
+ var_Create( p_vout, "snapshot-width", VLC_VAR_INTEGER );
+ var_Create( p_vout, "snapshot-height", VLC_VAR_INTEGER );
+ var_Create( p_vout, "snapshot-datasize", VLC_VAR_INTEGER );
+ var_Create( p_vout, "snapshot-cache-size", VLC_VAR_INTEGER );
+ var_Create( p_vout, "snapshot-list-pointer", VLC_VAR_ADDRESS );
p_vout->pf_init = Init;
p_vout->pf_end = NULL;
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 );
}