[Top][All Lists]
[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: |
Sat, 23 Sep 2006 15:54:14 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/23 15:54:14
Modified files:
. : ChangeLog
gui : Player.cpp
Log message:
* gui/Player.cpp: avoid using get_movie_info, so we don't open the
stream twice (including curl if it's a remote url)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.905&r2=1.906
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.905
retrieving revision 1.906
diff -u -b -r1.905 -r1.906
--- ChangeLog 23 Sep 2006 15:30:20 -0000 1.905
+++ ChangeLog 23 Sep 2006 15:54:14 -0000 1.906
@@ -1,3 +1,8 @@
+2006-09-23 Sandro Santilli <address@hidden>
+
+ * gui/Player.cpp: avoid using get_movie_info, so we don't
+ open the stream twice (including curl if it's a remote url)
+
2006-09-23 Markus Gothe <address@hidden>
* libbase/smart_ptr.hpp: Imported and cleaned-up from boost.
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/Player.cpp 23 Sep 2006 15:01:40 -0000 1.1
+++ gui/Player.cpp 23 Sep 2006 15:54:14 -0000 1.2
@@ -205,23 +205,22 @@
#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;
+ // Load the actual movie.
+ gnash::movie_definition *md;
try {
- gnash::get_movie_info(URL(infile), &movie_version, &movie_width,
- &movie_height, &movie_fps, NULL, NULL);
+ md = gnash::create_library_movie(URL(infile), url);
} 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;
+ md = NULL;
return EXIT_FAILURE;
}
+ // 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);
}
@@ -229,6 +228,7 @@
height = int(movie_height * scale);
}
+
std::auto_ptr<Gui> gui_ptr;
if ( do_render )
{
@@ -243,17 +243,9 @@
gui.init(argc, &argv);
- gui.createWindow(infile, width, height);
- // Load the actual movie.
- gnash::movie_definition *md;
+ gui.createWindow(infile, width, height);
- try {
- md = gnash::create_library_movie(URL(infile), url);
- } catch (const GnashException& er) {
- fprintf(stderr, "%s\n", er.what());
- md = NULL;
- }
gnash::movie_interface *m = create_library_movie_inst(md);
assert(m);
- [Gnash-commit] gnash ChangeLog gui/Player.cpp,
Sandro Santilli <=