veejay-current bugfixes

git-svn-id: svn://code.dyne.org/veejay/trunk@710 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2006-12-10 18:05:06 +00:00
parent ba6b04f4bb
commit 54de128d7d
9 changed files with 737 additions and 621 deletions

View File

@@ -2373,14 +2373,14 @@ void on_previewsmall_clicked( GtkWidget *widget, gpointer user_data)
void on_multitrack_activate( GtkWidget *w, gpointer user_data)
{
multitrack_open( info->mt );
gtk_widget_show( glade_xml_get_widget_( info->main_window , "mtwindow" ));
// multitrack_open( info->mt );
// gtk_widget_show( glade_xml_get_widget_( info->main_window , "mtwindow" ));
}
void on_multitrack_deactivate( GtkWidget *w, gpointer user_data)
{
multitrack_close( info->mt );
gtk_widget_hide( glade_xml_get_widget_( info->main_window , "mtwindow" ));
// multitrack_close( info->mt );
// gtk_widget_hide( glade_xml_get_widget_( info->main_window , "mtwindow" ));
}
void on_mt_new_activate( GtkWidget *w, gpointer user_data)

View File

@@ -33,7 +33,7 @@ static int verbosity = 0;
static int timer = 6;
static int col = 0;
static int row = 0;
static int n_tracks = 2;
static int n_tracks = 3;
static int launcher = 0;
static int pw = 176;
static int ph = 144;

View File

