aboutsummaryrefslogtreecommitdiff
path: root/multimedia/kino/files/patch-ai
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/kino/files/patch-ai')
-rw-r--r--multimedia/kino/files/patch-ai577
1 files changed, 577 insertions, 0 deletions
diff --git a/multimedia/kino/files/patch-ai b/multimedia/kino/files/patch-ai
new file mode 100644
index 000000000000..140a6c30d632
--- /dev/null
+++ b/multimedia/kino/files/patch-ai
@@ -0,0 +1,577 @@
+--- src/ieee1394io.cc Fri Dec 12 22:58:55 2003
++++ src/ieee1394io.cc Fri Apr 9 16:45:10 2004
+@@ -61,11 +61,13 @@
+ #include <sys/mman.h>
+ #include <sys/poll.h>
+
++#if 0
+ #include <libraw1394/raw1394.h>
+ #include <libraw1394/csr.h>
+ #include <libavc1394/avc1394.h>
+ #include <libavc1394/avc1394_vcr.h>
+ #include <libavc1394/rom1394.h>
++#endif
+
+ #include "ieee1394io.h"
+ #include "preferences.h"
+@@ -93,10 +95,12 @@
+ Frame *IEEE1394Reader::currentFrame;
+ deque < Frame* > IEEE1394Reader::inFrames;
+ deque < Frame* > IEEE1394Reader::outFrames;
+-raw1394handle_t raw1394Reader::handle;
++//raw1394handle_t raw1394Reader::handle;
+ unsigned char *dv1394Reader::m_dv1394_map;
+ int dv1394Reader::m_dv1394_fd;
++#if 0
+ raw1394handle_t AVC::avc_handle;
++#endif
+ pthread_mutex_t AVC::avc_mutex;
+
+
+@@ -281,7 +285,7 @@
+ raw1394Reader::raw1394Reader( int p, int c, int bufSize ) :
+ IEEE1394Reader( c, bufSize ), port( p )
+ {
+- handle = NULL;
++ //handle = NULL;
+ cerr << ">>> Using raw1394 capture" << endl;
+ }
+
+@@ -353,28 +357,32 @@
+ {
+ bool success;
+ int numcards;
+- struct raw1394_portinfo pinf[ 16 ];
+- iso_handler_t oldhandler;
++ //struct raw1394_portinfo pinf[ 16 ];
++ //iso_handler_t oldhandler;
+
+- assert( handle == NULL );
++ //assert( handle == NULL );
+
+ try
+ {
+
++#if 0
+ #ifdef LIBRAW1394_OLD
+ handle = raw1394_get_handle();
+ #else
+
+ handle = raw1394_new_handle();
+ #endif
++#endif
++ //handle = 0;
+
+- if ( handle == 0 )
+- return false;
++// if ( handle == 0 )
++// return false;
++#if 0
+ fail_neg( numcards = raw1394_get_port_info( handle, pinf, 16 ) );
+ fail_neg( raw1394_set_port( handle, port ) );
+
+ oldhandler = raw1394_set_iso_handler( handle, channel, Handler );
+-
++#endif
+ success = true;
+ }
+ catch ( string exc )
+@@ -393,11 +401,13 @@
+
+ void raw1394Reader::Close()
+ {
++#if 0
+ if ( handle != NULL )
+ {
+ raw1394_destroy_handle( handle );
+ handle = NULL;
+ }
++#endif
+ }
+
+ bool raw1394Reader::StartReceive()
+@@ -407,7 +417,7 @@
+ /* Starting iso receive */
+ try
+ {
+- fail_neg( raw1394_start_iso_rcv( handle, channel ) );
++// fail_neg( raw1394_start_iso_rcv( handle, channel ) );
+ success = true;
+ }
+ catch ( string exc )
+@@ -421,8 +431,8 @@
+
+ void raw1394Reader::StopReceive()
+ {
+- if ( handle != NULL )
+- raw1394_stop_iso_rcv( handle, channel );
++// if ( handle != NULL )
++// raw1394_stop_iso_rcv( handle, channel );
+ }
+
+
+@@ -458,6 +468,7 @@
+
+ */
+
++#if 0
+ int raw1394Reader::Handler( raw1394handle_t handle, int channel, size_t length,
+ quadlet_t *data )
+ {
+@@ -564,6 +575,7 @@
+
+ return 0;
+ }
++#endif
+
+
+ /** The thread responsible for polling the raw1394 interface.
+@@ -574,6 +586,7 @@
+ */
+ void* raw1394Reader::Thread( void* arg )
+ {
++#if 0
+ raw1394Reader * theReader = ( raw1394Reader* ) arg;
+
+ while ( true )
+@@ -581,6 +594,7 @@
+ raw1394_loop_iterate( theReader->handle );
+ pthread_testcancel();
+ }
++#endif
+ return NULL;
+ }
+
+@@ -666,6 +680,7 @@
+
+ bool dv1394Reader::Open()
+ {
++#if 0
+ int n_frames = DV1394_MAX_FRAMES / 4;
+ struct dv1394_init init =
+ {
+@@ -699,6 +714,8 @@
+ }
+
+ return true;
++#endif
++ return false;
+ }
+
+
+@@ -707,6 +724,7 @@
+ */
+ void dv1394Reader::Close()
+ {
++#if 0
+ if ( m_dv1394_fd != -1 )
+ {
+ if ( m_dv1394_map != NULL )
+@@ -715,11 +733,13 @@
+ m_dv1394_map = NULL;
+ m_dv1394_fd = -1;
+ }
++#endif
+ }
+
+
+ bool dv1394Reader::StartReceive()
+ {
++#if 0
+ /* Starting iso receive */
+ if ( ioctl( m_dv1394_fd, DV1394_START_RECEIVE, NULL ) )
+ {
+@@ -727,6 +747,8 @@
+ return false;
+ }
+ return true;
++#endif
++ return false;
+ }
+
+
+@@ -735,6 +757,7 @@
+
+ bool dv1394Reader::Handler( int handle )
+ {
++#if 0
+ struct dv1394_status dvst;
+
+ if ( ioctl( handle, DV1394_WAIT_FRAMES, 1 ) )
+@@ -812,6 +835,8 @@
+
+ }
+ return true;
++#endif
++ return false;
+ }
+
+
+@@ -843,6 +868,7 @@
+
+ AVC::AVC( int p ) : port( p )
+ {
++#if 0
+ pthread_mutex_init( &avc_mutex, NULL );
+ avc_handle = NULL;
+ int numcards;
+@@ -874,6 +900,7 @@
+ cerr << exc << endl;
+ }
+ return ;
++#endif
+ }
+
+
+@@ -883,6 +910,7 @@
+
+ AVC::~AVC()
+ {
++#if 0
+ if ( avc_handle != NULL )
+ {
+ pthread_mutex_lock( &avc_mutex );
+@@ -890,11 +918,13 @@
+ avc_handle = NULL;
+ pthread_mutex_unlock( &avc_mutex );
+ }
++#endif
+ }
+
+
+ extern KinoCommon *common;
+
++#if 0
+ int AVC::ResetHandler( raw1394handle_t handle, unsigned int generation )
+ {
+ cerr << "Reset Handler received" << endl;
+@@ -902,7 +932,7 @@
+ common->getPageCapture() ->driver_locked = true;
+ return 0;
+ }
+-
++#endif
+
+ /** See if a node_id is still valid and pointing to an AV/C Recorder.
+
+@@ -918,6 +948,7 @@
+ int AVC::isPhyIDValid( int phyID )
+ {
+ int value = -1;
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -960,6 +991,7 @@
+ }
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return value;
+ }
+
+@@ -968,6 +1000,7 @@
+ */
+ void AVC::Noop( void )
+ {
++#if 0
+ struct pollfd raw1394_poll;
+ raw1394_poll.fd = raw1394_get_fd( avc_handle );
+ raw1394_poll.events = POLLIN;
+@@ -978,11 +1011,13 @@
+ || ( raw1394_poll.revents & POLLPRI ) )
+ raw1394_loop_iterate( avc_handle );
+ }
++#endif
+ }
+
+
+ int AVC::Play( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -994,12 +1029,14 @@
+ }
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+
+ int AVC::Pause( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1016,12 +1053,14 @@
+ };
+ nanosleep( &t, NULL );
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+
+ int AVC::Stop( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1034,12 +1073,14 @@
+ };
+ nanosleep( &t, NULL );
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+
+ int AVC::Rewind( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1047,12 +1088,14 @@
+ avc1394_vcr_rewind( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+
+ int AVC::FastForward( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1060,11 +1103,13 @@
+ avc1394_vcr_forward( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::Forward( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1072,11 +1117,13 @@
+ avc1394_vcr_next( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::Back( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1084,11 +1131,13 @@
+ avc1394_vcr_previous( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::NextScene( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1096,11 +1145,13 @@
+ avc1394_vcr_next_index( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::PreviousScene( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1108,11 +1159,13 @@
+ avc1394_vcr_previous_index( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::Record( int phyID )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1120,11 +1173,13 @@
+ avc1394_vcr_record( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ int AVC::Shuttle( int phyID, int speed )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1132,12 +1187,14 @@
+ avc1394_vcr_trick_play( avc_handle, phyID, speed );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return 0;
+ }
+
+ unsigned int AVC::TransportStatus( int phyID )
+ {
+ quadlet_t val = 0;
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1145,11 +1202,13 @@
+ val = avc1394_vcr_status( avc_handle, phyID );
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return val;
+ }
+
+ bool AVC::Timecode( int phyID, char* timecode )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1178,10 +1237,13 @@
+ }
+ pthread_mutex_unlock( &avc_mutex );
+ return true;
++#endif
++ return false;
+ }
+
+ int AVC::getNodeId( const char *guid )
+ {
++#if 0
+ pthread_mutex_lock( &avc_mutex );
+ if ( avc_handle != NULL )
+ {
+@@ -1204,6 +1266,7 @@
+ }
+ }
+ pthread_mutex_unlock( &avc_mutex );
++#endif
+ return -1;
+ }
+
+@@ -1213,6 +1276,7 @@
+ video1394Writer::video1394Writer( string device, unsigned int channel, unsigned int nBuffers,
+ unsigned int cip_n, unsigned int cip_d, unsigned int syt_offset )
+ {
++#if 0
+ m_fd = -1;
+ m_deviceName = device;
+ m_channel = channel;
+@@ -1271,12 +1335,13 @@
+ foo );
+ modal_message( buf );
+ }
+-
++#endif
+ }
+
+
+ video1394Writer::~video1394Writer()
+ {
++#if 0
+ if ( m_fd >= 0 )
+ {
+ w.buffer = ( v.nb_buffers + w.buffer - 1 ) % v.nb_buffers;
+@@ -1294,11 +1359,13 @@
+
+ close( m_fd );
+ }
++#endif
+ }
+
+
+ int video1394Writer::FillBuffer( unsigned char *data, unsigned char* targetbuf, unsigned long targetbufsize, unsigned int * packet_sizes, int video_packets_per_frame, int min_out_packet_size )
+ {
++#if 0
+ unsigned long frame_size = video_packets_per_frame * 480;
+ unsigned long vdata = 0;
+ unsigned long i;
+@@ -1354,12 +1421,14 @@
+
+ *packet_sizes++ = 0;
+
++#endif
+ return 1;
+ }
+
+
+ void video1394Writer::SendFrame( Frame &frame )
+ {
++#if 0
+ bool have_PAL = frame.IsPAL();
+
+ while ( unused_buffers-- )
+@@ -1386,11 +1455,13 @@
+ perror( "1. VIDEO1394_TALK_WAIT_BUFFER" );
+ }
+ unused_buffers = 1;
++#endif
+ }
+
+ dv1394Writer::dv1394Writer( string device, unsigned int channel, unsigned int nBuffers,
+ unsigned int cip_n, unsigned int cip_d, unsigned int syt_offset ) : isInitialised( false )
+ {
++#if 0
+ m_fd = -1;
+ m_deviceName = device;
+ m_channel = channel;
+@@ -1400,6 +1471,7 @@
+ m_syt_offset = syt_offset;
+
+ m_fd = open( m_deviceName.c_str(), O_RDWR );
++#endif
+ }
+
+
+@@ -1415,6 +1487,7 @@
+
+ void dv1394Writer::SendFrame( Frame &frame )
+ {
++#if 0
+ bool isPAL = frame.IsPAL();
+
+ if ( !isInitialised )
+@@ -1439,4 +1512,5 @@
+ }
+
+ write( m_fd, frame.data, ( isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE ) );
++#endif
+ }