[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gnash.cpp server/gnash.h se...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gnash.cpp server/gnash.h se... |
Date: |
Sat, 02 Sep 2006 00:37:31 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/02 00:37:31
Modified files:
. : ChangeLog
gui : gnash.cpp
server : gnash.h impl.cpp
Log message:
* gui/gnash.cpp: make -u switch actually work.
* server/gnash.h, server/impl.cpp:
Changed create_movie and create_library_movie to optionally
take a "real" url (for use with caches). If given, the "real"
url will be used as a label for the "movie library". Note that
no host-checking is performed on the "real" url (only the
"effective" url will be checked).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.801&r2=1.802
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.55&r2=1.56
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.801
retrieving revision 1.802
diff -u -b -r1.801 -r1.802
--- ChangeLog 1 Sep 2006 23:42:41 -0000 1.801
+++ ChangeLog 2 Sep 2006 00:37:30 -0000 1.802
@@ -1,5 +1,12 @@
2006-09-01 Sandro Santilli <address@hidden>
+ * gui/gnash.cpp: make -u switch actually work.
+ * server/gnash.h, server/impl.cpp:
+ Changed create_movie and create_library_movie to optionally
+ take a "real" url (for use with caches). If given, the "real"
+ url will be used as a label for the "movie library". Note that
+ no host-checking is performed on the "real" url (only the
+ "effective" url will be checked).
* plugin/player.cpp: removed obsoleted file.
2006-09-01 Tomas Groth Christensen <address@hidden>
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- gui/gnash.cpp 27 Aug 2006 21:08:12 -0000 1.33
+++ gui/gnash.cpp 2 Sep 2006 00:37:30 -0000 1.34
@@ -127,7 +127,7 @@
}
char* infile = NULL;
- string url;
+ char* url = NULL;
int render_arg;
unsigned long windowid = 0;
@@ -390,7 +390,7 @@
gnash::movie_definition *md;
try {
- md = gnash::create_library_movie(URL(infile));
+ md = gnash::create_library_movie(URL(infile), url);
} catch (const GnashException& er) {
fprintf(stderr, "%s\n", er.what());
md = NULL;
@@ -471,6 +471,8 @@
" 3 enables both rendering & sound\n"
" -t <sec> Timeout and exit after the specified number of
seconds\n"
" -b <bits> Bit depth of output window (16 or 32, default is 16)\n"
+ " -u <url> Set \"real\" url of the movie\n"
+ " (useful for downloaded movies)\n"
" --version Print gnash's version number and exit\n"
"\n"
"keys:\n"
Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- server/gnash.h 26 Aug 2006 18:45:50 -0000 1.44
+++ server/gnash.h 2 Sep 2006 00:37:30 -0000 1.45
@@ -228,7 +228,9 @@
/// global-ish flags, libraries, callback pointers, font
/// library, etc.
///
-movie_definition* create_movie(const URL& url);
+/// IFF real_url is given, the movie's url will be set to that value.
+///
+movie_definition* create_movie(const URL& url, const char* real_url=NULL);
/// Creates the movie from the given input stream.
//
@@ -284,8 +286,9 @@
/// drop_ref() when you're done with it.
/// Or use smart_ptr<T> from base/smart_ptr.h if you want.
///
+/// IFF real_url is given, the movie's url will be set to that value.
///
-movie_definition* create_library_movie(const URL& url);
+movie_definition* create_library_movie(const URL& url, const char*
real_url=NULL);
/// Helper to pregenerate cached data (basically, shape tesselations).
Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- server/impl.cpp 28 Aug 2006 11:14:20 -0000 1.55
+++ server/impl.cpp 2 Sep 2006 00:37:30 -0000 1.56
@@ -423,7 +423,7 @@
}
movie_definition*
-create_movie(const URL& url)
+create_movie(const URL& url, const char* reset_url)
{
// URL::str() returns by value, save it to a local string
std::string url_str = url.str();
@@ -452,11 +452,11 @@
if ( type == "jpeg" )
{
- ret = create_jpeg_movie(in, c_url);
+ ret = create_jpeg_movie(in, reset_url?reset_url:c_url);
}
else if ( type == "swf" )
{
- ret = create_swf_movie(in, c_url);
+ ret = create_swf_movie(in, reset_url?reset_url:c_url);
}
else
{
@@ -662,14 +662,18 @@
// Try to load a movie from the given url, if we haven't
// loaded it already. Add it to our library on success, and
// return a pointer to it.
-movie_definition* create_library_movie(const URL& url)
+//
+movie_definition* create_library_movie(const URL& url, const char* real_url)
{
// log_msg("%s: url is %s", __PRETTY_FUNCTION__, url.str().c_str());
+ // Use real_url as label for cache if available
+ std::string cache_label = real_url ? real_url : url.str();
+
// Is the movie already in the library?
{
smart_ptr<movie_definition> m;
- if ( s_movie_library.get(url.str(), &m) )
+ if ( s_movie_library.get(cache_label, &m) )
{
log_msg(" movie already in library");
// Return cached movie.
@@ -679,7 +683,7 @@
}
// Try to open a file under the filename.
- movie_definition* mov = create_movie(url);
+ movie_definition* mov = create_movie(url, real_url);
if (mov == NULL)
{
@@ -688,7 +692,7 @@
}
else
{
- s_movie_library.add(url.str(), mov);
+ s_movie_library.add(cache_label, mov);
}
mov->add_ref();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/gnash.cpp server/gnash.h se...,
Sandro Santilli <=