hi,

after implementing loop on/off functionality in rugen, bunch of UGET been sent to server that useless. Attached patch minimize UGET eof requests to server.


--
________________________________________
Maksym Veremeyenko
>From 06d6d3dcc378625b80e4c95ed08c8185af0798f3 Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko <[email protected]>
Date: Wed, 1 Jun 2011 17:08:42 +0300
Subject: [PATCH] prevent continious UGET for eof attribute

---
 src/dv1394app.c   |    2 ++
 src/page_status.c |   10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/dv1394app.c b/src/dv1394app.c
index 995539a..d367235 100644
--- a/src/dv1394app.c
+++ b/src/dv1394app.c
@@ -244,10 +244,12 @@ static gboolean on_transport_pressed( GtkWidget *button, gpointer data )
 		
 		case 11:
 			mvcp_unit_set( dv, unit, "eof", "loop");
+			this->eof = 0;
 			break;
 
 		case 12:
 			mvcp_unit_set( dv, unit, "eof", "pause");
+			this->eof = 0;
 			break;
 
 		default:
diff --git a/src/page_status.c b/src/page_status.c
index 6ea5661..bd8bd84 100644
--- a/src/page_status.c
+++ b/src/page_status.c
@@ -214,13 +214,15 @@ static void *status_thread( void *arg )
 			char buf[32];
 
 			if ( status.status == unit_disconnected )
+			{
+				this->app->eof = 0;
 				break;
+			}
 			if ( show_status( this, &status ) )
 				show_units( this, TRUE );
-			if ( mvcp_unit_get( this->app->command, this->app->selected_unit, "eof", buf, sizeof(buf) ) != -1)
-				this->app->eof = buf[0];
-			else
-				this->app->eof = 0;
+			if ( !this->app->eof && mvcp_unit_get( this->app->command, this->app->selected_unit,
+				"eof", buf, sizeof(buf) ) != -1)
+					this->app->eof = buf[0];
 		}
 	}
 
-- 
1.7.4.4

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to