gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog gui/Player.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog gui/Player.cpp
Date: Thu, 28 Sep 2006 14:41:39 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/28 14:41:39

Modified files:
        .              : ChangeLog 
        gui            : Player.cpp 

Log message:
        * gui/Player.cpp: stop calling get_movie_info, and be really streaming 
instead :)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.949&r2=1.950
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.7&r2=1.8

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.949
retrieving revision 1.950
diff -u -b -r1.949 -r1.950
--- ChangeLog   28 Sep 2006 14:34:58 -0000      1.949
+++ ChangeLog   28 Sep 2006 14:41:39 -0000      1.950
@@ -1,5 +1,7 @@
 2006-09-28 Sandro Santilli  <address@hidden>
 
+       * gui/Player.cpp: stop calling get_movie_info, and be really
+         streaming instead :)
        * gui/gtk.cpp: reintroduced ifdef hell in a struggle to 
          have a renderer registered in Gui::init.
        * gui/sdl.cpp: fixed compiler warnings.

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- gui/Player.cpp      27 Sep 2006 12:52:15 -0000      1.7
+++ gui/Player.cpp      28 Sep 2006 14:41:39 -0000      1.8
@@ -213,46 +213,18 @@
 #endif
     }
 
-    // Get info about the width & height of the movie.
-    int        movie_version = 0, movie_width = 0, movie_height = 0;
-    float movie_fps = 30.0f;
-
-    try {
-        gnash::get_movie_info(URL(infile), &movie_version, &movie_width,
-            &movie_height, &movie_fps, NULL, NULL);
-    } catch (const GnashException& er) {
-        fprintf(stderr, "%s\n", er.what());
-        movie_version = 0;
-    }
-
-    if (movie_version == 0) {
-      std::cerr << "Error: can't get info about " << infile << "." << endl;
-      return EXIT_FAILURE;
-    }
-
-    if (!width) {
-      width = int(movie_width * scale);
-    }
-    if (!height) {
-      height = int(movie_height * scale);
-    }
 
     std::auto_ptr<Gui> gui_ptr;
-    if ( do_render )
-    {
+    if ( do_render ) {
        gui_ptr.reset(new GUI_CLASS(windowid, scale, do_loop, bit_depth));
 
-    }
-    else
-    {
+    } else {
        gui_ptr.reset(new NullGui);
     }
     Gui& gui = *gui_ptr;
 
     gui.init(argc, &argv);
 
-    gui.createWindow(infile, width, height);
-
     // Load the actual movie.
     gnash::movie_definition *md;
  
@@ -263,6 +235,23 @@
       md = NULL;
     }
 
+    // Get info about the width & height of the movie.
+    int movie_width = (int)md->get_width_pixels();
+    int movie_height = (int)md->get_height_pixels();
+    float movie_fps = md->get_frame_rate();
+
+    if (!width) {
+      width = int(movie_width * scale);
+    }
+    if (!height) {
+      height = int(movie_height * scale);
+    }
+
+
+    // Now that we know about movie size, create gui window.
+    gui.createWindow(infile, width, height);
+
+
     gnash::movie_interface *m = create_library_movie_inst(md);
     assert(m);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]