summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/HTTPStream.h8
-rw-r--r--media/libstagefright/include/NuHTTPDataSource.h8
2 files changed, 12 insertions, 4 deletions
diff --git a/media/libstagefright/include/HTTPStream.h b/media/libstagefright/include/HTTPStream.h
index 35b0865..793798f 100644
--- a/media/libstagefright/include/HTTPStream.h
+++ b/media/libstagefright/include/HTTPStream.h
@@ -55,6 +55,10 @@ public:
// Pass a negative value to disable the timeout.
void setReceiveTimeout(int seconds);
+ // Receive a line of data terminated by CRLF, line will be '\0' terminated
+ // _excluding_ the termianting CRLF.
+ status_t receive_line(char *line, size_t size);
+
private:
enum State {
READY,
@@ -68,10 +72,6 @@ private:
KeyedVector<string, string> mHeaders;
- // Receive a line of data terminated by CRLF, line will be '\0' terminated
- // _excluding_ the termianting CRLF.
- status_t receive_line(char *line, size_t size);
-
HTTPStream(const HTTPStream &);
HTTPStream &operator=(const HTTPStream &);
};
diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h
index 0b840bd..c42691f 100644
--- a/media/libstagefright/include/NuHTTPDataSource.h
+++ b/media/libstagefright/include/NuHTTPDataSource.h
@@ -64,6 +64,11 @@ private:
off_t mOffset;
off_t mContentLength;
bool mContentLengthValid;
+ bool mHasChunkedTransferEncoding;
+
+ // The number of data bytes in the current chunk before any subsequent
+ // chunk header (or -1 if no more chunks).
+ ssize_t mChunkDataBytesLeft;
List<BandwidthEntry> mBandwidthHistory;
size_t mNumBandwidthHistoryItems;
@@ -81,6 +86,9 @@ private:
const String8 &headers,
off_t offset);
+ // Read up to "size" bytes of data, respect transfer encoding.
+ ssize_t internalRead(void *data, size_t size);
+
void applyTimeoutResponse();
void addBandwidthMeasurement_l(size_t numBytes, int64_t delayUs);