[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11968: Drop another unnecessary mem
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11968: Drop another unnecessary member. |
Date: |
Wed, 24 Feb 2010 19:02:28 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 11968 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2010-02-24 19:02:28 +0100
message:
Drop another unnecessary member.
modified:
libbase/RTMP.cpp
libbase/RTMP.h
utilities/rtmpget.cpp
=== modified file 'libbase/RTMP.cpp'
--- a/libbase/RTMP.cpp 2010-02-24 15:05:18 +0000
+++ b/libbase/RTMP.cpp 2010-02-24 18:00:03 +0000
@@ -100,7 +100,6 @@
RTMP::RTMP()
:
_inChunkSize(RTMP_DEFAULT_CHUNKSIZE),
- m_stream_id(-1),
m_mediaChannel(0),
m_nClientBW2(2),
_bytesIn(0),
@@ -141,9 +140,9 @@
}
void
-RTMP::setBufferTime(size_t size)
+RTMP::setBufferTime(size_t size, int streamID)
{
- sendCtrl(*this, CONTROL_BUFFER_TIME, m_stream_id, size);
+ sendCtrl(*this, CONTROL_BUFFER_TIME, streamID, size);
}
void
@@ -774,8 +773,6 @@
_socket.close();
_inChannels.clear();
_outChannels.clear();
-
- m_stream_id = -1;
_inChunkSize = RTMP_DEFAULT_CHUNKSIZE;
_outChunkSize = RTMP_DEFAULT_CHUNKSIZE;
_bytesIn = 0;
=== modified file 'libbase/RTMP.h'
--- a/libbase/RTMP.h 2010-02-24 17:05:18 +0000
+++ b/libbase/RTMP.h 2010-02-24 18:00:03 +0000
@@ -340,7 +340,8 @@
/// Instruct server to buffer this much data.
//
/// @param time time in milliseconds.
- void setBufferTime(size_t time);
+ /// @param streamID the ID of the stream to set buffer time on.
+ void setBufferTime(size_t time, int streamID);
/// Whether we have a basic connection to a server.
//
@@ -417,7 +418,6 @@
}
int _inChunkSize;
- int m_stream_id;
int m_mediaChannel;
boost::uint8_t m_nClientBW2;
size_t _bytesIn;
=== modified file 'utilities/rtmpget.cpp'
--- a/utilities/rtmpget.cpp 2010-02-24 15:28:11 +0000
+++ b/utilities/rtmpget.cpp 2010-02-24 18:00:03 +0000
@@ -101,7 +101,8 @@
:
_callCount(0),
_seek(0),
- _len(-1)
+ _len(-1),
+ _stream(0)
{}
size_t callNumber() {
@@ -145,6 +146,14 @@
return _len;
}
+ void setStreamID(int s) {
+ _stream = s;
+ }
+
+ int streamID() const {
+ return _stream;
+ }
+
private:
size_t _callCount;
std::map<size_t, std::string> _calls;
@@ -152,6 +161,8 @@
std::string _playpath;
double _seek, _len;
+
+ int _stream;
};
void
@@ -247,10 +258,9 @@
}
void
-sendPausePacket(rtmp::RTMP& r, FakeNC& /*nc*/, bool flag, double time)
+sendPausePacket(rtmp::RTMP& r, FakeNC& nc, bool flag, double time)
{
- // TODO: store in NetStream or NC?
- const int streamid = r.m_stream_id;
+ const int streamid = nc.streamID();
SimpleBuffer buf;
@@ -276,8 +286,7 @@
sendPlayPacket(rtmp::RTMP& r, FakeNC& nc)
{
- // TODO: where should we store this?
- const int streamid = r.m_stream_id;
+ const int streamid = nc.streamID();
const double seektime = nc.seekTime() * 1000.0;
const double length = nc.length() * 1000.0;
@@ -566,13 +575,13 @@
double sid = AMF::readNumber(payload, end);
log_debug("Stream ID: %s", sid);
- r.m_stream_id = sid;
+ nc.setStreamID(sid);
/// Issue NetStream.play command.
sendPlayPacket(r, nc);
/// Allows quick downloading.
- r.setBufferTime(3600000);
+ r.setBufferTime(3600000, nc.streamID());
}
else if (calledMethod == "play") {
@@ -706,7 +715,6 @@
|| code == "NetStream.Play.StreamNotFound"
|| code == "NetConnection.Connect.InvalidApp")
{
- r.m_stream_id = -1;
r.close();
log_error( "Closing connection: %s", code);
std::exit(EXIT_SUCCESS);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11968: Drop another unnecessary member.,
Benjamin Wolsey <=