mirror of
https://github.com/game-stop/veejay.git
synced 2026-01-06 06:55:31 +01:00
@@ -359,7 +359,7 @@ void on_manualopacity_value_changed(GtkWidget *w, gpointer user_data)
|
||||
return;
|
||||
|
||||
gdouble val = GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value;
|
||||
int mode = is_button_toggled("toggle_fademethod");
|
||||
/* int mode = */is_button_toggled("toggle_fademethod");
|
||||
// int value = ( mode == 1 ? 0xff - (int) val : (int) val );
|
||||
int value = (int) val;
|
||||
|
||||
|
||||
@@ -35,14 +35,13 @@
|
||||
#include <veejay/libvevo.h>
|
||||
#include <src/vj-api.h>
|
||||
|
||||
|
||||
static int selected_skin = 0;
|
||||
extern int mt_get_max_tracks();
|
||||
extern int mt_get_max_tracks();
|
||||
static int load_midi = 0;
|
||||
static int port_num = 3490;
|
||||
static int port_num = DEFAULT_PORT_NUM;
|
||||
static char hostname[255];
|
||||
static int gveejay_theme = 0; // set to 1 to load with the default reloaded theme
|
||||
static int verbosity = 0;
|
||||
static int verbosity = 0;
|
||||
static int col = 0;
|
||||
static int row = 0;
|
||||
static int n_tracks = 7;
|
||||
@@ -59,47 +58,48 @@ static struct
|
||||
} skins[] = {
|
||||
{ "gveejay.reloaded.glade" },
|
||||
{ "reloaded_classic.glade" },
|
||||
{ NULL }
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
extern void reloaded_launcher( char *h, int p );
|
||||
extern void reloaded_launcher( char *h, int p );
|
||||
|
||||
static void usage(char *progname)
|
||||
{
|
||||
printf( "Usage: %s <options>\n",progname);
|
||||
printf( "where options are:\n");
|
||||
printf( "-h\t\tVeejay host to connect to (defaults to localhost) \n");
|
||||
printf( "-p\t\tVeejay port to connect to (defaults to 3490) \n");
|
||||
printf( "-t\t\tLoad gveejay's classic GTK theme\n");
|
||||
printf( "-n\t\tDont use colored text\n");
|
||||
printf( "-v\t\tBe extra verbose (usefull for debugging)\n");
|
||||
printf( "-s\t\tSet bank resolution (row X columns)\n");
|
||||
printf( "-P\t\tStart with preview enabled (1=1/1,2=1/2,3=1/4,4=1/8)\n");
|
||||
printf( "-X\t\tSet number of tracks\n");
|
||||
printf( "-l\t\tChoose layout (0=large screen, 1=small screens)\n");
|
||||
printf( "-V\t\tShow version, data directory and exit.\n");
|
||||
printf( "-m <file>\tMIDI configuration file.\n");
|
||||
printf( "-g\t\t<X,Y>\tWindow position on screen.\n");
|
||||
printf( "-b\t\tEnable beta features.\n");
|
||||
printf( "-a\t\tAuto-connect to local running veejays.\n");
|
||||
printf(" -L\t\tLow-bandwith connection (disables image loading in samplebank)\n");
|
||||
|
||||
printf( "\n\n");
|
||||
exit(-1);
|
||||
printf( "Usage: %s <options>\n",progname);
|
||||
printf( "where options are:\n");
|
||||
printf( "-h\t\tVeejay host to connect to (defaults to localhost) \n");
|
||||
printf( "-p\t\tVeejay port to connect to (defaults to %d) \n", DEFAULT_PORT_NUM);
|
||||
printf( "-t\t\tLoad gveejay's classic GTK theme\n");
|
||||
printf( "-n\t\tDont use colored text\n");
|
||||
printf( "-v\t\tBe extra verbose (usefull for debugging)\n");
|
||||
printf( "-s\t\tSet bank resolution (row X columns)\n");
|
||||
printf( "-P\t\tStart with preview enabled (1=1/1,2=1/2,3=1/4,4=1/8)\n");
|
||||
printf( "-X\t\tSet number of tracks\n");
|
||||
printf( "-l\t\tChoose layout (0=large screen, 1=small screens)\n");
|
||||
printf( "-V\t\tShow version, data directory and exit.\n");
|
||||
printf( "-m <file>\tMIDI configuration file.\n");
|
||||
printf( "-g\t\t<X,Y>\tWindow position on screen.\n");
|
||||
printf( "-b\t\tEnable beta features.\n");
|
||||
printf( "-a\t\tAuto-connect to local running veejays.\n");
|
||||
printf( "-L\t\tLow-bandwith connection (disables image loading in samplebank)\n");
|
||||
|
||||
printf( "\n\n");
|
||||
exit(-1);
|
||||
}
|
||||
static int set_option( const char *name, char *value )
|
||||
|
||||
static int set_option( const char *name, char *value )
|
||||
{
|
||||
int err = 0;
|
||||
if( strcmp(name, "h") == 0 || strcmp(name, "hostname") == 0 )
|
||||
{
|
||||
strcpy( hostname, optarg );
|
||||
int err = 0;
|
||||
if( strcmp(name, "h") == 0 || strcmp(name, "hostname") == 0 )
|
||||
{
|
||||
strcpy( hostname, optarg );
|
||||
launcher ++;
|
||||
}
|
||||
else if( strcmp(name, "p") == 0 || strcmp(name ,"port") == 0 )
|
||||
{
|
||||
if(sscanf( optarg, "%d", &port_num ))
|
||||
launcher++;
|
||||
}
|
||||
}
|
||||
else if( strcmp(name, "p") == 0 || strcmp(name ,"port") == 0 )
|
||||
{
|
||||
if(sscanf( optarg, "%d", &port_num ))
|
||||
launcher++;
|
||||
}
|
||||
else if (strcmp(name, "l" ) == 0 ) {
|
||||
selected_skin = atoi( optarg);
|
||||
}
|
||||
@@ -158,39 +158,45 @@ static int set_option( const char *name, char *value )
|
||||
err++;
|
||||
}
|
||||
}
|
||||
else if (strcmp(name,"b") == 0 || strcmp(name, "beta" ) == 0 ) {
|
||||
else if (strcmp(name,"b") == 0 || strcmp(name, "beta" ) == 0 )
|
||||
{
|
||||
beta = 1;
|
||||
}
|
||||
else if (strcmp(name,"a") == 0 ) {
|
||||
else if (strcmp(name,"a") == 0 )
|
||||
{
|
||||
auto_connect = 1;
|
||||
}
|
||||
else if( strcmp(name,"L") == 0 ) {
|
||||
else if( strcmp(name,"L") == 0 )
|
||||
{
|
||||
set_disable_sample_image(1);
|
||||
}
|
||||
else
|
||||
err++;
|
||||
return err;
|
||||
else
|
||||
err++;
|
||||
return err;
|
||||
}
|
||||
|
||||
static volatile gulong g_trap_free_size = 0;
|
||||
static struct timeval time_last_;
|
||||
|
||||
static char **cargv = NULL;
|
||||
|
||||
|
||||
gboolean gveejay_idle(gpointer data)
|
||||
gboolean gveejay_idle(gpointer data)
|
||||
{
|
||||
if(gveejay_running())
|
||||
{
|
||||
int sync = 0;
|
||||
if( is_alive(&sync) == FALSE ) {
|
||||
if( is_alive(&sync) == FALSE )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if( sync ) {
|
||||
if( sync )
|
||||
{
|
||||
if( gveejay_time_to_sync( get_ui_info() ) )
|
||||
{
|
||||
veejay_update_multitrack( get_ui_info() );
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
// gveejay_sleep( get_ui_info() );
|
||||
}
|
||||
|
||||
@@ -208,7 +214,7 @@ gboolean gveejay_idle(gpointer data)
|
||||
}
|
||||
|
||||
static void clone_args( char *argv[], int argc )
|
||||
{
|
||||
{
|
||||
int i = 0;
|
||||
if( argc <= 0 )
|
||||
return;
|
||||
@@ -217,15 +223,15 @@ static void clone_args( char *argv[], int argc )
|
||||
memset( cargv, 0, sizeof(char*) * (argc+1));
|
||||
for( i = 0; i < argc ; i ++ )
|
||||
cargv[i] = strdup( argv[i] );
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
char option[2];
|
||||
int n;
|
||||
int err=0;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char option[2];
|
||||
int n;
|
||||
int err=0;
|
||||
|
||||
if(!argc) usage(argv[0]);
|
||||
if(!argc) usage(argv[0]);
|
||||
|
||||
clone_args( argv, argc );
|
||||
|
||||
@@ -239,24 +245,24 @@ int main(int argc, char *argv[]) {
|
||||
snprintf(hostname,sizeof(hostname), "127.0.0.1");
|
||||
|
||||
while( ( n = getopt( argc, argv, "s:h:p:tabnvLHfX:P:Vl:T:m:g:")) != EOF )
|
||||
{
|
||||
{
|
||||
sprintf(option, "%c", n );
|
||||
err += set_option( option, optarg);
|
||||
if(err) usage(argv[0]);
|
||||
}
|
||||
if( optind > argc )
|
||||
}
|
||||
if( optind > argc )
|
||||
err ++;
|
||||
|
||||
if( err ) usage(argv[0]);
|
||||
if( err ) usage(argv[0]);
|
||||
|
||||
glade_init();
|
||||
|
||||
|
||||
vj_mem_init();
|
||||
|
||||
vevo_strict_init();
|
||||
|
||||
find_user_themes(gveejay_theme);
|
||||
|
||||
|
||||
vj_gui_set_debug_level( verbosity , n_tracks,0,0);
|
||||
set_skin( selected_skin, gveejay_theme );
|
||||
|
||||
@@ -264,11 +270,10 @@ int main(int argc, char *argv[]) {
|
||||
gui_load_theme();
|
||||
|
||||
register_signals();
|
||||
|
||||
|
||||
vj_gui_init( skins[selected_skin].file, launcher, hostname, port_num, use_threads, load_midi, midi_file,beta,auto_connect);
|
||||
vj_gui_style_setup();
|
||||
|
||||
|
||||
if( preview )
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Starting with preview enabled");
|
||||
@@ -282,18 +287,15 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
memset( &time_last_, 0, sizeof(struct timeval));
|
||||
|
||||
while(gveejay_running()) {
|
||||
while(gveejay_running())
|
||||
{
|
||||
if(gveejay_idle(NULL)==FALSE)
|
||||
break;
|
||||
while( gtk_events_pending() )
|
||||
while( gtk_events_pending() )
|
||||
gtk_main_iteration();
|
||||
|
||||
}
|
||||
|
||||
veejay_msg(VEEJAY_MSG_INFO, "See you!");
|
||||
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -762,7 +762,7 @@ static char *mt_new_connection_dialog(multitracker_t *mt, int *port_num, int *er
|
||||
gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT );
|
||||
gtk_window_set_resizable( GTK_WINDOW( dialog ), FALSE );
|
||||
|
||||
gint base = 3490;
|
||||
gint base = DEFAULT_PORT_NUM;
|
||||
|
||||
gint p = (1000 * (mt->selected)) + base;
|
||||
|
||||
@@ -1010,7 +1010,7 @@ void multitrack_toggle_preview( void *data, int track_id, int status, GtkWidget
|
||||
if(track_id == -1 )
|
||||
{
|
||||
gvr_track_toggle_preview( mt->preview, mt->master_track, status );
|
||||
veejay_msg(2, "VeejayGrabber: master preview %s", (status ? "enabled" : "disabled") );
|
||||
veejay_msg(VEEJAY_MSG_INFO, "VeejayGrabber: master preview %s", (status ? "enabled" : "disabled") );
|
||||
if( status == 0 )
|
||||
multitrack_set_logo( data, img );
|
||||
}
|
||||
|
||||
@@ -177,14 +177,14 @@ static int recvvims( veejay_track_t *v, gint header_len, gint *payload, guchar *
|
||||
{
|
||||
if( n == -1 && v->is_master)
|
||||
reloaded_schedule_restart();
|
||||
veejay_msg(0,"Reading header of %d bytes: %d", header_len,n );
|
||||
veejay_msg(VEEJAY_MSG_ERROR,"Reading header of %d bytes: %d", header_len,n );
|
||||
free(tmp);
|
||||
return n;
|
||||
}
|
||||
|
||||
if( sscanf( (char*)tmp, "%6d%1d", &len,&(v->grey_scale) )<=0)
|
||||
{
|
||||
veejay_msg(0, "Can't parse header (datastream polluted)");
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Can't parse header (datastream polluted)");
|
||||
free(tmp);
|
||||
return 0;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ static int recvvims( veejay_track_t *v, gint header_len, gint *payload, guchar *
|
||||
if( len <= 0 )
|
||||
{
|
||||
free(tmp);
|
||||
veejay_msg(0, "Frame is empty");
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Frame is empty");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ static int recvvims( veejay_track_t *v, gint header_len, gint *payload, guchar *
|
||||
{
|
||||
if( n == -1 && v->is_master )
|
||||
reloaded_schedule_restart();
|
||||
veejay_msg(0, "Received %d out of %d bytes", bw,len);
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Received %d out of %d bytes", bw,len);
|
||||
free(tmp);
|
||||
*payload = 0;
|
||||
return n;
|
||||
@@ -335,7 +335,7 @@ static int veejay_process_status( veejay_preview_t *vp, veejay_track_t *v )
|
||||
}
|
||||
|
||||
if( sscanf( (char*) status_len+1, "%03d", &bytes ) != 1 ) {
|
||||
veejay_msg(0, "Invalid status message.");
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Invalid status message.");
|
||||
bytes = 0;
|
||||
reloaded_schedule_restart();
|
||||
break;
|
||||
@@ -452,7 +452,7 @@ static int gvr_preview_process_image( veejay_preview_t *vp, veejay_track_t *v )
|
||||
int n = veejay_get_image_data( vp, v );
|
||||
|
||||
if(n == 0 ) {
|
||||
veejay_msg(0, "No image data %d x %d" , v->width,v->height);
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "No image data %d x %d" , v->width,v->height);
|
||||
//@ settle
|
||||
fail_connection ++;
|
||||
if( fail_connection > 2 ) {
|
||||
@@ -1024,7 +1024,7 @@ static int gvr_veejay( veejay_preview_t *vp , veejay_track_t *v, int track_num
|
||||
int ok = vj_client_connect( v->fd, v->hostname, NULL, v->port_num );
|
||||
if( ok <= 0 )
|
||||
{
|
||||
veejay_msg(0, "VeejayGrabber: Unable to reconnect to %s, Destroying Track %d",
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "VeejayGrabber: Unable to reconnect to %s, Destroying Track %d",
|
||||
(v->hostname ? v->hostname : "<unknown>"),
|
||||
track_num );
|
||||
vj_client_free(v->fd);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,48 +19,60 @@
|
||||
|
||||
#ifndef VJAPI_H
|
||||
#define VJAPI_H
|
||||
int veejay_tick();
|
||||
|
||||
#define DEFAULT_PORT_NUM 3490
|
||||
|
||||
int veejay_tick();
|
||||
void veejay_preview(int p);
|
||||
int veejay_update_multitrack();
|
||||
void veejay_sleep( void *ui );
|
||||
|
||||
void *get_ui_info();
|
||||
void vj_gui_set_geom(int x, int y);
|
||||
char *get_glade_path();
|
||||
char *get_gveejay_dir();
|
||||
int get_total_frames();
|
||||
void get_gd(char *buf, char *suf, const char *filename);
|
||||
|
||||
void set_disable_sample_image(int status);
|
||||
void set_skin(int skin, int invert);
|
||||
|
||||
void default_bank_values(int *col, int *row );
|
||||
gboolean is_alive( int *sync );
|
||||
|
||||
int _effect_get_minmax( int effect_id, int *min, int *max, int index );
|
||||
void find_user_themes();
|
||||
void register_signals();
|
||||
int is_button_toggled(const char *name);
|
||||
gchar *_utf8str( const char *c_str );
|
||||
void gui_load_theme();
|
||||
|
||||
void vj_gui_cb(int state, char *hostname, int port_num);
|
||||
void vj_gui_init(char *glade_file, int launcher, char *hostname, int port_num, int threads,int load_midi, char *midi_file, int beta, int auto_connect);
|
||||
int vj_gui_reconnect( char *host, char *group, int port);
|
||||
int vj_gui_reconnect( char *host, char *group, int port);
|
||||
void vj_gui_free();
|
||||
void vj_fork_or_connect_veejay();
|
||||
void vj_gui_wipe();
|
||||
void vj_gui_enable(void);
|
||||
void vj_gui_disable(void);
|
||||
void vj_gui_disconnect(void);
|
||||
int vj_get_preview_box_w();
|
||||
int vj_get_preview_box_h();
|
||||
void vj_gui_set_geom(int x, int y);
|
||||
void vj_gui_set_debug_level(int level, int preview_p, int pw, int ph);
|
||||
void get_gd(char *buf, char *suf, const char *filename);
|
||||
void vj_gui_theme_setup(int default_theme);
|
||||
void vj_gui_set_timeout(int timer);
|
||||
void set_skin(int skin, int invert);
|
||||
void default_bank_values(int *col, int *row );
|
||||
void vj_gui_style_setup();
|
||||
gboolean gveejay_running();
|
||||
gboolean is_alive( int *sync );
|
||||
int vj_gui_sleep_time( void );
|
||||
int get_total_frames();
|
||||
int vj_img_cb(GdkPixbuf *img );
|
||||
int vj_get_preview_box_w();
|
||||
int vj_get_preview_box_h();
|
||||
int _effect_get_minmax( int effect_id, int *min, int *max, int index );
|
||||
void vj_gui_cb(int state, char *hostname, int port_num);
|
||||
void veejay_preview(int p);
|
||||
int is_button_toggled(const char *name);
|
||||
gchar *_utf8str( const char *c_str );
|
||||
void find_user_themes();
|
||||
int gveejay_user_preview();
|
||||
char *get_glade_path();
|
||||
char *get_gveejay_dir();
|
||||
int gveejay_restart();
|
||||
int gveejay_update();
|
||||
int update_gveejay();
|
||||
int veejay_update_multitrack();
|
||||
void veejay_sleep( void *ui );
|
||||
int gveejay_time_to_sync( void *ptr );
|
||||
void gui_load_theme();
|
||||
void register_signals();
|
||||
void gveejay_preview(int p);
|
||||
void vj_gui_style_setup();
|
||||
void vj_gui_theme_setup(int default_theme);
|
||||
|
||||
#endif
|
||||
int vj_img_cb(GdkPixbuf *img );
|
||||
void vj_fork_or_connect_veejay();
|
||||
|
||||
gboolean gveejay_running();
|
||||
int gveejay_user_preview();
|
||||
void gveejay_preview(int p);
|
||||
int gveejay_restart();
|
||||
int gveejay_update();
|
||||
int gveejay_new_slot(int mode);
|
||||
int gveejay_time_to_sync( void *ptr );
|
||||
int update_gveejay();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,11 @@ Veejay has limited audio support.
|
||||
PREPARE
|
||||
-------
|
||||
|
||||
You need an AVI file with an audio track encoded in PCM WAVE, 44-48Khz, 2 channels (stereo) (16 bit)
|
||||
You need an AVI file with an audio track encoded in signed PCM WAVE, 44-48Khz, 2 channels (stereo) (16 bit)
|
||||
|
||||
For example with ffmpeg/avconv you can use the "PCM signed 16-bit little-endian" codec named "pcm_s16le"
|
||||
|
||||
# avconv myvideo.mp4 -q:v 1 -vcodec mjpeg -acodec pcm_s16le -s 1024x576 myvideo.avi
|
||||
|
||||
|
||||
RUN
|
||||
@@ -15,10 +19,11 @@ RUN
|
||||
|
||||
Veejay only has support for jackd1 (the old jack)
|
||||
|
||||
Start jackd prior to starting veejay:
|
||||
Start jackd prior to starting veejay :
|
||||
|
||||
# jackd -d alsa -P
|
||||
|
||||
Nota : jack audio server must be configurated with the same sampling rate has the video has been encoded with.
|
||||
|
||||
Now, start veejay:
|
||||
|
||||
@@ -29,6 +34,8 @@ allowing for smoother audio playback (especially when used in combination of spe
|
||||
|
||||
The -m commandline option is further explained in docs/HowtoCache.txt
|
||||
|
||||
Nota : The video you start veejay with must contains a sound stream, else the jack transport is not started ... even if -a option
|
||||
|
||||
AUDIO PLAYBACK PROBLEMS
|
||||
-----------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user