@@ -534,8 +534,6 @@ static void playmode_sensitivity( mt_priv_t *p, gint pm )
static void update_widgets(int *status, mt_priv_t *p, int pm)
{
int *h = p->history[pm];
// gdk_threads_enter();
// mt_update_gui(status);
if( h[PLAY_MODE] != pm )
playmode_sensitivity( p, pm );
@@ -551,8 +549,6 @@ static void update_widgets(int *status, mt_priv_t *p, int pm)
if(update_track_list( p ))
update_track_view( MAX_TRACKS, get_track_tree( p->view->tracks ), (void*)p );
}
// gdk_threads_leave();
}
static gboolean update_sequence_widgets( gpointer data )
@@ -569,6 +565,7 @@ static gboolean update_sequence_widgets( gpointer data )
if( n<= 0 )
{
p->status_lock = 0;
veejay_msg(0, "error reading status");
return TRUE;
}
#ifdef STRICT_CHECKING
@@ -580,7 +577,6 @@ static gboolean update_sequence_widgets( gpointer data )
for( i = 0; i < 20; i ++ )
p->status_cache[i] = array[i];
update_widgets(array, p, pm);
int *his = p->history[ pm ];
@@ -811,12 +807,12 @@ void *multitrack_new(
mt->scroll = gtk_scrolled_window_new(NULL,NULL);
int minw = 240;
// GtkWidget *pan = glade_xml_get_widget( win, "panels");
// GtkRequisition req;
// gtk_widget_size_request( pan, &req );
gtk_widget_set_size_request(mt->scroll,450, 300);
GtkRequisition req;
gtk_widget_size_request( mt->main_window, &req );
gtk_widget_set_size_request(mt->scroll,minw, req.height-100);
gtk_container_set_border_width(GTK_CONTAINER(mt->scroll),2);
gtk_container_set_border_width(GTK_CONTAINER(mt->scroll),1);
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(mt->scroll),GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS );
GtkWidget *table = gtk_table_new( 1, MAX_TRACKS, FALSE );
gtk_box_pack_start( GTK_BOX( mt->main_box ), mt->scroll , FALSE,FALSE, 0 );
@@ -832,8 +828,8 @@ void *multitrack_new(
p->backlink = (void*) mt;
p->tracks[c] = NULL;
pt->pt[c] = p;
// gtk_table_attach_defaults( table, p->view->event_box, c, c+1, 0, 1 );
gtk_table_attach_defaults( table, p->view->event_box, 0, 1, c, c+1 );
gtk_table_attach_defaults( table, p->view->event_box, c, c+1, 0, 1 );
// gtk_table_attach_defaults( table, p->view->event_box, 0, 1, c, c+1 );
restore__[c] = 0;
@@ -990,8 +986,8 @@ int multitrack_add_track( void *data )
// gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( p->view->toggle ), 1 );
status_print( mt, "Track %d: Connection established with '%s' port %d\n",
track, hostname, port_num );
pt->pt[track]->timeout =
gtk_timeout_add( 300, update_sequence_widgets, (gpointer*) pt->pt[track] );
// pt->pt[track]->timeout =
// gtk_timeout_add( 300, update_sequence_widgets, (gpointer*) pt->pt[track] );
gtk_widget_set_sensitive_( GTK_WIDGET(p->view->panel),TRUE);
res = 1;
@@ -1026,7 +1022,7 @@ int multrack_audoadd( void *data, char *hostname, int port_num, float ratio )
return 0;
}
a->pt[track]->timeout = gtk_timeout_add( 300, update_sequence_widgets, (gpointer*) a->pt[track] );
// a->pt[track]->timeout = gtk_timeout_add( 300, update_sequence_widgets, (gpointer*) a->pt[track] );
// veejay_configure_sequence( seq, 176, 176 / ratio, 0.0 );
@@ -1230,7 +1226,6 @@ void multitrack_set_current( void *data, char *hostname, int port_num , int wid
if( last_track->active && mpreview_width_ > 0 && mpreview_height_ > 0)
{
// make sure to reset width/height back to small
veejay_msg(0, "set current %d x %d", mpreview_width_, mpreview_height_);
veejay_configure_sequence( last_track->sequence, mpreview_width_, mpreview_height_ , 0.0);
}
@@ -1291,7 +1286,7 @@ static gboolean seqv_mouse_press_event ( GtkWidget *w, GdkEventButton *event, gp
if(event->type == GDK_2BUTTON_PRESS)
{
mt->selected = p->num;
G_LOCK(mt_lock);
/*G_LOCK(mt_lock);
int tmp[MAX_TRACKS],i;
for( i = 0; i < MAX_TRACKS ; i ++ )
{
@@ -1299,11 +1294,13 @@ G_LOCK(mt_lock);
tmp[i] = p->preview;
p->preview = 0;
}
G_UNLOCK(mt_lock);
G_UNLOCK(mt_lock);*/
gui_cb( 0, strdup(p->hostname), p->port_num );
G_LOCK(mt_lock);
//G_LOCK(mt_lock);
multitrack_set_current( (void*) mt, p->hostname, p->port_num ,mpreview_width_,mpreview_height_ );
/*
@@ -1314,12 +1311,14 @@ G_LOCK(mt_lock);
last_track->sequence = p->sequence;
assert( last_track->sequence != NULL );
veejay_configure_sequence( last_track->sequence, 352, 288 );*/
/*G_LOCK(mt_lock);
for( i = 0; i < MAX_TRACKS ; i ++ )
{
mt_priv_t *p = a->pt[i];
p->preview = tmp[i];
}
G_UNLOCK(mt_lock);
G_UNLOCK(mt_lock);*/
}
if( event->type == GDK_BUTTON_PRESS )
@@ -1436,7 +1435,7 @@ static sequence_view_t *new_sequence_view( mt_priv_t *p,gint w, gint h, gint las
// seqv->timeline_ = timeline_new();
seqv->timeline_ = gtk_hscale_new_with_range( 0.0,1.0,0.1 );
gtk_scale_set_draw_value( seqv->timeline_, FALSE );
gtk_widget_set_size_request( seqv->panel,preview_width_ ,14);
gtk_widget_set_size_request( seqv->panel,preview_width_ ,180);
gtk_widget_show( seqv->panel );
gtk_box_pack_start( GTK_BOX( box ), seqv->timeline_, FALSE,FALSE, 0 );
//gtk_container_add( GTK_CONTAINER(seqv->panel), box );
@@ -1545,6 +1544,7 @@ void *mt_preview( gpointer user_data )
void *pixp = vevo_port_new( VEVO_ANONYMOUS_PORT );
GdkPixbuf *ir = NULL;
for( ;; )
{
G_LOCK( mt_lock );
@@ -1558,7 +1558,6 @@ void *mt_preview( gpointer user_data )
}
int ref = find_sequence( a );
/* for( i = 0; i < MAX_TRACKS ; i ++ )
{
mt_priv_t *p = a->pt[i];
@@ -1682,10 +1681,13 @@ void *mt_preview( gpointer user_data )
if(lt->preview)
{
gdk_threads_enter();
if( mt->sensitive )
for( i = 0; i < MAX_TRACKS ; i ++ )
{
mt_priv_t *p = a->pt[i];
update_sequence_widgets(p);
if(cache[i])// && i != ref)
{
GtkImage *image = GTK_IMAGE( p->view->area );
@@ -1718,6 +1720,7 @@ void *mt_preview( gpointer user_data )
gdk_pixbuf_unref(ir);
}
ir = NULL;*/
//update_sequence_widgets(NULL);
gdk_threads_leave();
}

View File

@@ -341,8 +341,6 @@ typedef struct
sample_gui_slot_t **gui_slot;
} sample_bank_t;
#define WATCHDOG_STATE_ON 0 // disconnected
#define WATCHDOG_STATE_OFF 1 // connected
typedef struct
{
char *hostname;
@@ -1784,7 +1782,7 @@ gboolean gveejay_quit( GtkWidget *widget, gpointer user_data)
}
multitrack_quit( info->mt );
info->watch.w_state = WATCHDOG_STATE_OFF;
info->watch.w_state = STATE_DISCONNECT;
// g_usleep(40000);
// vj_gui_free();
@@ -5665,43 +5663,36 @@ static void set_color_fg(const char *name, GdkColor *col)
static gboolean update_cpumeter_timeout( gpointer data )
{
GtkWidget *w = glade_xml_get_widget_(
info->main_window, "cpumeter");
gdouble ms = (gdouble)info->status_tokens[ELAPSED_TIME];
gdouble max = ((1.0/info->el.fps)*1000);
gdouble frac = 1.0 / max;
gdouble invert = 0.0;
invert = 1.0 - (frac * (ms > max ? max : ms));
if(invert < 0.0)
invert = 0.0;
gdouble lim = (1.0f/info->el.fps)*1000.0;
if(ms > max)
//@ fps ?
// 40 =max, in=20, fps=(40/20)*info->el.fps
char text[65];
if( ms < lim )
{
frac = 1.0;
// set progres bar red
GdkColor color;
color.red = 0xffff;
color.green = 0x0000;
color.blue = 0x0000;
// if(gdk_colormap_alloc_color(info->color_map,
// &color, TRUE, TRUE ))
set_color_fg( "cpumeter", &color );
sprintf(text, "Running realtime", ( lim / ms ) * info->el.fps );
}
else
{
GdkColor color;
color.red = 0x0000;
color.green = 0xffff;
color.blue = 0x0000;
// if(gdk_colormap_alloc_color(info->color_map,
// &color, TRUE, TRUE))
set_color_fg( "cpumeter", &color);
// progress bar green
sprintf(text, "%2.2f FPS", ( 1.0 / ms ) * 1000.0 );
}
update_label_str( "cpumeter", text );
gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), invert );
/* gdouble max = ((1.0/info->el.fps)*1000);
gdouble frac = 1.0 / max;
gdouble invert = 0.0;
gdouble v = frac * ms;
if( v > 1.0 )
invert = 0.0;
else if ( v >= 0.0 )
invert = 1.0 - v;
gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), invert );*/
return TRUE;
}
@@ -5800,10 +5791,10 @@ static void init_recorder(int total_frames, gint mode)
static void init_cpumeter()
{
info->cpumeter = g_timeout_add(300,update_cpumeter_timeout,
(gpointer*) info );
info->cachemeter = g_timeout_add(300,update_cachemeter_timeout,
(gpointer*) info );
// info->cpumeter = g_timeout_add(300,update_cpumeter_timeout,
// (gpointer*) info );
// info->cachemeter = g_timeout_add(300,update_cachemeter_timeout,
// (gpointer*) info );
}
@@ -5846,6 +5837,9 @@ static void update_gui()
on_vims_messenger();
//update_log(NULL);
//
update_cpumeter_timeout(NULL);
update_cachemeter_timeout(NULL);
}
@@ -6336,9 +6330,10 @@ void vj_gui_cb(int state, char *hostname, int port_num)
{
// info->watch.hostname = strdup(hostname);
// info->watch.port_num = port_num;
info->watch.state = STATE_DISCONNECT;
info->watch.p_state = STATE_RECONNECT;
info->run_state = RUN_STATE_REMOTE;
// info->watch.state = STATE_DISCONNECT;
info->watch.state = STATE_RECONNECT;
info->watch.p_state = 1;
// info->run_state = RUN_STATE_REMOTE;
put_text( "entry_hostname", hostname );
update_spin_value( "button_portnum", port_num );
}
@@ -6537,6 +6532,7 @@ void vj_gui_init(char *glade_file, int launcher, char *hostname, int port_num)
pw,
ph,
img_wid);
multitrack_open( info->mt );
memset( &info->watch, 0, sizeof(watchdog_t));
info->watch.state = STATE_STOPPED; //
@@ -6696,16 +6692,7 @@ int vj_gui_reconnect(char *hostname,char *group_name, int port_num)
reload_bundles();
info->channel = g_io_channel_unix_new( vj_client_get_status_fd( info->client, V_STATUS));
g_io_add_watch_full(
info->channel,
// G_PRIORITY_HIGH_IDLE,
G_PRIORITY_LOW,
G_IO_IN| G_IO_ERR | G_IO_NVAL | G_IO_HUP,
veejay_tick,
(gpointer*) info,
NULL
);
// init_cpumeter();
GtkWidget *w = glade_xml_get_widget_(info->main_window, "gveejay_window" );
gtk_widget_show( w );
@@ -6730,6 +6717,16 @@ int vj_gui_reconnect(char *hostname,char *group_name, int port_num)
//init_srt_editor();
vj_gui_preview();
g_io_add_watch_full(
info->channel,
// G_PRIORITY_HIGH_IDLE,
G_PRIORITY_LOW,
G_IO_IN| G_IO_ERR | G_IO_NVAL | G_IO_HUP,
veejay_tick,
(gpointer*) info,
NULL
);
return 1;
@@ -6755,18 +6752,17 @@ static void veejay_stop_connecting(vj_gui_t *gui)
gboolean is_alive( void )
{
void *data = info;
vj_gui_t *gui = (vj_gui_t*) data;
if( gui->watch.state == STATE_PLAYING && gui->watch.p_state == 0)
return TRUE;
if(gui->watch.w_state == WATCHDOG_STATE_OFF )
if( gui->watch.state == STATE_RECONNECT )
{
multitrack_restart( gui->mt );
veejay_msg(0, "DISCONNECT");
vj_gui_disconnect();
return TRUE;
gui->watch.state = STATE_CONNECT;
}
if(gui->watch.state == STATE_DISCONNECT )
@@ -6782,8 +6778,8 @@ gboolean is_alive( void )
vj_gui_disable();
if(!gui->launch_sensitive)
vj_launch_toggle(TRUE);
if( gui->watch.p_state == STATE_RECONNECT )
gui->watch.state = STATE_CONNECT;
// if( gui->watch.p_state == STATE_RECONNECT )
// gui->watch.state = STATE_CONNECT;
}
if( gui->watch.state == STATE_CONNECT )
@@ -6793,6 +6789,7 @@ gboolean is_alive( void )
remote = get_text( "entry_hostname" );
port = get_nums( "button_portnum" );
veejay_msg(0, "Connecting to %s: %d", remote,port );
if(!vj_gui_reconnect( remote, NULL, port ))
{
info->watch.state = STATE_STOPPED;
@@ -6801,18 +6798,21 @@ gboolean is_alive( void )
{
info->watch.state = STATE_PLAYING;
info->key_id = gtk_key_snooper_install( key_handler , NULL);
init_cpumeter();
// init_cpumeter();
// info->logging = g_timeout_add( G_PRIORITY_LOW, update_log,(gpointer*) info );
veejay_stop_connecting(gui);
info->watch.state = STATE_PLAYING;
// info->watch.state = STATE_PLAYING;
if(info->watch.p_state == 0)
{
veejay_msg(0, "Audoadd");
multrack_audoadd( info->mt, remote, port,
info->el.ratio );
}
veejay_msg(0, "Stopped connecting");
info->watch.p_state = 0;
info->watch.state = STATE_PLAYING;
}
}
@@ -6823,8 +6823,8 @@ gboolean is_alive( void )
void vj_gui_disconnect()
{
// g_source_remove( info->logging );
g_source_remove( info->cpumeter );
g_source_remove( info->cachemeter );
// g_source_remove( info->cpumeter );
// g_source_remove( info->cachemeter );
g_io_channel_shutdown(info->channel, FALSE, NULL);
g_io_channel_unref(info->channel);
gtk_key_snooper_remove( info->key_id );
@@ -6846,6 +6846,9 @@ void vj_gui_disconnect()
reset_tree("tree_sources");
reset_tree("editlisttree");
_effect_reset();
_edl_reset();
/* clear console text */
// clear_textview_buffer("veejaytext");
}

