[vlc-devel] [PATCH 6/9] dash: added connection to chunk
Christopher at mailsrv.uni-klu.ac.at
Christopher at mailsrv.uni-klu.ac.at
Fri Mar 9 19:05:24 CET 2012
From: Christopher Mueller <christopher.mueller at itec.aau.at>
---
modules/stream_filter/dash/http/Chunk.cpp | 11 ++++++++++-
modules/stream_filter/dash/http/Chunk.h | 5 +++++
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/modules/stream_filter/dash/http/Chunk.cpp b/modules/stream_filter/dash/http/Chunk.cpp
index 56ce1aa..78bcaa8 100644
--- a/modules/stream_filter/dash/http/Chunk.cpp
+++ b/modules/stream_filter/dash/http/Chunk.cpp
@@ -36,7 +36,8 @@ Chunk::Chunk () :
port (0),
isHostname (false),
length (0),
- bytesRead (0)
+ bytesRead (0),
+ connection (NULL)
{
}
@@ -138,3 +139,11 @@ size_t Chunk::getPercentDownloaded () const
{
return (size_t)(((float)this->bytesRead / this->length) * 100);
}
+IHTTPConnection* Chunk::getConnection () const
+{
+ return this->connection;
+}
+void Chunk::setConnection (IHTTPConnection *connection)
+{
+ this->connection = connection;
+}
diff --git a/modules/stream_filter/dash/http/Chunk.h b/modules/stream_filter/dash/http/Chunk.h
index 4deec4b..e10474b 100644
--- a/modules/stream_filter/dash/http/Chunk.h
+++ b/modules/stream_filter/dash/http/Chunk.h
@@ -31,6 +31,8 @@
#include <vlc_network.h>
#include <vlc_url.h>
+#include "IHTTPConnection.h"
+
#include <vector>
#include <string>
#include <stdint.h>
@@ -55,7 +57,9 @@ namespace dash
uint64_t getBytesRead () const;
uint64_t getBytesToRead () const;
size_t getPercentDownloaded () const;
+ IHTTPConnection* getConnection () const;
+ void setConnection (IHTTPConnection *connection);
void setBytesRead (uint64_t bytes);
void setLength (uint64_t length);
void setEndByte (int endByte);
@@ -80,6 +84,7 @@ namespace dash
bool isHostname;
size_t length;
uint64_t bytesRead;
+ IHTTPConnection *connection;
};
}
}
--
1.7.0.4
More information about the vlc-devel
mailing list