add verbose decode support

Original commit message from CVS:
add verbose decode support
This commit is contained in:
David I. Lehn 2003-01-09 05:26:47 +00:00
parent 762db34109
commit 562e0b2526
5 changed files with 20 additions and 0 deletions

View file

@ -77,6 +77,7 @@ enum {
enum { enum {
ARG_0, ARG_0,
ARG_VERBOSE,
ARG_CAPTION_TYPE, ARG_CAPTION_TYPE,
ARG_DVD_INPUT ARG_DVD_INPUT
}; };
@ -176,6 +177,9 @@ gst_vbidec_class_init(GstVBIDecClass *klass)
gobject_class->set_property = gst_vbidec_set_property; gobject_class->set_property = gst_vbidec_set_property;
gobject_class->get_property = gst_vbidec_get_property; gobject_class->get_property = gst_vbidec_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_VERBOSE,
g_param_spec_boolean ("verbose", "verbose", "verbose",
FALSE, G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CAPTION_TYPE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CAPTION_TYPE,
g_param_spec_enum ("caption type", "caption type", "Closed Caption Type", g_param_spec_enum ("caption type", "caption type", "Closed Caption Type",
GST_TYPE_VBIDEC_CAPTION_TYPE_TYPE, CAPTURE_OFF, G_PARAM_READWRITE)); GST_TYPE_VBIDEC_CAPTION_TYPE_TYPE, CAPTURE_OFF, G_PARAM_READWRITE));
@ -312,6 +316,10 @@ gst_vbidec_set_property (GObject *object, guint prop_id, const GValue *value, GP
vbidec = GST_VBIDEC (object); vbidec = GST_VBIDEC (object);
switch (prop_id) { switch (prop_id) {
case ARG_VERBOSE:
vbidata_set_verbose(vbidec->vbidata, g_value_get_boolean (value));
vbiscreen_set_verbose(vbidec->vbiscreen, g_value_get_boolean (value));
break;
case ARG_DVD_INPUT: case ARG_DVD_INPUT:
vbidec->dvd_input = g_value_get_boolean(value); vbidec->dvd_input = g_value_get_boolean(value);
break; break;

View file

@ -995,6 +995,11 @@ void vbidata_reset( vbidata_t *vbi )
vbiscreen_reset( vbi->vs ); vbiscreen_reset( vbi->vs );
} }
void vbidata_set_verbose( vbidata_t *vbi, int verbose )
{
vbi->verbose = verbose;
}
void vbidata_capture_mode( vbidata_t *vbi, int mode ) void vbidata_capture_mode( vbidata_t *vbi, int mode )
{ {
if( !vbi ) return; if( !vbi ) return;

View file

@ -50,6 +50,7 @@ vbidata_t *vbidata_new_line( vbiscreen_t *vs, int verbose );
void vbidata_delete( vbidata_t *vbi ); void vbidata_delete( vbidata_t *vbi );
void vbidata_reset( vbidata_t *vbi ); void vbidata_reset( vbidata_t *vbi );
void vbidata_set_verbose( vbidata_t *vbi, int verbose );
void vbidata_capture_mode( vbidata_t *vbi, int mode ); void vbidata_capture_mode( vbidata_t *vbi, int mode );
void vbidata_process_frame( vbidata_t *vbi, int printdebug ); void vbidata_process_frame( vbidata_t *vbi, int printdebug );
void vbidata_process_line( vbidata_t *vbi, unsigned char *s, int bottom ); void vbidata_process_line( vbidata_t *vbi, unsigned char *s, int bottom );

View file

@ -382,6 +382,11 @@ void scroll_screen( vbiscreen_t *vs )
vs->scroll = 26; vs->scroll = 26;
} }
void vbiscreen_set_verbose( vbiscreen_t *vs, int verbose )
{
vs->verbose = verbose;
}
void vbiscreen_new_caption( vbiscreen_t *vs, int indent, int ital, void vbiscreen_new_caption( vbiscreen_t *vs, int indent, int ital,
unsigned int colour, int row ) unsigned int colour, int row )
{ {

View file

@ -28,6 +28,7 @@ typedef struct vbiscreen_s vbiscreen_t;
vbiscreen_t *vbiscreen_new( int video_width, int video_height, vbiscreen_t *vbiscreen_new( int video_width, int video_height,
double video_aspect, int verbose, void *user_data ); double video_aspect, int verbose, void *user_data );
void vbiscreen_delete( vbiscreen_t *vs ); void vbiscreen_delete( vbiscreen_t *vs );
void vbiscreen_set_verbose( vbiscreen_t *vs, int verbose );
void vbiscreen_set_mode( vbiscreen_t *vs, int caption, int style); void vbiscreen_set_mode( vbiscreen_t *vs, int caption, int style);
void vbiscreen_new_caption( vbiscreen_t *vs, int indent, int ital, void vbiscreen_new_caption( vbiscreen_t *vs, int indent, int ital,
unsigned int colour, int row ); unsigned int colour, int row );