diff --git a/veejay-current/veejay-server/libstream/v4lutils.c b/veejay-current/veejay-server/libstream/v4lutils.c index 0b9f3b90..8f0dfbfb 100644 --- a/veejay-current/veejay-server/libstream/v4lutils.c +++ b/veejay-current/veejay-server/libstream/v4lutils.c @@ -563,7 +563,7 @@ void v4lprint(v4ldevice *vd) veejay_msg(VEEJAY_MSG_DEBUG,"\tPalette:%x",vd->picture.palette); veejay_msg(VEEJAY_MSG_DEBUG,"\tWidth:%d",vd->mmap.width); veejay_msg(VEEJAY_MSG_DEBUG,"\tHeight:%d",vd->mmap.height); - + veejay_msg(VEEJAY_MSG_DEBUG,"\tNorm: %s", v4lvideo_templ_get_norm_str( vd->channel[0].norm )); veejay_msg(VEEJAY_MSG_DEBUG,"\tBuffer size: %08x",vd->mbuf.size); veejay_msg(VEEJAY_MSG_DEBUG,"\tNum buffers: %d",vd->mbuf.frames); veejay_msg(VEEJAY_MSG_DEBUG,"\t offsets[0]: %08x",vd->mbuf.offsets[0]); diff --git a/veejay-current/veejay-server/libstream/v4lvideo.c b/veejay-current/veejay-server/libstream/v4lvideo.c index 937b8dc0..9eac36f2 100644 --- a/veejay-current/veejay-server/libstream/v4lvideo.c +++ b/veejay-current/veejay-server/libstream/v4lvideo.c @@ -209,6 +209,15 @@ int v4lvideo_templ_get_palette( int p ) return -1; } +char *v4lvideo_templ_get_norm_str( int id ) { + int i; + for( i = 0; normlists[i].type != -1; i ++ ) { + if( normlists[i].type == id ) + return normlists[i].name; + } + return "?"; +} + int v4lvideo_templ_get_norm( const char *name ) { int i; diff --git a/veejay-current/veejay-server/libstream/v4lvideo.h b/veejay-current/veejay-server/libstream/v4lvideo.h index e88993b1..ed27c01c 100644 --- a/veejay-current/veejay-server/libstream/v4lvideo.h +++ b/veejay-current/veejay-server/libstream/v4lvideo.h @@ -29,6 +29,7 @@ int v4lvideo_templ_get_norm( const char *name ); int v4lvideo_templ_getfreq( const char *name ); int v4lvideo_templ_num_devices(); int v4lvideo_templ_get_palette( int p ); +char *v4lvideo_templ_get_norm_str(int id ); char **v4lvideo_templ_get_devices(int *num); diff --git a/veejay-current/veejay-server/man/veejay.1 b/veejay-current/veejay-server/man/veejay.1 index a5b82964..686c041c 100644 --- a/veejay-current/veejay-server/man/veejay.1 +++ b/veejay-current/veejay-server/man/veejay.1 @@ -225,6 +225,8 @@ Specify the default video4linux channel id .B VEEJAY_SWAP_RGB Capture in RGB or BGR (Video4Linux) .TP +.B VEEJAY_RUN_MODE +Set this to "CLASSIC" if you want to startup in low resolution .B Examples .TP .B VEEJAY_SCREEN_GEOMETRY=2624x1024+1600x0 diff --git a/veejay-current/veejay-server/veejay/liblavplayvj.c b/veejay-current/veejay-server/veejay/liblavplayvj.c index 30597624..9485f9c4 100644 --- a/veejay-current/veejay-server/veejay/liblavplayvj.c +++ b/veejay-current/veejay-server/veejay/liblavplayvj.c @@ -2918,11 +2918,7 @@ veejay_t *veejay_malloc() info->uc->sample_end = 0; info->net = 1; - info->dummy->width = 352; - info->dummy->height = 288; - info->dummy->fps = 25.0; - - for( i =0; i < 8 ; i ++ ) + for( i =0; i < 8 ; i ++ ) info->rlinks[i] = -1; veejay_memset(info->action_file[0],0,256); @@ -3627,21 +3623,45 @@ static int veejay_open_video_files(veejay_t *info, char **files, int num_files, //TODO: pass yuv sampling to dummy if( info->dummy->active ) { - if( !info->dummy->norm ) - info->dummy->norm = 'p'; - if( !info->dummy->fps ) + info->dummy->norm = override_norm; + if( override_norm == 'n' ) { + if(!info->dummy->fps) //@ if not set + info->dummy->fps = 30000.0/1001; + } + if(!info->dummy->fps) info->dummy->fps = 25.0; - if( !info->dummy->width ) - info->dummy->width = 352; - if( !info->dummy->height) - info->dummy->height = 288; - info->dummy->chroma = CHROMA422; - if( !info->dummy->arate) - info->dummy->arate = 48000; - info->edit_list = vj_el_dummy( 0, info->auto_deinterlace, info->dummy->chroma, - info->dummy->norm, info->dummy->width, info->dummy->height, info->dummy->fps, - info->pixel_format ); + int dw = 720; + int dh = (override_norm == 'p' ? 576 : 480); + + char *runClassic = getenv( "VEEJAY_RUN_MODE" ); + if( runClassic ) { + if( strncasecmp("CLASSIC",runClassic,7 ) == 0 ) { + dw = (override_norm == 'p' ? 352 : 360 ); + dh = dh / 2; + } + } + + if( !info->dummy->width ) + info->dummy->width = dw; + if( !info->dummy->height) + info->dummy->height = dh; + + info->dummy->chroma = CHROMA422; + if( info->audio ) { + if( !info->dummy->arate) + info->dummy->arate = 48000; + } + + info->edit_list = vj_el_dummy( 0, + info->auto_deinterlace, + info->dummy->chroma, + info->dummy->norm, + info->dummy->width, + info->dummy->height, + info->dummy->fps, + info->pixel_format + ); if( info->dummy->arate ) { @@ -3654,8 +3674,9 @@ static int veejay_open_video_files(veejay_t *info, char **files, int num_files, veejay_msg(VEEJAY_MSG_DEBUG, "Dummy Audio: %f KHz, %d channels, %d bps, %d bit audio", (float)el->audio_rate/1000.0,el->audio_chans,el->audio_bps,el->audio_bits); } - veejay_msg(VEEJAY_MSG_DEBUG,"Dummy Video: %dx%d, chroma %x, fps %2.2f", - info->dummy->width,info->dummy->height, info->dummy->chroma,info->dummy->fps); + veejay_msg(VEEJAY_MSG_DEBUG,"Dummy Video: %dx%d, chroma %x, framerate %2.2f, norm %s", + info->dummy->width,info->dummy->height, info->dummy->chroma,info->dummy->fps, + (info->dummy->norm == 'n' ? "NTSC" :"PAL")); } else diff --git a/veejay-current/veejay-server/veejay/veejay.c b/veejay-current/veejay-server/veejay/veejay.c index 8e1a7763..2edb2bd5 100644 --- a/veejay-current/veejay-server/veejay/veejay.c +++ b/veejay-current/veejay-server/veejay/veejay.c @@ -402,8 +402,8 @@ static int set_option(const char *name, char *value) info->dummy->height = atoi(optarg); } else if(strcmp(name, "norm") == 0 || strcmp(name, "N") == 0 ) { - info->dummy->norm = optarg[0]; - if(info->dummy->norm == 1 ) + int val = atoi(optarg); + if(val == 1 ) override_norm = 'n'; } else if(strcmp(name, "D") == 0 || strcmp(name, "composite") == 0)