Author: lewing
Date: 2007-09-27 12:33:09 -0400 (Thu, 27 Sep 2007)
New Revision: 86512

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/media.cpp
Log:
2007-09-27  Larry Ewing  <[EMAIL PROTECTED]>

        * media.cpp: Don't mark our download progress as 100% until
        * we've
        been notified by the downloader that it is complete.  Some
        programs check download progress to decide when they can safely
        poke at the media element properties.
        * downloader.cpp: set the final downloader progress to 1.0 not
        * 100.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-09-27 16:31:21 UTC (rev 86511)
+++ trunk/moon/src/ChangeLog    2007-09-27 16:33:09 UTC (rev 86512)
@@ -1,3 +1,11 @@
+2007-09-27  Larry Ewing  <[EMAIL PROTECTED]>
+
+       * media.cpp: Don't mark our download progress as 100% until we've
+       been notified by the downloader that it is complete.  Some
+       programs check download progress to decide when they can safely
+       poke at the media element properties.
+       * downloader.cpp: set the final downloader progress to 1.0 not 100.
+
 2007-09-27  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * xaml.cpp: Don't freak out if <?xml ... ?> isn't on the first 

Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp    2007-09-27 16:31:21 UTC (rev 86511)
+++ trunk/moon/src/media.cpp    2007-09-27 16:33:09 UTC (rev 86512)
@@ -407,7 +407,12 @@
 void 
 MediaElement::DataWrite (guchar *buf, gsize offset, gsize count)
 {
-       UpdateProgress ();
+       double progress = downloader->GetValue 
(DownloadProgressProperty)->AsDouble ();
+
+       // Delay the propogating progress 1.0 until
+       // the downloader has notified us it is done.
+       if (progress < 1.0)
+               UpdateProgress ();
 }
 
 void 
@@ -446,8 +451,6 @@
                return;
        }
        
-       UpdateProgress ();
-
        if (source)
                delete source;
 
@@ -463,6 +466,7 @@
                return;
        }
 
+       UpdateProgress ();
        Emit (MediaElement::MediaOpenedEvent);
 
        Invalidate ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to