Hi, I've managed to compile and package unicap for Debian [1]. I had to apply some patches (attached) to make it compile properly with -Wall -Wno-unused -Werror. The packages should not be considered finished at all, they should probably be further divided into different independent packages, at least for the different independent libraries and for their corresponding documentation, but for the moment it's enough for me to work with it.
I'm configuring it as this: ./configure $(CROSS) \ CFLAGS="$(CFLAGS) $$(pkg-config libavcodec libavutil xv x11 --cf lags) -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavutil" \ LDFLAGS="-pthread -Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined $$(pkg-config libavcodec libavutil xv x11 --libs)" \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --enable-unicapgtk \ --enable-ucil-alsa \ --enable-ucil-theora \ --enable-ucil-png \ --enable-ucil-avcodec \ --enable-gtk-doc The -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavutil is not needed for Debian, but it is if you want to be able to use the packages in Marillat's repositories (debian-multimedia.org), and they don't do any harm. I'm not sure if you're still interested in packaging this, Jonas. I'm sending a CC to Arne Caspari so that upstream can have the patches, just in case. Greetings, Miry [1] http://www.miriamruiz.es/debian/unicap/ [2] http://bugs.debian.org/491220
series
Description: Binary data
# Copyright (C) 2008 by Miriam Ruiz <[EMAIL PROTECTED]> # Distributed under the same license as the software. See debian/copyright Index: unicap-0.9.3/libunicap/unicap_helpers.c =================================================================== --- unicap-0.9.3.orig/libunicap/unicap_helpers.c 2008-12-02 23:34:43.000000000 +0100 +++ unicap-0.9.3/libunicap/unicap_helpers.c 2008-12-02 23:38:39.000000000 +0100 @@ -284,7 +284,7 @@ "range: min: %g\n"\ " max: %g\n"\ "stepping: %g\n"\ - "property data size: %d\n", + "property data size: %ld\n", property->identifier, property->category, property->unit, @@ -292,7 +292,7 @@ property->range.min, property->range.max, property->stepping, - property->property_data_size ); + (long int)property->property_data_size ); strncpy( buffer, tmp_buffer, *buffer_size );
# Copyright (C) 2008 by Miriam Ruiz <[EMAIL PROTECTED]> # Distributed under the same license as the software. See debian/copyright Index: unicap-0.9.3/libucil/ucil_avc_avi.c =================================================================== --- unicap-0.9.3.orig/libucil/ucil_avc_avi.c 2008-12-02 23:15:59.000000000 +0100 +++ unicap-0.9.3/libucil/ucil_avc_avi.c 2008-12-02 23:23:59.000000000 +0100 @@ -583,7 +584,7 @@ entry = malloc( sizeof( struct _unicap_queue ) ); data_buffer = malloc( sizeof( unicap_data_buffer_t ) ); unicap_copy_format( &data_buffer->format, format ); - data_buffer->format.fourcc = UCIL_FOURC( 'Y', '4', '2', '0' ); + data_buffer->format.fourcc = UCIL_FOURCC( 'Y', '4', '2', '0' ); data_buffer->format.bpp = 12; data_buffer->format.buffer_size = data_buffer->format.size.width * data_buffer->format.size.height * data_buffer->format.bpp / 8;
# Copyright (C) 2008 by Miriam Ruiz <[EMAIL PROTECTED]> # Distributed under the same license as the software. See debian/copyright Index: unicap-0.9.3/cpi/vid21394/vid21394_base.c =================================================================== --- unicap-0.9.3.orig/cpi/vid21394/vid21394_base.c 2008-12-02 23:26:10.000000000 +0100 +++ unicap-0.9.3/cpi/vid21394/vid21394_base.c 2008-12-02 23:31:43.000000000 +0100 @@ -1333,7 +1333,8 @@ /* TRACE( "rs232io fcp: %08llx out_data_length: %d, in_data_length: %d\n", fcp, out_data_length, in_data_length ); */ - return( _vid21394_send_fcp_command_new( vid21394handle, fcp, bit, out_data, out_data_length, in_data, (unsigned int *)&in_data_length ) ); + size_t in_data_length_sz = in_data_length; + return( _vid21394_send_fcp_command_new( vid21394handle, fcp, bit, out_data, out_data_length, in_data, &in_data_length_sz ) ); } unicap_status_t vid21394_read_rs232( vid21394handle_t vid21394handle,
# Copyright (C) 2008 by Miriam Ruiz <[EMAIL PROTECTED]> # Distributed under the same license as the software. See debian/copyright Index: unicap-0.9.3/libunicapgtk/unicapgtk_property_dialog.c =================================================================== --- unicap-0.9.3.orig/libunicapgtk/unicapgtk_property_dialog.c 2008-12-03 00:16:46.000000000 +0100 +++ unicap-0.9.3/libunicapgtk/unicapgtk_property_dialog.c 2008-12-03 02:24:46.000000000 +0100 @@ -55,7 +55,10 @@ GtkWidget *widget; }; - +struct timeout_data +{ + guint id; +}; static void unicapgtk_property_dialog_class_init (UnicapgtkPropertyDialogClass *klass); static void unicapgtk_property_dialog_init (UnicapgtkPropertyDialog *ugtk); @@ -224,14 +227,19 @@ { struct ppty_relation *rel; guint timeout_id = 0; - + struct timeout_data *timeout = NULL; + rel = (struct ppty_relation *) entry->data; - - timeout_id = (guint)g_object_get_data( G_OBJECT( rel->widget ), "update lock" ); - if( timeout_id ) + timeout = (struct timeout_data *)g_object_get_data( G_OBJECT( rel->widget ), "update lock" ); + if( timeout ) { - g_source_remove( timeout_id ); + timeout_id = timeout->id; + if( timeout_id ) + { + g_source_remove( timeout_id ); + } + free(timeout); } g_free( entry->data ); @@ -320,18 +328,28 @@ { int i; guint timeout_id = 0; + struct timeout_data *timeout = NULL; - timeout_id = (guint)g_object_get_data( G_OBJECT( widget ), "update lock" ); - if( timeout_id ) + timeout = (struct timeout_data *)g_object_get_data( G_OBJECT( widget ), "update lock" ); + if( timeout ) { - g_source_remove( timeout_id ); + timeout_id = timeout->id; + if( timeout_id ) + { + g_source_remove( timeout_id ); + } + free(timeout); } + timeout = (struct timeout_data*)malloc(sizeof(struct timeout_data)); + memset(timeout, 0, sizeof(struct timeout_data)); + // block the update of this property for the next 5 seconds to // avoid confusion when the property takes some time to reflect the // new setting ( eg. zoom ) timeout_id = g_timeout_add( 5000, (GSourceFunc)remove_update_lock_timeout_cb, widget ); - g_object_set_data_full( G_OBJECT( widget ), "update lock", (gpointer)timeout_id, update_lock_destroy_cb ); + timeout->id = timeout_id; + g_object_set_data_full( G_OBJECT( widget ), "update lock", (gpointer)timeout, update_lock_destroy_cb ); unicap_set_property( ugtk->unicap_handle, property ); @@ -738,14 +756,19 @@ { struct ppty_relation *rel; guint timeout_id = 0; + struct timeout_data *timeout = NULL; - rel = (struct ppty_relation *) entry->data; - + rel = (struct ppty_relation *) entry->data; - timeout_id = (guint)g_object_get_data( G_OBJECT( rel->widget ), "update lock" ); - if( timeout_id ) + timeout = (struct timeout_data *)g_object_get_data( G_OBJECT( rel->widget ), "update lock" ); + if( timeout ) { - g_source_remove( timeout_id ); + timeout_id = timeout->id; + if( timeout_id ) + { + g_source_remove( timeout_id ); + } + free(timeout); } g_free( entry->data ); }