Changeset 75
- Timestamp:
- 08/16/10 21:48:02 (18 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
builders/androidapplestreaming/src/com/rtmpd/CommandsInterface.java (modified) (1 diff)
-
sources/androidapplestreaming/include/api.h (modified) (1 diff)
-
sources/androidapplestreaming/src/api.cpp (modified) (1 diff)
-
sources/androidapplestreaming/src/main.cpp (modified) (2 diffs)
-
sources/tests/src/main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/builders/androidapplestreaming/src/com/rtmpd/CommandsInterface.java
r74 r75 35 35 public native HashMap<Object, Object> ContextCloseAll(); 36 36 37 public native HashMap<Object, Object> CommandPlay(int contextId, String connectingString); 38 37 39 public native HashMap<Object, Object> CommandPlay(int contextId, String m3u8Uri, String httpSessionId, String keyPassword); 38 40 -
trunk/sources/androidapplestreaming/include/api.h
r74 r75 31 31 Variant ContextCloseAll(); 32 32 33 Variant CommandPlay(uint32_t contextId, string connectingString); 33 34 Variant CommandPlay(uint32_t contextId, string m3u8Uri, string httpSessionId, 34 35 string keyPassword); -
trunk/sources/androidapplestreaming/src/api.cpp
r74 r75 193 193 } 194 194 195 Variant CommandPlay(uint32_t contextId, string connectingString) { 196 vector<string> parts; 197 split(connectingString, ":", parts); 198 if ((parts.size() != 1) && (parts.size() != 2)) { 199 ASSERT("Invalid connecting string %s", STR(connectingString)); 200 } 201 string b64encoded; 202 if (parts.size() == 1) 203 b64encoded = parts[0]; 204 else 205 b64encoded = parts[1]; 206 string all = unb64(b64encoded); 207 split(all, "|", parts); 208 if ((parts.size() != 1) && (parts.size() != 3)) { 209 ASSERT("Invalid connecting string %s", STR(all)); 210 } 211 string uri = parts[0]; 212 string keyPassword = ""; 213 string httpSessionId = ""; 214 if (parts.size() == 3) { 215 keyPassword = parts[1]; 216 httpSessionId = parts[2]; 217 } 218 FINEST("uri: `%s`\nkeyPassword: `%s`\nhttpSessionId: `%s`", STR(uri), 219 STR(keyPassword), STR(httpSessionId)); 220 if (uri == "") { 221 ASSERT("Invalid connecting string: %s", STR(connectingString)); 222 } 223 return CommandPlay(contextId, uri, httpSessionId, keyPassword); 224 } 225 195 226 Variant CommandPlay(uint32_t contextId, string m3u8Uri, string httpSessionId, 196 227 string keyPassword) { -
trunk/sources/androidapplestreaming/src/main.cpp
r74 r75 83 83 84 84 85 #define MY_URL "http://mlbvod-akc.mlb.com/mlbam/2010/04/08/MLB_GAME_VIDEO_LANPIT_HOME_20100408/master_wired.m3u8" 86 #define MY_SESSION_ID "playback=HTTP_CLOUD_WIRED&contentId=7320085&appAccountName=mlb&eventId=14-263849-2010-04-08&ipid=11627706&sessionKey=3HJ3abDj%2BPBkmIn8cprQTgkYIa8%3D" 87 #define MY_KEY "ugkuOk9Qy4HNS5uRxQcQXHfLuAI=" 85 //#define MY_URL "http://mlbvod-akc.mlb.com/mlbam/2010/04/08/MLB_GAME_VIDEO_LANPIT_HOME_20100408/master_wired.m3u8" 86 //#define MY_SESSION_ID "playback=HTTP_CLOUD_WIRED&contentId=7320085&appAccountName=mlb&eventId=14-263849-2010-04-08&ipid=11627706&sessionKey=3HJ3abDj%2BPBkmIn8cprQTgkYIa8%3D" 87 //#define MY_KEY "ugkuOk9Qy4HNS5uRxQcQXHfLuAI=" 88 89 #define CONDENSED_CONN_STRING "base64:aHR0cDovL21sYnZvZC1ha2MubWxiLmNvbS9tbGJhbS8yMDEwLzA0LzA4L01MQl9HQU1FX1ZJREVPX0xBTlBJVF9IT01FXzIwMTAwNDA4L21hc3Rlcl93aXJlZC5tM3U4fHlNQmVFcEl6OEJEaUFYV0k0dUdIUm1UaHdIRT18cGxheWJhY2s9SFRUUF9DTE9VRF9XSVJFRCZjb250ZW50SWQ9NzMyMDA4NSZhcHBBY2NvdW50TmFtZT1tbGImZXZlbnRJZD0xNC0yNjM4NDktMjAxMC0wNC0wOCZpcGlkPTExNjI3NzA2JnNlc3Npb25LZXk9cUNveGRIaUlOY3FDbHlEcEZoU2dma3dJSWc0JTNE" 88 90 89 91 void testCommands() { … … 92 94 93 95 uint32_t contextId = (uint32_t) ASC_RES_PARAM(result, "contextId"); 94 result = CommandPlay(contextId, MY_URL, MY_SESSION_ID, MY_KEY); 96 // result = CommandPlay(contextId, MY_URL, MY_SESSION_ID, MY_KEY); 97 // FINEST("result:\n%s", STR(result.ToString())); 98 result = CommandPlay(contextId, CONDENSED_CONN_STRING); 95 99 FINEST("result:\n%s", STR(result.ToString())); 96 100 -
trunk/sources/tests/src/main.cpp
r56 r75 25 25 int main(int argc, char **argv) { 26 26 TS_PRINT("Begin tests...\n"); 27 printf("sizeof(Variant): %lu\n",sizeof(Variant)); 27 28 EXECUTE_SUITE(CommonTestsSuite); 28 29 EXECUTE_SUITE(VariantTestsSuite);
Note: See TracChangeset
for help on using the changeset viewer.
