X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmiracle%2Fmiracle_local.c;h=374d5fd479c052501b75c564cae9e9a5652ecaa3;hb=2f768c42c67ec9802222032f6d2bc63d7a3c6afb;hp=9929e1230bdaa78618dde1d3df2aee577e324093;hpb=8a3795b090723264c973d274eedc28da480e76fd;p=melted diff --git a/src/miracle/miracle_local.c b/src/miracle/miracle_local.c index 9929e12..374d5fd 100644 --- a/src/miracle/miracle_local.c +++ b/src/miracle/miracle_local.c @@ -26,7 +26,11 @@ #include #include #include + +/* Needed for backtrace on linux */ +#ifdef linux #include +#endif /* Valerie header files */ #include @@ -174,6 +178,7 @@ static command_t vocabulary[] = {"INSERT", miracle_insert, 1, ATYPE_STRING, "Insert a clip at the given clip index."}, {"REMOVE", miracle_remove, 1, ATYPE_NONE, "Remove a clip at the given clip index."}, {"CLEAN", miracle_clean, 1, ATYPE_NONE, "Clean a unit by removing all but the currently playing clip."}, + {"CLEAR", miracle_clear, 1, ATYPE_NONE, "Clear a unit by removing all clips."}, {"MOVE", miracle_move, 1, ATYPE_INT, "Move a clip to another clip index."}, {"APND", miracle_append, 1, ATYPE_STRING, "Append a clip specified in absolute filename argument."}, {"PLAY", miracle_play, 1, ATYPE_NONE, "Play a loaded clip at speed -2000 to 2000 where 1000 = normal forward speed."}, @@ -290,6 +295,7 @@ void signal_handler( int sig ) static void sigsegv_handler() { +#ifdef linux void *array[ 10 ]; size_t size; char **strings; @@ -308,6 +314,9 @@ static void sigsegv_handler() free( strings ); miracle_log( LOG_CRIT, "\nDone dumping - exiting.\n" ); +#else + miracle_log( LOG_CRIT, "\a\nMiracle experienced a segmentation fault.\n" ); +#endif exit( EXIT_FAILURE ); } @@ -494,8 +503,10 @@ static valerie_response miracle_local_execute( miracle_local local, char *comman static void miracle_local_close( miracle_local local ) { miracle_delete_all_units(); - pthread_kill_other_threads_np(); +#ifdef linux + //pthread_kill_other_threads_np(); miracle_log( LOG_DEBUG, "Clean shutdown." ); free( local ); - //mlt_factory_close( ); + mlt_factory_close( ); +#endif }