#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sched.h>
/* Application header files */
#include <miracle/miracle_local.h>
if ( argc > 2 && !strcmp( argv[ 1 ], "-s" ) )
{
- printf( "DV1394D Client Instance\n" );
+ printf( "Miracle Client Instance\n" );
parser = valerie_parser_init_remote( argv[ 2 ], 5250 );
response = valerie_parser_connect( parser );
index = 3;
}
else
{
- printf( "DV1394D Standalone Instance\n" );
+ struct sched_param scp;
+
+ // Use realtime scheduling if possible
+ memset( &scp, '\0', sizeof( scp ) );
+ scp.sched_priority = sched_get_priority_max( SCHED_FIFO ) - 1;
+#ifndef __DARWIN__
+ sched_setscheduler( 0, SCHED_FIFO, &scp );
+#endif
+
+ printf( "Miracle Standalone Instance\n" );
parser = miracle_parser_init_local( );
response = valerie_parser_connect( parser );
}
while ( response != NULL && prompt( temp, 1024 ) )
{
valerie_util_trim( valerie_util_chomp( temp ) );
- if ( !strcmp( temp, "BYE" ) )
+ if ( !strcasecmp( temp, "BYE" ) )
{
break;
}
}
else
{
- fprintf( stderr, "Unable to connect to a dv1394 instance.\n" );
+ fprintf( stderr, "Unable to connect to a Miracle instance.\n" );
}
printf( "\n" );