[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10555: Build fixes (visibility), mi
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10555: Build fixes (visibility), minor formatting changes, comments. |
Date: |
Mon, 26 Jan 2009 11:04:57 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10555
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-01-26 11:04:57 +0100
message:
Build fixes (visibility), minor formatting changes, comments.
modified:
libbase/NetworkAdapter.h
libbase/curl_adapter.cpp
libcore/StreamProvider.cpp
libcore/StreamProvider.h
libcore/TextField.cpp
libcore/asobj/NetStream_as.cpp
libcore/character.h
libmedia/MediaParser.cpp
libnet/cque.h
libnet/http.cpp
testsuite/actionscript.all/HitTest.as
------------------------------------------------------------
revno: 10554.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Fri 2009-01-23 08:28:34 +0100
message:
Formatting.
modified:
libcore/TextField.cpp
------------------------------------------------------------
revno: 10554.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Fri 2009-01-23 09:35:09 +0100
message:
Add note about hitTest in shape.
modified:
testsuite/actionscript.all/HitTest.as
------------------------------------------------------------
revno: 10554.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Sun 2009-01-25 12:53:43 +0100
message:
Line breaks.
modified:
libcore/asobj/NetStream_as.cpp
libmedia/MediaParser.cpp
------------------------------------------------------------
revno: 10554.1.4
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Mon 2009-01-26 08:57:10 +0100
message:
Drop c_str().
modified:
libcore/StreamProvider.cpp
------------------------------------------------------------
revno: 10554.1.5
author: Hanno Meyer-Thurow <address@hidden>
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Mon 2009-01-26 10:03:34 +0100
message:
Fix visibility build for OGL
modified:
libcore/StreamProvider.h
libnet/cque.h
------------------------------------------------------------
revno: 10554.1.6
author: Hanno Meyer-Thurow <address@hidden>
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Mon 2009-01-26 10:04:28 +0100
message:
Another visibility build fix for OGL
modified:
libcore/character.h
------------------------------------------------------------
revno: 10554.1.7
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Mon 2009-01-26 10:04:34 +0100
message:
Silence uninitialized variable warning.
modified:
libnet/http.cpp
------------------------------------------------------------
revno: 10554.1.8
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Mon 2009-01-26 10:05:11 +0100
message:
Line breaks.
modified:
libbase/NetworkAdapter.h
libbase/curl_adapter.cpp
=== modified file 'libbase/NetworkAdapter.h'
--- a/libbase/NetworkAdapter.h 2008-12-18 11:25:16 +0000
+++ b/libbase/NetworkAdapter.h 2009-01-26 09:05:11 +0000
@@ -38,14 +38,16 @@
/// Custom headers for addRequestHeader. These are case insensitive, and
/// subsequent addition of a header already there replaces any previous
one.
/// Some values are not allowed.
- typedef std::map<std::string, std::string, StringNoCaseLessThan>
RequestHeaders;
+ typedef std::map<std::string, std::string, StringNoCaseLessThan>
+ RequestHeaders;
/// \brief
/// Returns a read-only IOChannel that fetches data
/// from an url.
//
/// @param url The url to fetch data from.
- DSOEXPORT static std::auto_ptr<IOChannel> makeStream(const std::string&
url);
+ DSOEXPORT static std::auto_ptr<IOChannel> makeStream(
+ const std::string& url);
/// \brief
/// Returns a read-only IOChannel that fetches data
@@ -55,7 +57,8 @@
///
/// @param url The url to post to.
/// @param postdata The url-encoded post data
- DSOEXPORT static std::auto_ptr<IOChannel> makeStream(const std::string&
url, const std::string& postdata);
+ DSOEXPORT static std::auto_ptr<IOChannel> makeStream(
+ const std::string& url, const std::string& postdata);
/// \brief
/// Returns a read-only IOChannel that fetches data
@@ -66,8 +69,8 @@
/// @param url The url to post to.
/// @param postdata The url-encoded post data
/// @param headers A RequestHeaders map of custom headers to send.
- DSOEXPORT static std::auto_ptr<IOChannel> makeStream(const std::string&
url, const std::string& postdata,
- const RequestHeaders& headers);
+ DSOEXPORT static std::auto_ptr<IOChannel> makeStream(const std::string&
url,
+ const std::string& postdata, const RequestHeaders& headers);
/// Check whether a RequestHeader is permitted.
=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp 2009-01-22 20:10:39 +0000
+++ b/libbase/curl_adapter.cpp 2009-01-26 09:05:11 +0000
@@ -661,22 +661,23 @@
{
// timeout
#ifdef GNASH_CURL_VERBOSE
- gnash::log_debug("select() timed out, elapsed is %u",
lastProgress.elapsed() );
+ gnash::log_debug("select() timed out, elapsed is %u",
+ lastProgress.elapsed());
#endif
- if ( userTimeout && lastProgress.elapsed() >
userTimeout )
- {
- gnash::log_error(_("Timeout (%u milliseconds)
while loading from url %s"),
- userTimeout, _url);
+ if (userTimeout && lastProgress.elapsed() > userTimeout)
+ {
+ gnash::log_error(_("Timeout (%u milliseconds) while loading "
+ "from url %s"), userTimeout, _url);
// TODO: should we set _error here ?
- return;
- }
+ return;
+ }
}
else
{
#ifdef GNASH_CURL_VERBOSE
- gnash::log_debug("FD activity, resetting progress
timer");
+ gnash::log_debug("FD activity, resetting progress timer");
#endif
- lastProgress.restart();
+ lastProgress.restart();
}
=== modified file 'libcore/StreamProvider.cpp'
--- a/libcore/StreamProvider.cpp 2008-11-21 15:15:25 +0000
+++ b/libcore/StreamProvider.cpp 2009-01-26 07:57:10 +0000
@@ -92,10 +92,8 @@
}
else
{
- std::string url_str = url.str();
- const char* c_url = url_str.c_str();
if ( URLAccessManager::allow(url) ) {
- stream = NetworkAdapter::makeStream(c_url);
+ stream = NetworkAdapter::makeStream(url.str());
}
// Will return 0 auto_ptr if not allowed.
@@ -118,10 +116,8 @@
return getStream(url, postdata);
}
- std::string url_str = url.str();
- const char* c_url = url_str.c_str();
if ( URLAccessManager::allow(url) ) {
- return NetworkAdapter::makeStream(c_url, postdata, headers);
+ return NetworkAdapter::makeStream(url.str(), postdata, headers);
}
return std::auto_ptr<IOChannel>();
@@ -162,11 +158,8 @@
}
else
{
- std::string url_str = url.str();
- const char* c_url = url_str.c_str();
-
if ( URLAccessManager::allow(url) ) {
- stream = NetworkAdapter::makeStream(c_url, postdata);
+ stream = NetworkAdapter::makeStream(url.str(),
postdata);
}
// Will return 0 auto_ptr if not allowed.
return stream;
=== modified file 'libcore/StreamProvider.h'
--- a/libcore/StreamProvider.h 2008-11-25 15:23:03 +0000
+++ b/libcore/StreamProvider.h 2009-01-26 09:03:34 +0000
@@ -22,6 +22,8 @@
#include <memory>
#include "NetworkAdapter.h"
+#include "dsodefs.h" // for DSOEXPORT
+
// Forward declarations
namespace gnash {
class URL;
@@ -32,7 +34,7 @@
namespace gnash {
/// Provide IOChannel streams for network or filesystem resources
-class StreamProvider
+class DSOEXPORT StreamProvider
{
public:
@@ -41,7 +43,7 @@
virtual ~StreamProvider() {}
- DSOEXPORT static StreamProvider& getDefaultInstance();
+ static StreamProvider& getDefaultInstance();
/// Returned stream ownership is transferred to caller.
//
@@ -64,10 +66,12 @@
/// Post data in url-encoded form.
///
///
- virtual std::auto_ptr<IOChannel> getStream(const URL& url, const
std::string& postdata);
+ virtual std::auto_ptr<IOChannel> getStream(const URL& url,
+ const std::string& postdata);
virtual std::auto_ptr<IOChannel> getStream(const URL& url,
- const std::string& postdata, const
NetworkAdapter::RequestHeaders& headers);
+ const std::string& postdata,
+ const NetworkAdapter::RequestHeaders& headers);
};
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp 2009-01-22 20:10:39 +0000
+++ b/libcore/TextField.cpp 2009-01-23 07:28:34 +0000
@@ -2034,12 +2034,10 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->getDrawBackground());
}
- else // setter
- {
+ else {
ptr->setDrawBackground(fn.arg(0).to_bool());
}
@@ -2051,12 +2049,10 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->getDrawBorder());
}
- else // setter
- {
+ else {
ptr->setDrawBorder(fn.arg(0).to_bool());
}
@@ -2068,12 +2064,10 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->getBackgroundColor().toRGB());
}
- else // setter
- {
+ else {
rgba newColor;
newColor.parseRGB(static_cast<boost::uint32_t>(fn.arg(0).to_int()));
ptr->setBackgroundColor(newColor);
@@ -2087,14 +2081,12 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->getBorderColor().toRGB());
}
- else // setter
- {
+ else {
rgba newColor;
- newColor.parseRGB( static_cast<boost::uint32_t>(fn.arg(0).to_number())
);
+ newColor.parseRGB(static_cast<boost::uint32_t>(fn.arg(0).to_number()));
ptr->setBorderColor(newColor);
}
@@ -2107,8 +2099,7 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if (!fn.nargs)
- {
+ if (!fn.nargs) {
// Getter
return as_value(ptr->getTextColor().toRGB());
}
@@ -2126,14 +2117,13 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if (!fn.nargs)
- {
+ if (!fn.nargs) {
// Getter
return as_value(ptr->getEmbedFonts());
}
// Setter
- ptr->setEmbedFonts( fn.arg(0).to_bool() );
+ ptr->setEmbedFonts(fn.arg(0).to_bool());
return as_value();
}
@@ -2142,13 +2132,11 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->doWordWrap());
}
- else // setter
- {
- ptr->setWordWrap( fn.arg(0).to_bool() );
+ else {
+ ptr->setWordWrap(fn.arg(0).to_bool());
}
return as_value();
@@ -2159,12 +2147,10 @@
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
- {
+ if (fn.nargs == 0) {
return as_value(ptr->doHtml());
}
- else // setter
- {
+ else {
ptr->setHtml( fn.arg(0).to_bool() );
}
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp 2009-01-22 20:10:39 +0000
+++ b/libcore/asobj/NetStream_as.cpp 2009-01-25 11:53:43 +0000
@@ -1015,7 +1015,7 @@
float swfFPS = 25; // TODO: get this host app (gnash -d affects this)
double msecsPerAdvance = 10000/swfFPS;
- unsigned int bufferLimit = 20;
+ const unsigned int bufferLimit = 20;
unsigned int bufferSize = _audioStreamer._audioQueue.size();
if ( bufferSize > bufferLimit )
{
=== modified file 'libcore/character.h'
--- a/libcore/character.h 2009-01-22 20:10:39 +0000
+++ b/libcore/character.h 2009-01-26 09:04:28 +0000
@@ -367,7 +367,7 @@
/// @param includeRoot Whether the transform of the Stage (_root)
/// should be concatenated. This is required to be
/// false for pointInBounds.
- SWFMatrix getWorldMatrix(bool includeRoot = true) const;
+ DSOEXPORT SWFMatrix getWorldMatrix(bool includeRoot = true) const;
/// \brief
/// Get our concatenated color transform (all our ancestor transforms,
=== modified file 'libmedia/MediaParser.cpp'
--- a/libmedia/MediaParser.cpp 2009-01-22 20:10:39 +0000
+++ b/libmedia/MediaParser.cpp 2009-01-25 11:53:43 +0000
@@ -49,7 +49,8 @@
{
#ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
log_debug("Starting MediaParser thread");
- _parserThread.reset( new boost::thread(boost::bind(parserLoopStarter,
this)) );
+ _parserThread.reset(new boost::thread(
+ boost::bind(parserLoopStarter, this)));
_parserThreadStartBarrier.wait();
#endif
}
@@ -71,19 +72,15 @@
//log_debug("MediaParser::getBufferLength: %d video %d audio frames",
_videoFrames.size(), _audioFrames.size());
- if ( hasVideo && hasAudio )
- {
+ if (hasVideo && hasAudio) {
return std::min(audioBufferLength(), videoBufferLength());
}
- else if ( hasVideo )
- {
- return videoBufferLength();
- }
- else if ( hasAudio )
- {
- return audioBufferLength();
- }
- else return 0;
+
+ if (hasVideo) return videoBufferLength();
+
+ if (hasAudio) return audioBufferLength();
+
+ return 0;
}
boost::uint64_t
@@ -275,7 +272,6 @@
for (AudioFrames::reverse_iterator e=_audioFrames.rend(); i!=e; ++i)
{
if ( (*i)->timestamp <= frame->timestamp ) break;
- //log_debug("%d-to-last element has timestamp %d > %d", gap,
(*i)->timestamp, frame->timestamp);
++gap;
}
@@ -284,7 +280,8 @@
if ( gap ) {
log_debug("Timestamp of last %d/%d audio frames in queue "
"greater then timestamp in the frame being "
- "inserted to it (%d).", gap, _audioFrames.size(),
frame->timestamp);
+ "inserted to it (%d).", gap, _audioFrames.size(),
+ frame->timestamp);
}
}
@@ -315,7 +312,6 @@
for (VideoFrames::reverse_iterator e=_videoFrames.rend(); i!=e; ++i)
{
if ( (*i)->timestamp() <= frame->timestamp() ) break;
- //log_debug("%d-to-last element has timestamp() %d > %d", gap,
(*i)->timestamp(), frame->timestamp());
++gap;
}
@@ -324,7 +320,8 @@
if ( gap ) {
log_debug("Timestamp of last %d/%d video frames in queue "
"greater then timestamp() in the frame being "
- "inserted to it (%d).", gap, _videoFrames.size(),
frame->timestamp());
+ "inserted to it (%d).", gap, _videoFrames.size(),
+ frame->timestamp());
}
}
=== modified file 'libnet/cque.h'
--- a/libnet/cque.h 2008-12-20 17:11:55 +0000
+++ b/libnet/cque.h 2009-01-26 09:03:34 +0000
@@ -51,7 +51,7 @@
bool push(boost::uint8_t *data, int nbytes);
bool push(boost::shared_ptr<amf::Buffer> data);
// Pop the first date element off the que
- boost::shared_ptr<amf::Buffer> pop();
+ boost::shared_ptr<amf::Buffer> DSOEXPORT pop();
// Peek at the first date element witjhout removing it from the que
boost::shared_ptr<amf::Buffer> peek();
// Get the number of elements in the que
=== modified file 'libnet/http.cpp'
--- a/libnet/http.cpp 2008-12-29 15:20:46 +0000
+++ b/libnet/http.cpp 2009-01-26 10:04:57 +0000
@@ -144,45 +144,45 @@
HTTP::processClientRequest(int fd)
{
// GNASH_REPORT_FUNCTION;
- bool result;
+ bool result = false;
boost::shared_ptr<amf::Buffer> buf(_que.peek());
if (buf) {
- _cmd = extractCommand(buf->reference());
- switch (_cmd) {
- case HTTP::HTTP_GET:
- result = processGetRequest(fd);
- break;
- case HTTP::HTTP_POST:
- result = processPostRequest(fd);
- break;
- case HTTP::HTTP_HEAD:
- result = processHeadRequest(fd);
- break;
- case HTTP::HTTP_CONNECT:
- result = processConnectRequest(fd);
- break;
- case HTTP::HTTP_TRACE:
- result = processTraceRequest(fd);
- break;
- case HTTP::HTTP_OPTIONS:
- result = processOptionsRequest(fd);
- break;
- case HTTP::HTTP_PUT:
- result = processPutRequest(fd);
- break;
- case HTTP::HTTP_DELETE:
- result = processDeleteRequest(fd);
- break;
- default:
- break;
- }
+ _cmd = extractCommand(buf->reference());
+ switch (_cmd) {
+ case HTTP::HTTP_GET:
+ result = processGetRequest(fd);
+ break;
+ case HTTP::HTTP_POST:
+ result = processPostRequest(fd);
+ break;
+ case HTTP::HTTP_HEAD:
+ result = processHeadRequest(fd);
+ break;
+ case HTTP::HTTP_CONNECT:
+ result = processConnectRequest(fd);
+ break;
+ case HTTP::HTTP_TRACE:
+ result = processTraceRequest(fd);
+ break;
+ case HTTP::HTTP_OPTIONS:
+ result = processOptionsRequest(fd);
+ break;
+ case HTTP::HTTP_PUT:
+ result = processPutRequest(fd);
+ break;
+ case HTTP::HTTP_DELETE:
+ result = processDeleteRequest(fd);
+ break;
+ default:
+ break;
+ }
}
if (result) {
- return _cmd;
+ return _cmd;
} else {
- return HTTP::HTTP_NONE;
+ return HTTP::HTTP_NONE;
}
}
=== modified file 'testsuite/actionscript.all/HitTest.as'
--- a/testsuite/actionscript.all/HitTest.as 2009-01-22 20:10:39 +0000
+++ b/testsuite/actionscript.all/HitTest.as 2009-01-23 08:35:09 +0000
@@ -132,7 +132,9 @@
check_equals(b.hitTest(151, 251, false), false);
check_equals(b.hitTest(151, 252, false), false);
- /// (Where is it?!)
+ /// (Where is it?!) Checking every pixel in +/- _width by +/- _height
+ /// comes up with "true" in the shifted area, but doing it directly
+ /// returns false.
check_equals(b.hitTest(99, 199, true), false);
xcheck_equals(b.hitTest(100, 200, true), false);
xcheck_equals(b.hitTest(101, 201, true), false);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10555: Build fixes (visibility), minor formatting changes, comments.,
Benjamin Wolsey <=