View File

@@ -30,15 +30,13 @@
typedef struct
{
// pthread_mutex_t mutex;
// pthread_t thread;
pthread_mutex_t mutex;
pthread_t thread;
vj_client *remote;
int state;
int error;
int grab;
} threaded_t;
/*
#define STOP 0
#define PLAY 1
static void lock_(threaded_t *t, const char *f, int line)
{
@@ -50,29 +48,30 @@ static void unlock_(threaded_t *t, const char *f, int line)
{
// veejay_msg(0,"unlock thread by %s, line %d",f,line);
pthread_mutex_unlock( &(t->mutex ));
}*/
}
#define lock( t ) lock_( t, __FUNCTION__, __LINE__ )
#define unlock( t ) unlock_( t, __FUNCTION__ , __LINE__ )
/*
void *reader_thread(void *data)
{
vj_tag *tag = (vj_tag*) data;
threaded_t *t = tag->priv;
vj_client *v = t->remote;
int ret = 0;
int error = 0;
int have_sent =0;
char buf[16];
sprintf(buf, "%03d:;", VIMS_GET_FRAME);
for( ;; )
{
lock(t);
if( t->state == STOP )
int retrieve = 0;
int error = 0;
if( t->state == 0 )
{
unlock(t);
return NULL;
error = 1;
t->grab = 0;
}
if( tag->source_type == VJ_TAG_TYPE_NET )
@@ -81,94 +80,69 @@ void *reader_thread(void *data)
{
vj_client_flush ( v, V_STATUS);
}
}
lock(t);
if( t->grab )
{
ret = vj_client_send( v, V_CMD, buf );
if( ret <= 0 )
error = 1;
else
retrieve = 1;
t->grab = 0;
}
if(!error)
if(!error && retrieve)
{
ret = vj_client_read_i ( v, tag->socket_frame );
if( ret <= 0 )
error = 1;
}
unlock(t);
if( error )
{
veejay_msg(VEEJAY_MSG_ERROR,
"Error retrieving frame from remote veejay,");
t->error = THREAD_STOP;
t->state = STOP;
"Closing connection with remote veejay,");
t->state = 0;
pthread_exit( &(t->thread));
return NULL;
}
unlock(t);
g_sleep( 25000 );
}
return NULL;
}*/
}
void *net_threader( )
{
threaded_t *t = (threaded_t*) vj_calloc(sizeof(threaded_t));
// pthread_mutex_init( &(t->mutex), NULL );
return (void*) t;
}
void net_thread_remote( void *p, void *r )
int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3] )
{
threaded_t *t = (threaded_t*) p;
t->remote = r;
}
void net_thread_exit(vj_tag *tag)
{
if(tag->socket_frame)
free(tag->socket_frame);
/* unlock(t);
pthread_mutex_destroy( &(t->mutex));
*/
}
int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3], vj_client *v )
{
/* threaded_t *t = (threaded_t*) tag->priv;
threaded_t *t = (threaded_t*) tag->priv;
vj_client *v = t->remote;
lock(t);
if( t->state == 0 || t->error )
{
unlock(t);
return 0;
}
const uint8_t *buf = tag->socket_frame;
veejay_memcpy( buffer[0], tag->socket_frame, v->planes[0] );
veejay_memcpy( buffer[1], tag->socket_frame + v->planes[0], v->planes[1] );
veejay_memcpy( buffer[2], tag->socket_frame + v->planes[0] + v->planes[1] , v->planes[2] );
veejay_memcpy( buffer[0], buf, v->planes[0] );
veejay_memcpy( buffer[1], buf+ v->planes[0], v->planes[1] );
veejay_memcpy( buffer[2], buf+ v->planes[0] + v->planes[1] , v->planes[2] );
t->grab = 1;
unlock(t);
return 1;*/
char buf[16];
sprintf(buf, "%03d:;", VIMS_GET_FRAME);
if( vj_client_poll(v, V_STATUS ) )
{
vj_client_flush ( v, V_STATUS);
}
int ret = vj_client_send( v, V_CMD, buf );
if( ret <= 0 )
return 0;
ret = vj_client_read_i ( v, tag->socket_frame );
if( ret <= 0 )
return 0;
veejay_memcpy( buffer[0], tag->socket_frame, v->planes[0] );
veejay_memcpy( buffer[1], tag->socket_frame + v->planes[0], v->planes[1] );
veejay_memcpy( buffer[2], tag->socket_frame + v->planes[0] + v->planes[1] , v->planes[2] );
return ret;
return 1;
}
int net_thread_start(vj_client *v, vj_tag *tag)
@@ -186,12 +160,18 @@ int net_thread_start(vj_client *v, vj_tag *tag)
tag->source_name, tag->video_channel );
return 0;
}
else
veejay_msg(VEEJAY_MSG_INFO, "Connecton established with %s:%d",tag->source_name,
tag->video_channel);
/* threaded_t *t = (threaded_t*)tag->priv;
threaded_t *t = (threaded_t*)tag->priv;
pthread_mutex_init( &(t->mutex), NULL );
t->error = 0;
t->state = 1;
*/
t->remote = v;
t->grab = 1;
if( tag->source_type == VJ_TAG_TYPE_MCAST )
{
char start_mcast[6];
@@ -205,46 +185,45 @@ int net_thread_start(vj_client *v, vj_tag *tag)
{
veejay_msg(VEEJAY_MSG_ERROR, "Unable to send to %s port %d",
tag->source_name, tag->video_channel );
vj_client_close( v );
return 0;
}
}
/* int p_err = pthread_create( &(t->thread), NULL, &reader_thread, (void*) tag );
int p_err = pthread_create( &(t->thread), NULL, &reader_thread, (void*) tag );
if( p_err ==0)
{*/
veejay_msg(VEEJAY_MSG_INFO, "Created new %s stream",
{
veejay_msg(VEEJAY_MSG_INFO, "Created new %s threaded stream",
tag->source_type == VJ_TAG_TYPE_MCAST ?
"multicast" : "unicast");
return 1;
// }
// return 0;
}
return 0;
}
void net_thread_stop(vj_client *v , vj_tag *tag)
void net_thread_stop(vj_tag *tag)
{
char mcast_stop[6];
threaded_t *t = (threaded_t*)tag->priv;
int ret = 0;
// lock(t);
lock(t);
if(tag->source_type == VJ_TAG_TYPE_MCAST)
{
sprintf(mcast_stop, "%03d:;", VIMS_VIDEO_MCAST_STOP );
ret = vj_client_send( v , V_CMD, mcast_stop);
ret = vj_client_send( t->remote , V_CMD, mcast_stop);
}
if(tag->source_type == VJ_TAG_TYPE_NET)
{
sprintf(mcast_stop, "%03d:;", VIMS_CLOSE );
ret = vj_client_send( v, V_CMD, mcast_stop);
ret = vj_client_send( t->remote, V_CMD, mcast_stop);
}
// t->state = STOP;
t->state = 0;
// unlock(t);
// pthread_join( &(t->thread), (void*) tag );
unlock(t);
vj_client_close( v );
pthread_mutex_destroy( &(t->mutex));
veejay_msg(VEEJAY_MSG_INFO, "Disconnected from %s", tag->source_name);
}

