--- src/ieee1394io.cc.orig	Sun Mar 28 20:42:44 2004
+++ src/ieee1394io.cc	Sat Apr 10 23:49:25 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;
 
 
@@ -283,7 +287,7 @@
 raw1394Reader::raw1394Reader( int p, int c, int bufSize ) :
 		IEEE1394Reader( c, bufSize ), port( p )
 {
-	handle = NULL;
+	//handle = NULL;
 	cerr << ">>> Using raw1394 capture" << endl;
 }
 
@@ -362,28 +366,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 )
@@ -402,11 +410,13 @@
 
 void raw1394Reader::Close()
 {
+#if 0
 	if ( handle != NULL )
 	{
 		raw1394_destroy_handle( handle );
 		handle = NULL;
 	}
+#endif
 }
 
 bool raw1394Reader::StartReceive()
@@ -416,7 +426,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 )
@@ -430,8 +440,8 @@
 
 void raw1394Reader::StopReceive()
 {
-	if ( handle != NULL )
-		raw1394_stop_iso_rcv( handle, channel );
+//	if ( handle != NULL )
+//		raw1394_stop_iso_rcv( handle, channel );
 }
 
 
@@ -467,6 +477,7 @@
  
 */
 
+#if 0
 int raw1394Reader::Handler( raw1394handle_t handle, int channel, size_t length,
                             quadlet_t *data )
 {
@@ -573,6 +584,7 @@
 
 	return 0;
 }
+#endif
 
 
 /** The thread responsible for polling the raw1394 interface.
@@ -583,6 +595,7 @@
 */
 void* raw1394Reader::Thread( void* arg )
 {
+#if 0
 	raw1394Reader * theReader = ( raw1394Reader* ) arg;
 
 	while ( true )
@@ -590,6 +603,7 @@
 		raw1394_loop_iterate( theReader->handle );
 		pthread_testcancel();
 	}
+#endif
 	return NULL;
 }
 
@@ -682,6 +696,7 @@
 
 bool dv1394Reader::Open()
 {
+#if 0
 	int n_frames = DV1394_MAX_FRAMES / 4;
 	struct dv1394_init init =
 	    {
@@ -715,6 +730,8 @@
 	}
 
 	return true;
+#endif
+	return false;
 }
 
 
@@ -723,6 +740,7 @@
 */
 void dv1394Reader::Close()
 {
+#if 0
 	if ( m_dv1394_fd != -1 )
 	{
 		if ( m_dv1394_map != NULL )
@@ -731,11 +749,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 ) )
 	{
@@ -743,6 +763,8 @@
 		return false;
 	}
 	return true;
+#endif
+	return false;
 }
 
 
@@ -751,6 +773,7 @@
 
 bool dv1394Reader::Handler( int handle )
 {
+#if 0
 	struct dv1394_status dvst;
 
 	if ( ioctl( handle, DV1394_WAIT_FRAMES, 1 ) )
@@ -828,6 +851,8 @@
 
 	}
 	return true;
+#endif
+	return false;
 }
 
 
@@ -859,6 +884,7 @@
 
 AVC::AVC( int p ) : port( p )
 {
+#if 0
 	pthread_mutex_init( &avc_mutex, NULL );
 	avc_handle = NULL;
 	int numcards;
@@ -890,6 +916,7 @@
 		cerr << exc << endl;
 	}
 	return ;
+#endif
 }
 
 
@@ -899,6 +926,7 @@
 
 AVC::~AVC()
 {
+#if 0
 	if ( avc_handle != NULL )
 	{
 		pthread_mutex_lock( &avc_mutex );
@@ -906,11 +934,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;
@@ -918,7 +948,7 @@
 	common->getPageCapture() ->driver_locked = true;
 	return 0;
 }
-
+#endif
 
 /** See if a node_id is still valid and pointing to an AV/C Recorder.
  
@@ -934,6 +964,7 @@
 int AVC::isPhyIDValid( int phyID )
 {
 	int value = -1;
+#if 0
 	pthread_mutex_lock( &avc_mutex );
 	if ( avc_handle != NULL )
 	{
@@ -976,6 +1007,7 @@
 		}
 	}
 	pthread_mutex_unlock( &avc_mutex );
+#endif
 	return value;
 }
 
@@ -984,6 +1016,7 @@
 */
 void AVC::Noop( void )
 {
+#if 0
 	struct pollfd raw1394_poll;
 	raw1394_poll.fd = raw1394_get_fd( avc_handle );
 	raw1394_poll.events = POLLIN;
@@ -994,11 +1027,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 )
 	{
@@ -1010,12 +1045,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 )
 	{
@@ -1032,12 +1069,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 )
 	{
@@ -1050,12 +1089,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 )
 	{
@@ -1063,12 +1104,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 )
 	{
@@ -1076,11 +1119,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 )
 	{
@@ -1088,11 +1133,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 )
 	{
@@ -1100,11 +1147,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 )
 	{
@@ -1112,11 +1161,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 )
 	{
@@ -1124,11 +1175,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 )
 	{
@@ -1136,11 +1189,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 )
 	{
@@ -1148,12 +1203,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 )
 	{
@@ -1161,11 +1218,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 )
 	{
@@ -1194,10 +1253,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 )
 	{
@@ -1220,6 +1282,7 @@
 		}
 	}
 	pthread_mutex_unlock( &avc_mutex );
+#endif
 	return -1;
 }
 
@@ -1227,6 +1290,7 @@
 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;
@@ -1236,6 +1300,7 @@
 	m_syt_offset = syt_offset;
 
 	m_fd = open( m_deviceName.c_str(), O_RDWR );
+#endif
 }
 
 
@@ -1251,6 +1316,7 @@
 
 void dv1394Writer::SendFrame( Frame &frame )
 {
+#if 0
 	bool isPAL = frame.IsPAL();
 
 	if ( !isInitialised )
@@ -1275,4 +1341,5 @@
 	}
 
 	write( m_fd, frame.data, ( isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE ) );
+#endif
 }
