summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2015-06-08 22:11:21 (GMT)
committer niels <niels@dyne.org>2015-06-08 22:11:21 (GMT)
commitb1e78d6c159e9bef4b107cb4ce247198a5bf77cf (patch)
treeb2d78b341e8d558759527c1dbc4f2b9d749b5efa
parentbe8bb83126ed8c576f28d5aa0b60e1dc22bf03c1 (diff)
fix formatting in -u/--dump-events, change status message maximum length to MESSAGE_SIZE, remove unused allocated buffer, remove unicap left-over, add comment, remove calls to obsolete function, update MAN page, update environment variables shown in -u/--dump-eventsv1.5.50
-rw-r--r--veejay-current/veejay-server/libsample/sampleadm.c2
-rw-r--r--veejay-current/veejay-server/libstream/vj-tag.c2
-rw-r--r--veejay-current/veejay-server/libvje/vj-effect.c10
-rw-r--r--veejay-current/veejay-server/man/veejay.14
-rw-r--r--veejay-current/veejay-server/veejay/liblavplayvj.c40
-rw-r--r--veejay-current/veejay-server/veejay/veejay.c5
-rw-r--r--veejay-current/veejay-server/veejay/vims.h2
-rw-r--r--veejay-current/veejay-server/veejay/vj-composite.c7
-rw-r--r--veejay-current/veejay-server/veejay/vj-lib.h1
-rw-r--r--veejay-current/veejay-server/veejay/vj-perform.c2
10 files changed, 33 insertions, 42 deletions
diff --git a/veejay-current/veejay-server/libsample/sampleadm.c b/veejay-current/veejay-server/libsample/sampleadm.c
index afc973c..096b6aa 100644
--- a/veejay-current/veejay-server/libsample/sampleadm.c
+++ b/veejay-current/veejay-server/libsample/sampleadm.c
@@ -2520,7 +2520,7 @@ int sample_chain_sprint_status( int s1,int cache,int sa,int ca, int pfps, int fr
e_s = sample->encoder_total_frames_recorded;
}
- veejay_sprintf(str,1024,
+ veejay_sprintf(str,MESSAGE_SIZE,
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
pfps,
frame,
diff --git a/veejay-current/veejay-server/libstream/vj-tag.c b/veejay-current/veejay-server/libstream/vj-tag.c
index 30e4d69..7111c21 100644
--- a/veejay-current/veejay-server/libstream/vj-tag.c
+++ b/veejay-current/veejay-server/libstream/vj-tag.c
@@ -3640,7 +3640,7 @@ int vj_tag_sprint_status( int tag_id,int cache,int sa, int ca, int pfps,int fram
//if (!tag)
//return -1;
- snprintf(str, 1024,
+ snprintf(str, MESSAGE_SIZE,
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
pfps,
frame,
diff --git a/veejay-current/veejay-server/libvje/vj-effect.c b/veejay-current/veejay-server/libvje/vj-effect.c
index ef3fce1..a3033bc 100644
--- a/veejay-current/veejay-server/libvje/vj-effect.c
+++ b/veejay-current/veejay-server/libvje/vj-effect.c
@@ -738,16 +738,16 @@ void vj_effect_dump() {
{
if(vj_effects[i])
{
- printf("\t%d\t\t\t%s\t\t", vj_effect_get_real_id(i), vj_effects[i]->description);
+ printf("\t%d\t%-32s\n", vj_effect_get_real_id(i), vj_effects[i]->description);
if(vj_effects[i]->num_params > 0)
{
int j=0;
for(j=0; j < vj_effects[i]->num_params; j++) {
- printf("\n\t\t\t%s\t\t\t%d\t%d - %d\n", vj_effects[i]->param_description[j] , j, vj_effects[i]->limits[0][j],vj_effects[i]->limits[1][j]);
+ printf("\t\t\t%-24s\t\t\t%d\t%d - %d\n", vj_effects[i]->param_description[j] , j, vj_effects[i]->limits[0][j],vj_effects[i]->limits[1][j]);
}
- }
- else
- printf("\n");
+ }
+ printf("\n");
+
}
}
diff --git a/veejay-current/veejay-server/man/veejay.1 b/veejay-current/veejay-server/man/veejay.1
index 71ad9a9..249e8b5 100644
--- a/veejay-current/veejay-server/man/veejay.1
+++ b/veejay-current/veejay-server/man/veejay.1
@@ -190,10 +190,6 @@ Benchmark veejay's core functions (multi-thread vs single thread model) using a
.TP
.SH Environment variables
.TP
-.B VEEJAY_CAPTURE_DRIVER
-You can set this environment variable to 'unicap' for capture
-device detection and grabbing.
-.TP
.B VEEJAY_MULTITHREAD_TASKS
You can set this environment variable to the number of threads you would like to spawn for veejay's pixel tasks. This option is automatically enabled if you run high resolution video.
.TP
diff --git a/veejay-current/veejay-server/veejay/liblavplayvj.c b/veejay-current/veejay-server/veejay/liblavplayvj.c
index af6f7cd..43617e0 100644
--- a/veejay-current/veejay-server/veejay/liblavplayvj.c
+++ b/veejay-current/veejay-server/veejay/liblavplayvj.c
@@ -429,16 +429,17 @@ int veejay_free(veejay_t * info)
free( info->seq->samples );
free( info->seq );
- free(info->status_msg);
- free(info->status_what);
+ free(info->status_what);
free(info->homedir);
- free(info->uc);
+ free(info->uc);
+
if(info->cpumask) free(info->cpumask);
if(info->mask) free(info->mask);
if(info->rlinks) free(info->rlinks);
- if(info->rmodes) free(info->rmodes );
+ if(info->rmodes) free(info->rmodes );
+
free(settings);
- free(info);
+ free(info);
return 1;
}
@@ -1110,7 +1111,7 @@ void veejay_pipe_write_status(veejay_t * info)
break;
case VJ_PLAYBACK_MODE_PLAIN:
// 26 status symbols
- snprintf(info->status_what,1024, " %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
+ snprintf(info->status_what,MESSAGE_SIZE, " %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
info->real_fps,
settings->current_frame_num,
info->uc->playback_mode,
@@ -1148,7 +1149,8 @@ void veejay_pipe_write_status(veejay_t * info)
}
d_len = strlen(info->status_what);
- snprintf( info->status_line, 1500, "V%03dS%s", d_len, info->status_what );
+ info->status_line_len = d_len + 5;
+ snprintf( info->status_line, MESSAGE_SIZE, "V%03dS%s", d_len, info->status_what );
if (info->uc->chain_changed == 1)
info->uc->chain_changed = 0;
@@ -1258,19 +1260,17 @@ void veejay_check_homedir(void *arg)
}
}
- sprintf(tmp, "%s/plugins.cfg", path );
+ snprintf(tmp,sizeof(tmp), "%s/plugins.cfg", path );
struct statfs ts;
if( statfs( tmp, &ts ) != 0 )
{
veejay_msg(VEEJAY_MSG_WARNING,"No plugins.cfg found (see DOC/HowtoPlugins)");
}
- sprintf(tmp, "%s/viewport.cfg", path);
- memset( &ts,0,sizeof(struct statfs));
+ snprintf(tmp,sizeof(tmp), "%s/viewport.cfg", path);
if( statfs( tmp, &ts ) != 0 )
{
veejay_msg(VEEJAY_MSG_WARNING,"No viewport.cfg found (start veejay with -D -w -h and press CTRL-V to setup viewport)");
}
-
}
/******************************************************
@@ -1312,12 +1312,12 @@ static void veejay_handle_callbacks(veejay_t *info) {
veejay_pipe_write_status( info );
/* create status message and write to clients */
- int status_line_len = strlen( info->status_line );
+// int status_line_len = strlen( info->status_line );
int i;
for( i = 0; i < VJ_MAX_CONNECTIONS ; i ++ ) {
if( !vj_server_link_can_write( info->vjs[VEEJAY_PORT_STA], i ) )
continue;
- int res = vj_server_send( info->vjs[VEEJAY_PORT_STA], i, (uint8_t*)info->status_line, status_line_len);
+ int res = vj_server_send( info->vjs[VEEJAY_PORT_STA], i, (uint8_t*)info->status_line, info->status_line_len);
if( res < 0 ) {
_vj_server_del_client( info->vjs[VEEJAY_PORT_CMD], i );
_vj_server_del_client( info->vjs[VEEJAY_PORT_STA], i );
@@ -1743,17 +1743,7 @@ int veejay_init(veejay_t * info, int x, int y,char *arg, int def_tags, int gen_t
vj_tag_set_veejay_t(info);
-#ifdef HAVE_V4L
int driver = 1;
- char *driver_str = getenv("VEEJAY_CAPTURE_DRIVER");
- if( driver_str != NULL ) {
- if( strncasecmp( "unicap",driver_str, 6) == 0 )
- driver = 0;
- }
-#else
- int driver = 1;
-#endif
-
if (vj_tag_init(info->video_output_width, info->video_output_height, info->pixel_format,driver) != 0) {
veejay_msg(VEEJAY_MSG_ERROR, "Error while initializing Stream Manager");
return -1;
@@ -2723,7 +2713,6 @@ veejay_t *veejay_malloc()
veejay_memset( &(info->settings->viewport ), 0, sizeof(VJRectangle));
info->status_what = (char*) vj_calloc(sizeof(char) * MESSAGE_SIZE );
- info->status_msg = (char*) vj_calloc(sizeof(char) * MESSAGE_SIZE+5);
info->uc = (user_control *) vj_calloc(sizeof(user_control));
if (!(info->uc))
@@ -2773,7 +2762,8 @@ veejay_t *veejay_malloc()
info->uc->sample_end = 0;
info->uc->ram_chain = 1; /* enable, keep FX chain buffers in memory (reduces the number of malloc/free of frame buffers) */
info->net = 1;
- info->status_line = (char*) vj_calloc(sizeof(char) * 1500 );
+ info->status_line = (char*) vj_calloc(sizeof(char) * MESSAGE_SIZE );
+ info->status_line_len = 0;
for( i =0; i < VJ_MAX_CONNECTIONS ; i ++ ) {
info->rlinks[i] = -1;
info->rmodes[i] = -1;
diff --git a/veejay-current/veejay-server/veejay/veejay.c b/veejay-current/veejay-server/veejay/veejay.c
index 3f062fa..1f7f996 100644
--- a/veejay-current/veejay-server/veejay/veejay.c
+++ b/veejay-current/veejay-server/veejay/veejay.c
@@ -751,7 +751,10 @@ int main(int argc, char **argv)
vj_osc_allocate(VJ_PORT+2);
vj_event_dump();
vj_effect_dump();
- fprintf(stdout, "Environment variables:\n\tSDL_VIDEO_HWACCEL\t\tSet to 1 to use SDL video hardware accel (default=on)\n\tVEEJAY_PERFORMANCE\t\tSet to \"quality\" or \"fastest\" (default is fastest)\n\tVEEJAY_AUTO_SCALE_PIXELS\tSet to 1 to convert between CCIR 601 and JPEG automatically (default=dont care)\n\tVEEJAY_INTERPOLATE_CHROMA\tSet to 1 if you wish to interpolate every chroma sample when scaling (default=0)\n\tVEEJAY_CAPTURE_DRIVER\t\tSet to \"unicap\" or \"v4lutils\" (default=v4lutils)\n\tVEEJAY_SDL_KEY_REPEAT_INTERVAL\tinterval of key pressed to repeat while pressed down.\n\tVEEJAY_PLAYBACK_CACHE\t\tSample cache size in MB - by default, veejay takes 30 percent of total RAM\n\tVEEJAY_SDL_KEY_REPEAT_DELAY\tDelay key repeat in ms\n\tVEEJAY_FULLSCREEN\t\tStart in fullscreen (1) or windowed (0) mode\n\tVEEJAY_SCREEN_GEOMETRY\t\tSpecifiy a geometry for veejay to position the video window.\n\tVEEJAY_SCREEN_SIZE\t\tSize of video window, defaults to full screen size.\n\tVEEJAY_RUN_MODE\t\t\tRun in \"classic\" (352x288 Dummy) or default (720x576). \n");
+ fprintf(stdout, "Environment variables:\n\tSDL_VIDEO_HWACCEL\t\tSet to 1 to use SDL video hardware accel (default=on)\n\tVEEJAY_PERFORMANCE\t\tSet to \"quality\" or \"fastest\" (default is fastest)\n\tVEEJAY_AUTO_SCALE_PIXELS\tSet to 1 to convert between CCIR 601 and JPEG automatically (default=dont care)\n\tVEEJAY_INTERPOLATE_CHROMA\tSet to 1 if you wish to interpolate every chroma sample when scaling (default=0)\n\tVEEJAY_SDL_KEY_REPEAT_INTERVAL\tinterval of key pressed to repeat while pressed down.\n\tVEEJAY_PLAYBACK_CACHE\t\tSample cache size in MB - by default, veejay takes 30 percent of total RAM\n\tVEEJAY_SDL_KEY_REPEAT_DELAY\tDelay key repeat in ms\n\tVEEJAY_FULLSCREEN\t\tStart in fullscreen (1) or windowed (0) mode\n\tVEEJAY_SCREEN_GEOMETRY\t\tSpecifiy a geometry for veejay to position the video window.\n\tVEEJAY_SCREEN_SIZE\t\tSize of video window, defaults to full screen size.\n\tVEEJAY_RUN_MODE\t\t\tRun in \"classic\" (352x288 Dummy) or default (720x576). \n");
+ fprintf(stdout,"\tVEEJAY_V4L2_NO_THREADING\tSet to 1 to query frame in main-loop\n");
+ fprintf(stdout,"\tVEEJAY_MULTITHREAD_TASKS\tSet the number of parallel tasks (multithreading) to use (default is equal to the number of cpu-cores)\n");
+ fprintf(stdout,"\tVEEJAY_PAUSE_EVERYTHING\t\tIf set to 1, video is paused but rendering contiues. If set to 0, rendering pauses as well\n");
fprintf(stdout, "\n\n\tExample for bash:\n\t\t\t$ export VEEJAY_AUTO_SCALE_PIXEL=1\n");
diff --git a/veejay-current/veejay-server/veejay/vims.h b/veejay-current/veejay-server/veejay/vims.h
index 9f93dd4..f062088 100644
--- a/veejay-current/veejay-server/veejay/vims.h
+++ b/veejay-current/veejay-server/veejay/vims.h
@@ -292,7 +292,7 @@ enum {
#define EDIT_COPY 103
#define EDIT_CROP 104
#define EDIT_DEL 105
-#define MESSAGE_SIZE 1024
+#define MESSAGE_SIZE 1024
#define EL_MIN_BUF (65535 * 4)
#define XMLTAG_BUNDLE_FILE "ACTIONFILE"
#define XMLTAG_EVENT_AS_KEY "BUNDLE"
diff --git a/veejay-current/veejay-server/veejay/vj-composite.c b/veejay-current/veejay-server/veejay/vj-composite.c
index 88b6333..fa8b141 100644
--- a/veejay-current/veejay-server/veejay/vj-composite.c
+++ b/veejay-current/veejay-server/veejay/vj-composite.c
@@ -77,7 +77,6 @@ typedef struct
//@ round to multiple of 8
#define RUP8(num)(((num)+8)&~8)
-
void *composite_get_vp( void *data )
{
composite_t *c = (composite_t*) data;
@@ -125,7 +124,6 @@ void *composite_init( int pw, int ph, int iw, int ih, const char *homedir, int s
c->proj_plane[1] = c->proj_plane[0] + RUP8(pw * ph) + RUP8(pw);
c->proj_plane[2] = c->proj_plane[1] + RUP8(pw * ph) + RUP8(pw);
viewport_set_marker( c->vp1, 1 );
-
sws_template sws_templ;
veejay_memset(&sws_templ,0,sizeof(sws_template));
@@ -133,7 +131,6 @@ void *composite_init( int pw, int ph, int iw, int ih, const char *homedir, int s
c->frame1 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2],iw,ih,get_ffmpeg_pixfmt( pf ));
c->frame2 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2],pw, ph, c->frame1->format );
- //c->frame2 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2],pw, ph, (pf == FMT_422 ? PIX_FMT_YUV444P: PIX_FMT_YUVJ444P ));
c->frame3 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2],pw,ph,c->frame1->format );
c->frame4 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2],iw,ih,c->frame1->format );
@@ -381,6 +378,8 @@ int composite_process(void *compiz, VJFrame *output, VJFrame *input, int which_v
int vp1_active = viewport_active(c->vp1);
if( c->has_mirror_plane ) {
+ // the copy is needed for vj_event_get_image_part
+ // mirror plane is only active when VEEJAY_ORIGINAL_FRAME is set to 1
if(c->mirror_row_start == 0 && (c->mirror_row_end == input->height || c->mirror_row_end == 0) ) {
int strides[4] = { input->len, input->uv_len, input->uv_len, 0 };
vj_frame_copy( input->data, c->mirror_plane, strides );
@@ -424,9 +423,11 @@ int composite_process(void *compiz, VJFrame *output, VJFrame *input, int which_v
input->data[1],
input->data[2]
);
+
veejay_memset( c->proj_plane[0], 125, c->proj_width * c->proj_height );
veejay_memset( c->proj_plane[1], 128, c->proj_width* c->proj_height );
veejay_memset( c->proj_plane[2], 128, c->proj_width* c->proj_height );
+
viewport_draw_interface_color( c->vp1, c->proj_plane );
}
else if ( which_vp == 1 )
diff --git a/veejay-current/veejay-server/veejay/vj-lib.h b/veejay-current/veejay-server/veejay/vj-lib.h
index 055515e..9178932 100644
--- a/veejay-current/veejay-server/veejay/vj-lib.h
+++ b/veejay-current/veejay-server/veejay/vj-lib.h
@@ -312,6 +312,7 @@ typedef struct {
char *status_what;
char *status_msg;
char *status_line;
+ int status_line_len;
char *homedir;
void *font;
void *osd;
diff --git a/veejay-current/veejay-server/veejay/vj-perform.c b/veejay-current/veejay-server/veejay/vj-perform.c
index fc7970f..6e8081a 100644
--- a/veejay-current/veejay-server/veejay/vj-perform.c
+++ b/veejay-current/veejay-server/veejay/vj-perform.c
@@ -2739,7 +2739,7 @@ static int vj_perform_tag_fill_buffer(veejay_t * info)
if (error == 1)
{
VJFrame dumb;
- vj_el_init_422_frame( info->current_edit_list, &dumb );
+ veejay_memcpy( &dumb, info->effect_frame1, sizeof(VJFrame));
dumb.data[0] = frame[0];
dumb.data[1] = frame[1];