View File

@@ -21,10 +21,10 @@
#define NETINSTR_HH
int net_already_opened(const char *filname, int n, int chan);
void net_thread_stop(vj_client *v , vj_tag *tag);
void net_thread_stop(vj_tag *tag);
int net_thread_start(vj_client *v, vj_tag *tag);
void net_thread_remote(void *priv, void *p );
int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3], vj_client *v );
int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3]);
void net_thread_exit(vj_tag *tag);
void *net_threader( );

View File

@@ -297,8 +297,6 @@ int _vj_tag_new_net(vj_tag *tag, int stream_nr, int w, int h,int f, char *host,
tag->socket_ready = 1;
}
net_thread_remote( tag->priv, v );
return 1;
}
@@ -802,13 +800,12 @@ int vj_tag_del(int id)
break;
case VJ_TAG_TYPE_MCAST:
case VJ_TAG_TYPE_NET:
net_thread_exit(tag);
net_thread_stop(tag);
if(vj_tag_input->net[tag->index])
{
vj_client_close( vj_tag_input->net[tag->index] );
vj_tag_input->net[tag->index] = NULL;
}
break;
}
@@ -1627,7 +1624,7 @@ int vj_tag_disable(int t1) {
}
if(tag->source_type == VJ_TAG_TYPE_NET || tag->source_type == VJ_TAG_TYPE_MCAST)
{
net_thread_stop( vj_tag_input->net[tag->index], tag );
net_thread_stop( tag );
}
#ifdef USE_GDK_PIXBUF
if(tag->source_type == VJ_TAG_TYPE_PICTURE )
@@ -2160,7 +2157,7 @@ int vj_tag_get_frame(int t1, uint8_t *buffer[3], uint8_t * abuffer)
case VJ_TAG_TYPE_MCAST:
case VJ_TAG_TYPE_NET:
if(!net_thread_get_frame( tag,buffer, vj_tag_input->net[tag->index] ))
if(!net_thread_get_frame( tag,buffer ))
{
veejay_msg(VEEJAY_MSG_ERROR, "Error reading frame from stream");
vj_tag_set_active(t1,0);

File diff suppressed because it is too large Load Diff

View File

@@ -1000,7 +1000,7 @@ int vj_event_parse_msg( veejay_t * v, char *msg )
return 0;
}
if( net_id != 412 ) //&& net_id != 333)
if( net_id != 412 && net_id != 333)
veejay_msg(VEEJAY_MSG_DEBUG, "VIMS: Parse message '%s'", msg );
@@ -7691,7 +7691,7 @@ void vj_event_send_devices ( void *ptr, const char format[], va_list ap )
void vj_event_send_frame ( void *ptr, const char format[], va_list ap )
{
veejay_t *v = (veejay_t*) ptr;
vj_perform_send_primary_frame_s( v,0 );
vj_perform_send_primary_frame_s2( v,0 );
}