X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fdv1394app.c;h=c462b50929538831754cdbf69f6b74e6f1bad11d;hb=348abadd910a29af82380c3b896f4eb4b2467483;hp=d367235c7ea4f88f3f08a499d2c87b7746fb36dd;hpb=8abeb6c8e20cb942513fa422d772550615610ee8;p=rugen diff --git a/src/dv1394app.c b/src/dv1394app.c index d367235..c462b50 100644 --- a/src/dv1394app.c +++ b/src/dv1394app.c @@ -401,8 +401,7 @@ dv1394app dv1394app_init( GtkWidget *window, char *instance ) // gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_item_quit_activate ), this ); /* Initialise the pages. */ - dv1394app_register_page( this, page_status_init( this ) ); - dv1394app_register_page( this, page_clips_init( this ) ); + dv1394app_register_page( this, page_operate_init( this ) ); dv1394app_register_page( this, page_command_init( this ) ); this->guard = 1; gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( this->page_buttons[ 0 ] ), TRUE ); @@ -555,3 +554,25 @@ void dv1394app_close( dv1394app this ) page_close( this->pages[ -- this->page_count ] ); free( this ); } + +char* frames2tc( int f, float fps, char* buf ) +{ + int tc[4] = { 0, 0, 0, 0 }; + float d; + int t; + + if ( fps ) + { + d = f / fps; + t = d; + + tc[0] = (d - t) * fps; + tc[1] = t % 60; t /= 60; + tc[2] = t % 60; t /= 60; + tc[3] = t % 24; + } + + sprintf(buf, "%.2d:%.2d:%.2d:%.2d", tc[3], tc[2], tc[1], tc[0]); + + return buf; +}