diff options
author | Andreas Huber <andih@google.com> | 2013-03-26 10:19:24 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2013-03-26 10:19:24 -0700 |
commit | 190cdbab6ba24519d6b5e8bec6c2c74e6650e284 (patch) | |
tree | 515d0a75f7bf43b802fb3247f3ce86efa7526af8 /media/libstagefright/wifi-display | |
parent | 27a14b22e03dbd677e100f273e359a0daf2e79c6 (diff) | |
download | frameworks_av-190cdbab6ba24519d6b5e8bec6c2c74e6650e284.zip frameworks_av-190cdbab6ba24519d6b5e8bec6c2c74e6650e284.tar.gz frameworks_av-190cdbab6ba24519d6b5e8bec6c2c74e6650e284.tar.bz2 |
Identify network servers and clients with a OS version related string
and put the logic to create that string in one location instead of many...
Change-Id: I1f729f2e7376cd3b45eea0e48f7bd10084b41b39
Diffstat (limited to 'media/libstagefright/wifi-display')
-rw-r--r-- | media/libstagefright/wifi-display/source/WifiDisplaySource.cpp | 6 | ||||
-rw-r--r-- | media/libstagefright/wifi-display/source/WifiDisplaySource.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp index f2e659a..792a9c5 100644 --- a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp +++ b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp @@ -34,6 +34,7 @@ #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> #include <media/stagefright/MediaErrors.h> +#include <media/stagefright/Utils.h> #include <arpa/inet.h> #include <cutils/properties.h> @@ -42,6 +43,9 @@ namespace android { +// static +const AString WifiDisplaySource::sUserAgent = MakeUserAgent(); + WifiDisplaySource::WifiDisplaySource( const sp<ANetworkSession> &netSession, const sp<IRemoteDisplayClient> &client, @@ -1559,7 +1563,7 @@ void WifiDisplaySource::AppendCommonResponse( response->append(buf); response->append("\r\n"); - response->append("Server: Mine/1.0\r\n"); + response->append(StringPrintf("Server: %s\r\n", sUserAgent.c_str())); if (cseq >= 0) { response->append(StringPrintf("CSeq: %d\r\n", cseq)); diff --git a/media/libstagefright/wifi-display/source/WifiDisplaySource.h b/media/libstagefright/wifi-display/source/WifiDisplaySource.h index 3a1b0f9..3efa0b4 100644 --- a/media/libstagefright/wifi-display/source/WifiDisplaySource.h +++ b/media/libstagefright/wifi-display/source/WifiDisplaySource.h @@ -113,6 +113,8 @@ private: static const int64_t kPlaybackSessionTimeoutUs = kPlaybackSessionTimeoutSecs * 1000000ll; + static const AString sUserAgent; + State mState; VideoFormats mSupportedSourceVideoFormats; sp<ANetworkSession> mNetSession; |