Author: fejj
Date: 2007-08-23 15:13:52 -0400 (Thu, 23 Aug 2007)
New Revision: 84736

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/media.cpp
Log:
2007-08-23  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * media.cpp (OnPropertyChanged): Don't autoplay here.
        (advance_frame): Do ms->TimeSpan conversion here, too.
        (DownloaderComplete): Instead of calling ::Pause(), just set the
        pause state since the MediaPlayer already starts out in paused
        state.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-08-23 19:11:11 UTC (rev 84735)
+++ trunk/moon/src/ChangeLog    2007-08-23 19:13:52 UTC (rev 84736)
@@ -1,3 +1,11 @@
+2007-08-23  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * media.cpp (OnPropertyChanged): Don't autoplay here.
+       (advance_frame): Do ms->TimeSpan conversion here, too.
+       (DownloaderComplete): Instead of calling ::Pause(), just set the
+       pause state since the MediaPlayer already starts out in paused
+       state.
+
 2007-08-23  Rolf Bjarne Kvinge  <[EMAIL PROTECTED]>
 
        * clock.h: Add defines and methods to convert between timespans and
@@ -15,8 +23,8 @@
        
 2007-08-23  Rolf Bjarne Kvinge  <[EMAIL PROTECTED]>
 
-       * type.[cpp|h].in: Add const's here that were only added manually to 
the 
-       generated files.
+       * type.[cpp|h].in: Add const's here that were only added manually
+       to the generated files.
 
 2007-08-23  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
@@ -24,8 +32,8 @@
 
 2007-08-23  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
-       * shape.cpp: Remove unneeded (cairo_close_path) and dead (break) code
-       in Polygon::Draw.
+       * shape.cpp: Remove unneeded (cairo_close_path) and dead (break)
+       code in Polygon::Draw.
 
 2007-08-22  Chris Toshok  <[EMAIL PROTECTED]>
 

Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp    2007-08-23 19:11:11 UTC (rev 84735)
+++ trunk/moon/src/media.cpp    2007-08-23 19:13:52 UTC (rev 84736)
@@ -103,7 +103,7 @@
                media->updating = true;
                if ((position = media->mplayer->Position ()) < 0)
                        position = 0;
-               media_element_set_position (media, position);
+               media_element_set_position (media, position * 
TIMESPANTICKS_IN_SECOND / 1000);
                media->updating = false;
        }
        
@@ -132,7 +132,7 @@
        
        downloader = NULL;
        part_name = NULL;
-
+       
        media_element_set_markers (this, new TimelineMarkerCollection ());
 }
 
@@ -308,9 +308,9 @@
        if (autoplay) {
                Play ();
        } else {
-               Pause ();
+               media_element_set_current_state (this, "Paused");
        }
-
+       
        Emit (MediaOpenedEvent);
 }
 
@@ -319,12 +319,13 @@
 {
        g_return_if_fail (dl->GetObjectType () == Type::DOWNLOADER);
        
-       // if we have something opened already...
-       media_element_set_current_state (this, "Closed");
-       
        dl->ref ();
-       if (downloader)
+       
+       if (downloader) {
+               media_element_set_current_state (this, "Closed");
                downloader->unref ();
+       }
+       
        downloader = (Downloader *) dl;
        part_name = g_strdup (PartName);
        
@@ -440,8 +441,6 @@
 void
 MediaElement::OnPropertyChanged (DependencyProperty *prop)
 {
-       bool autoplay = false;
-       
        if (prop == MediaBase::SourceProperty) {
                StopLoader ();
                
@@ -467,8 +466,7 @@
                        // FIXME: set the audio stream index
                }
        } else if (prop == MediaElement::AutoPlayProperty) {
-               // handled below
-               autoplay = media_element_get_auto_play (this);
+               // no state to change
        } else if (prop == MediaElement::BalanceProperty) {
                mplayer->SetBalance (media_element_get_balance (this));
        } else if (prop == MediaElement::BufferingProgressProperty) {
@@ -512,11 +510,6 @@
                mplayer->SetVolume (media_element_get_volume (this));
        }
        
-       if (autoplay) {
-               printf ("video autoplayed\n");
-               Play ();
-       }
-       
        if (prop->type == Type::MEDIAELEMENT) {
                NotifyAttacheesOfPropertyChange (prop);
        } else {

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

Reply via email to