winlin

add comments for the RTMP packet fields, NULL or never NULL. 2.0.5

@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "2" 32 #define VERSION_MAJOR "2"
33 #define VERSION_MINOR "0" 33 #define VERSION_MINOR "0"
34 -#define VERSION_REVISION "4" 34 +#define VERSION_REVISION "5"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
@@ -572,10 +572,12 @@ public: @@ -572,10 +572,12 @@ public:
572 * Command information object which has the name-value pairs. 572 * Command information object which has the name-value pairs.
573 * @remark: alloc in packet constructor, user can directly use it, 573 * @remark: alloc in packet constructor, user can directly use it,
574 * user should never alloc it again which will cause memory leak. 574 * user should never alloc it again which will cause memory leak.
  575 + * @remark, never be NULL.
575 */ 576 */
576 SrsAmf0Object* command_object; 577 SrsAmf0Object* command_object;
577 /** 578 /**
578 * Any optional information 579 * Any optional information
  580 + * @remark, optional, init to and maybe NULL.
579 */ 581 */
580 SrsAmf0Object* args; 582 SrsAmf0Object* args;
581 public: 583 public:
@@ -608,11 +610,13 @@ public: @@ -608,11 +610,13 @@ public:
608 double transaction_id; 610 double transaction_id;
609 /** 611 /**
610 * Name-value pairs that describe the properties(fmsver etc.) of the connection. 612 * Name-value pairs that describe the properties(fmsver etc.) of the connection.
  613 + * @remark, never be NULL.
611 */ 614 */
612 SrsAmf0Object* props; 615 SrsAmf0Object* props;
613 /** 616 /**
614 * Name-value pairs that describe the response from|the server. ‘code’, 617 * Name-value pairs that describe the response from|the server. ‘code’,
615 * ‘level’, ‘description’ are names of few among such information. 618 * ‘level’, ‘description’ are names of few among such information.
  619 + * @remark, never be NULL.
616 */ 620 */
617 SrsAmf0Object* info; 621 SrsAmf0Object* info;
618 public: 622 public:
@@ -650,10 +654,12 @@ public: @@ -650,10 +654,12 @@ public:
650 /** 654 /**
651 * If there exists any command info this 655 * If there exists any command info this
652 * is set, else this is set to null type. 656 * is set, else this is set to null type.
  657 + * @remark, optional, init to and maybe NULL.
653 */ 658 */
654 SrsAmf0Any* command_object; 659 SrsAmf0Any* command_object;
655 /** 660 /**
656 * Any optional arguments to be provided 661 * Any optional arguments to be provided
  662 + * @remark, optional, init to and maybe NULL.
657 */ 663 */
658 SrsAmf0Any* arguments; 664 SrsAmf0Any* arguments;
659 public: 665 public:
@@ -686,10 +692,12 @@ public: @@ -686,10 +692,12 @@ public:
686 double transaction_id; 692 double transaction_id;
687 /** 693 /**
688 * If there exists any command info this is set, else this is set to null type. 694 * If there exists any command info this is set, else this is set to null type.
  695 + * @remark, optional, init to and maybe NULL.
689 */ 696 */
690 SrsAmf0Any* command_object; 697 SrsAmf0Any* command_object;
691 /** 698 /**
692 * Response from the method that was called. 699 * Response from the method that was called.
  700 + * @remark, optional, init to and maybe NULL.
693 */ 701 */
694 SrsAmf0Any* response; 702 SrsAmf0Any* response;
695 public: 703 public:
@@ -724,6 +732,7 @@ public: @@ -724,6 +732,7 @@ public:
724 double transaction_id; 732 double transaction_id;
725 /** 733 /**
726 * If there exists any command info this is set, else this is set to null type. 734 * If there exists any command info this is set, else this is set to null type.
  735 + * @remark, never be NULL, an AMF0 null instance.
727 */ 736 */
728 SrsAmf0Any* command_object; // null 737 SrsAmf0Any* command_object; // null
729 public: 738 public:
@@ -756,6 +765,7 @@ public: @@ -756,6 +765,7 @@ public:
756 double transaction_id; 765 double transaction_id;
757 /** 766 /**
758 * If there exists any command info this is set, else this is set to null type. 767 * If there exists any command info this is set, else this is set to null type.
  768 + * @remark, never be NULL, an AMF0 null instance.
759 */ 769 */
760 SrsAmf0Any* command_object; // null 770 SrsAmf0Any* command_object; // null
761 /** 771 /**
@@ -793,6 +803,7 @@ public: @@ -793,6 +803,7 @@ public:
793 double transaction_id; 803 double transaction_id;
794 /** 804 /**
795 * Command information object does not exist. Set to null type. 805 * Command information object does not exist. Set to null type.
  806 + * @remark, never be NULL, an AMF0 null instance.
796 */ 807 */
797 SrsAmf0Any* command_object; // null 808 SrsAmf0Any* command_object; // null
798 public: 809 public:
@@ -819,6 +830,7 @@ public: @@ -819,6 +830,7 @@ public:
819 double transaction_id; 830 double transaction_id;
820 /** 831 /**
821 * If there exists any command info this is set, else this is set to null type. 832 * If there exists any command info this is set, else this is set to null type.
  833 + * @remark, never be NULL, an AMF0 null instance.
822 */ 834 */
823 SrsAmf0Any* command_object; // null 835 SrsAmf0Any* command_object; // null
824 /** 836 /**
@@ -859,10 +871,12 @@ public: @@ -859,10 +871,12 @@ public:
859 double transaction_id; 871 double transaction_id;
860 /** 872 /**
861 * If there exists any command info this is set, else this is set to null type. 873 * If there exists any command info this is set, else this is set to null type.
  874 + * @remark, never be NULL, an AMF0 null instance.
862 */ 875 */
863 SrsAmf0Any* command_object; // null 876 SrsAmf0Any* command_object; // null
864 /** 877 /**
865 * the optional args, set to undefined. 878 * the optional args, set to undefined.
  879 + * @remark, never be NULL, an AMF0 undefined instance.
866 */ 880 */
867 SrsAmf0Any* args; // undefined 881 SrsAmf0Any* args; // undefined
868 public: 882 public:
@@ -900,6 +914,7 @@ public: @@ -900,6 +914,7 @@ public:
900 double transaction_id; 914 double transaction_id;
901 /** 915 /**
902 * Command information object does not exist. Set to null type. 916 * Command information object does not exist. Set to null type.
  917 + * @remark, never be NULL, an AMF0 null instance.
903 */ 918 */
904 SrsAmf0Any* command_object; // null 919 SrsAmf0Any* command_object; // null
905 /** 920 /**
@@ -952,6 +967,7 @@ public: @@ -952,6 +967,7 @@ public:
952 double transaction_id; 967 double transaction_id;
953 /** 968 /**
954 * Command information object does not exist. Set to null type. 969 * Command information object does not exist. Set to null type.
  970 + * @remark, never be NULL, an AMF0 null instance.
955 */ 971 */
956 SrsAmf0Any* command_object; // null 972 SrsAmf0Any* command_object; // null
957 /** 973 /**
@@ -990,6 +1006,7 @@ public: @@ -990,6 +1006,7 @@ public:
990 double transaction_id; 1006 double transaction_id;
991 /** 1007 /**
992 * Command information does not exist. Set to null type. 1008 * Command information does not exist. Set to null type.
  1009 + * @remark, never be NULL, an AMF0 null instance.
993 */ 1010 */
994 SrsAmf0Any* command_object; // null 1011 SrsAmf0Any* command_object; // null
995 /** 1012 /**
@@ -1069,12 +1086,14 @@ public: @@ -1069,12 +1086,14 @@ public:
1069 double transaction_id; 1086 double transaction_id;
1070 /** 1087 /**
1071 * Command information does not exist. Set to null type. 1088 * Command information does not exist. Set to null type.
  1089 + * @remark, never be NULL, an AMF0 null instance.
1072 */ 1090 */
1073 SrsAmf0Any* command_object; // null 1091 SrsAmf0Any* command_object; // null
1074 /** 1092 /**
1075 * If the play command is successful, the client receives OnStatus message from 1093 * If the play command is successful, the client receives OnStatus message from
1076 * server which is NetStream.Play.Start. If the specified stream is not found, 1094 * server which is NetStream.Play.Start. If the specified stream is not found,
1077 * NetStream.Play.StreamNotFound is received. 1095 * NetStream.Play.StreamNotFound is received.
  1096 + * @remark, never be NULL, an AMF0 object instance.
1078 */ 1097 */
1079 SrsAmf0Object* desc; 1098 SrsAmf0Object* desc;
1080 public: 1099 public:
@@ -1105,6 +1124,7 @@ public: @@ -1105,6 +1124,7 @@ public:
1105 double transaction_id; 1124 double transaction_id;
1106 /** 1125 /**
1107 * Command information does not exist. Set to null type. 1126 * Command information does not exist. Set to null type.
  1127 + * @remark, never be NULL, an AMF0 null instance.
1108 */ 1128 */
1109 SrsAmf0Any* args; // null 1129 SrsAmf0Any* args; // null
1110 public: 1130 public:
@@ -1136,11 +1156,13 @@ public: @@ -1136,11 +1156,13 @@ public:
1136 double transaction_id; 1156 double transaction_id;
1137 /** 1157 /**
1138 * Command information does not exist. Set to null type. 1158 * Command information does not exist. Set to null type.
  1159 + * @remark, never be NULL, an AMF0 null instance.
1139 */ 1160 */
1140 SrsAmf0Any* args; // null 1161 SrsAmf0Any* args; // null
1141 /** 1162 /**
1142 * Name-value pairs that describe the response from the server. 1163 * Name-value pairs that describe the response from the server.
1143 * ‘code’,‘level’, ‘description’ are names of few among such information. 1164 * ‘code’,‘level’, ‘description’ are names of few among such information.
  1165 + * @remark, never be NULL, an AMF0 object instance.
1144 */ 1166 */
1145 SrsAmf0Object* data; 1167 SrsAmf0Object* data;
1146 public: 1168 public:
@@ -1176,11 +1198,13 @@ public: @@ -1176,11 +1198,13 @@ public:
1176 double transaction_id; 1198 double transaction_id;
1177 /** 1199 /**
1178 * Command information does not exist. Set to null type. 1200 * Command information does not exist. Set to null type.
  1201 + * @remark, never be NULL, an AMF0 null instance.
1179 */ 1202 */
1180 SrsAmf0Any* args; // null 1203 SrsAmf0Any* args; // null
1181 /** 1204 /**
1182 * Name-value pairs that describe the response from the server. 1205 * Name-value pairs that describe the response from the server.
1183 * ‘code’,‘level’, ‘description’ are names of few among such information. 1206 * ‘code’,‘level’, ‘description’ are names of few among such information.
  1207 + * @remark, never be NULL, an AMF0 object instance.
1184 */ 1208 */
1185 SrsAmf0Object* data; 1209 SrsAmf0Object* data;
1186 public: 1210 public:
@@ -1238,6 +1262,7 @@ public: @@ -1238,6 +1262,7 @@ public:
1238 /** 1262 /**
1239 * Name-value pairs that describe the response from the server. 1263 * Name-value pairs that describe the response from the server.
1240 * ‘code’, are names of few among such information. 1264 * ‘code’, are names of few among such information.
  1265 + * @remark, never be NULL, an AMF0 object instance.
1241 */ 1266 */
1242 SrsAmf0Object* data; 1267 SrsAmf0Object* data;
1243 public: 1268 public:
@@ -1301,6 +1326,7 @@ public: @@ -1301,6 +1326,7 @@ public:
1301 std::string name; 1326 std::string name;
1302 /** 1327 /**
1303 * Metadata of stream. 1328 * Metadata of stream.
  1329 + * @remark, never be NULL, an AMF0 object instance.
1304 */ 1330 */
1305 SrsAmf0Object* metadata; 1331 SrsAmf0Object* metadata;
1306 public: 1332 public: