mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-18 22:00:00 +01:00
fix bug in loading samplelist with active streams, fix fade in button, fix exiting v4l2 thread
This commit is contained in:
@@ -785,7 +785,7 @@ int sample_apply_fader_inc(int s1, int *method) {
|
|||||||
*method = si->fade_method;
|
*method = si->fade_method;
|
||||||
if(si->fader_val > 255.0 ) si->fader_val = 255.0;
|
if(si->fader_val > 255.0 ) si->fader_val = 255.0;
|
||||||
if(si->fader_val < 0.0 ) si->fader_val = 0.0;
|
if(si->fader_val < 0.0 ) si->fader_val = 0.0;
|
||||||
if(si->fader_direction) return si->fader_val;
|
if(si->fader_direction >= 0) return si->fader_val;
|
||||||
return (255-si->fader_val);
|
return (255-si->fader_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1962,7 +1962,6 @@ static void *v4l2_grabber_thread( void *v )
|
|||||||
i->stop = 1;
|
i->stop = 1;
|
||||||
unlock_(v);
|
unlock_(v);
|
||||||
veejay_msg(VEEJAY_MSG_ERROR, "v4l2: Not a device file: %s" , i->file );
|
veejay_msg(VEEJAY_MSG_ERROR, "v4l2: Not a device file: %s" , i->file );
|
||||||
pthread_exit(NULL);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1971,7 +1970,6 @@ static void *v4l2_grabber_thread( void *v )
|
|||||||
i->stop = 1;
|
i->stop = 1;
|
||||||
veejay_msg(0, "v4l2: error opening v4l2 device '%s'",i->file );
|
veejay_msg(0, "v4l2: error opening v4l2 device '%s'",i->file );
|
||||||
unlock_(v);
|
unlock_(v);
|
||||||
pthread_exit(NULL);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1992,7 +1990,6 @@ static void *v4l2_grabber_thread( void *v )
|
|||||||
v4l2_close( v4l2 );
|
v4l2_close( v4l2 );
|
||||||
veejay_msg(0, "v4l2: error allocating memory" );
|
veejay_msg(0, "v4l2: error allocating memory" );
|
||||||
unlock_(v);
|
unlock_(v);
|
||||||
pthread_exit(NULL);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1245,7 +1245,7 @@ int vj_tag_del(int id)
|
|||||||
int i;
|
int i;
|
||||||
tag = vj_tag_get(id);
|
tag = vj_tag_get(id);
|
||||||
if(!tag)
|
if(!tag)
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
vj_font_dictionary_destroy(_tag_info->font ,tag->dict);
|
vj_font_dictionary_destroy(_tag_info->font ,tag->dict);
|
||||||
#endif
|
#endif
|
||||||
@@ -1524,7 +1524,7 @@ int vj_tag_apply_fader_inc(int t1, int *method) {
|
|||||||
*method = tag->fade_method;
|
*method = tag->fade_method;
|
||||||
if(tag->fader_val > 255.0 ) tag->fader_val = 255.0;
|
if(tag->fader_val > 255.0 ) tag->fader_val = 255.0;
|
||||||
if(tag->fader_val < 0.0) tag->fader_val = 0.0;
|
if(tag->fader_val < 0.0) tag->fader_val = 0.0;
|
||||||
if(tag->fader_direction) return tag->fader_val;
|
if(tag->fader_direction >= 0) return tag->fader_val;
|
||||||
return (255-tag->fader_val);
|
return (255-tag->fader_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2779,15 +2779,6 @@ void vj_tag_get_source_name(int t1, char *dst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vj_tag_get_method_filename(int t1, char *dst)
|
|
||||||
{
|
|
||||||
vj_tag *tag = vj_tag_get(t1);
|
|
||||||
if (tag) {
|
|
||||||
if(tag->method_filename != NULL) sprintf(dst, "%s", tag->method_filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void vj_tag_get_by_type(int type, char *description )
|
void vj_tag_get_by_type(int type, char *description )
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -4048,11 +4039,32 @@ void tagParseStreamFX(char *sampleFile, xmlDocPtr doc, xmlNodePtr cur, void *fon
|
|||||||
if( source_type == VJ_TAG_TYPE_V4L && extra_data )
|
if( source_type == VJ_TAG_TYPE_V4L && extra_data )
|
||||||
sscanf( extra_data, "%d",&zer );
|
sscanf( extra_data, "%d",&zer );
|
||||||
|
|
||||||
vj_tag_del( id );
|
//vj_tag_del( id );
|
||||||
|
|
||||||
|
int n_id = id;
|
||||||
|
|
||||||
int n_id = vj_tag_new( source_type, source_file, _tag_info->nstreams,_tag_info->current_edit_list,
|
vj_tag *cur_tag = vj_tag_get( id );
|
||||||
|
int identity = 0;
|
||||||
|
if( cur_tag ) {
|
||||||
|
char *cur_src_file = cur_tag->method_filename;
|
||||||
|
int type = cur_tag->source_type;
|
||||||
|
if(cur_src_file && source_file) {
|
||||||
|
if(strncasecmp(cur_tag->method_filename, source_file,strlen(cur_tag->method_filename)) == 0 && type == source_type) {
|
||||||
|
identity = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!identity) {
|
||||||
|
if(cur_tag)
|
||||||
|
vj_tag_del(id);
|
||||||
|
|
||||||
|
|
||||||
|
n_id = vj_tag_new( source_type, source_file, _tag_info->nstreams,_tag_info->current_edit_list,
|
||||||
_tag_info->pixel_format, source_id,zer, _tag_info->settings->composite );
|
_tag_info->pixel_format, source_id,zer, _tag_info->settings->composite );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(n_id > 0 )
|
if(n_id > 0 )
|
||||||
{
|
{
|
||||||
vj_tag *tag = vj_tag_get( n_id );
|
vj_tag *tag = vj_tag_get( n_id );
|
||||||
|
|||||||
Reference in New Issue
Block a user