winlin

complete the comments of RTMP protocol.

@@ -1329,12 +1329,76 @@ protected: @@ -1329,12 +1329,76 @@ protected:
1329 enum SrcPCUCEventType 1329 enum SrcPCUCEventType
1330 { 1330 {
1331 // generally, 4bytes event-data 1331 // generally, 4bytes event-data
  1332 +
  1333 + /**
  1334 + * The server sends this event to notify the client
  1335 + * that a stream has become functional and can be
  1336 + * used for communication. By default, this event
  1337 + * is sent on ID 0 after the application connect
  1338 + * command is successfully received from the
  1339 + * client. The event data is 4-byte and represents
  1340 + * the stream ID of the stream that became
  1341 + * functional.
  1342 + */
1332 SrcPCUCStreamBegin = 0x00, 1343 SrcPCUCStreamBegin = 0x00,
  1344 +
  1345 + /**
  1346 + * The server sends this event to notify the client
  1347 + * that the playback of data is over as requested
  1348 + * on this stream. No more data is sent without
  1349 + * issuing additional commands. The client discards
  1350 + * the messages received for the stream. The
  1351 + * 4 bytes of event data represent the ID of the
  1352 + * stream on which playback has ended.
  1353 + */
1333 SrcPCUCStreamEOF = 0x01, 1354 SrcPCUCStreamEOF = 0x01,
  1355 +
  1356 + /**
  1357 + * The server sends this event to notify the client
  1358 + * that there is no more data on the stream. If the
  1359 + * server does not detect any message for a time
  1360 + * period, it can notify the subscribed clients
  1361 + * that the stream is dry. The 4 bytes of event
  1362 + * data represent the stream ID of the dry stream.
  1363 + */
1334 SrcPCUCStreamDry = 0x02, 1364 SrcPCUCStreamDry = 0x02,
  1365 +
  1366 + /**
  1367 + * The client sends this event to inform the server
  1368 + * of the buffer size (in milliseconds) that is
  1369 + * used to buffer any data coming over a stream.
  1370 + * This event is sent before the server starts
  1371 + * processing the stream. The first 4 bytes of the
  1372 + * event data represent the stream ID and the next
  1373 + * 4 bytes represent the buffer length, in
  1374 + * milliseconds.
  1375 + */
1335 SrcPCUCSetBufferLength = 0x03, // 8bytes event-data 1376 SrcPCUCSetBufferLength = 0x03, // 8bytes event-data
  1377 +
  1378 + /**
  1379 + * The server sends this event to notify the client
  1380 + * that the stream is a recorded stream. The
  1381 + * 4 bytes event data represent the stream ID of
  1382 + * the recorded stream.
  1383 + */
1336 SrcPCUCStreamIsRecorded = 0x04, 1384 SrcPCUCStreamIsRecorded = 0x04,
  1385 +
  1386 + /**
  1387 + * The server sends this event to test whether the
  1388 + * client is reachable. Event data is a 4-byte
  1389 + * timestamp, representing the local server time
  1390 + * when the server dispatched the command. The
  1391 + * client responds with kMsgPingResponse on
  1392 + * receiving kMsgPingRequest.
  1393 + */
1337 SrcPCUCPingRequest = 0x06, 1394 SrcPCUCPingRequest = 0x06,
  1395 +
  1396 + /**
  1397 + * The client sends this event to the server in
  1398 + * response to the ping request. The event data is
  1399 + * a 4-byte timestamp, which was received with the
  1400 + * kMsgPingRequest request.
  1401 + */
1338 SrcPCUCPingResponse = 0x07, 1402 SrcPCUCPingResponse = 0x07,
1339 }; 1403 };
1340 1404