[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic f
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful |
Date: |
Sat, 13 Dec 2008 11:59:04 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10414
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Sat 2008-12-13 11:59:04 +0100
message:
Move stream creation logic from NetStream to NetConnection (will be useful
for RTMP).
modified:
libcore/asobj/NetConnection_as.cpp
libcore/asobj/NetConnection_as.h
libcore/asobj/NetStream_as.cpp
=== modified file 'libcore/asobj/NetConnection_as.cpp'
--- a/libcore/asobj/NetConnection_as.cpp 2008-12-13 08:27:06 +0000
+++ b/libcore/asobj/NetConnection_as.cpp 2008-12-13 10:59:04 +0000
@@ -711,6 +711,19 @@
}
+std::auto_ptr<IOChannel>
+NetConnection_as::getStream(const std::string& name)
+{
+ const RunInfo& ri = _vm.getRoot().runInfo();
+
+ StreamProvider& streamProvider = ri.streamProvider();
+
+ // Construct URL with base URL (assuming not connected to RTMP server..)
+ // TODO: use getURI to figure the base url, if any
+ return streamProvider.getStream(URL(name, ri.baseURL()));
+
+}
+
/// Anonymous namespace for NetConnection AMF-reading helper functions
/// (shouldn't be here).
=== modified file 'libcore/asobj/NetConnection_as.h'
--- a/libcore/asobj/NetConnection_as.h 2008-12-05 07:35:49 +0000
+++ b/libcore/asobj/NetConnection_as.h 2008-12-13 10:59:04 +0000
@@ -81,6 +81,9 @@
/// Notify the NetConnection onStatus handler of a change.
void notifyStatus(StatusCode code);
+ /// Get an stream by name
+ std::auto_ptr<IOChannel> getStream(const std::string& name);
+
protected:
/// Mark responders associated with remoting calls
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp 2008-12-05 07:35:49 +0000
+++ b/libcore/asobj/NetStream_as.cpp 2008-12-13 10:59:04 +0000
@@ -456,16 +456,11 @@
log_security( _("Connecting to movie: %s"), url );
- const RunInfo& ri = _vm.getRoot().runInfo();
-
- StreamProvider& streamProvider = ri.streamProvider();
-
- // Construct URL with base URL.
- _inputStream = streamProvider.getStream(URL(url, ri.baseURL()));
+ _inputStream = _netCon->getStream(url);
if ( ! _inputStream.get() )
{
- log_error( _("Gnash could not open this url: %s"), url );
+ log_error( _("Gnash could not get stream '%s' from NetConnection"),
url );
setStatus(streamNotFound);
return;
}
- [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful,
Sandro Santilli <=
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Benjamin Wolsey, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Sandro Santilli, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Benjamin Wolsey, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Sandro Santilli, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Benjamin Wolsey, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Sandro Santilli, 2008/12/13
- Re: [Gnash-commit] /srv/bzr/gnash/trunk r10414: Move stream creation logic from NetStream to NetConnection (will be useful, Sandro Santilli, 2008/12/13