正在显示
2 个修改的文件
包含
24 行增加
和
24 行删除
@@ -735,7 +735,7 @@ srs_amf0_t srs_amf0_parse(char* data, int size, int* nparsed) | @@ -735,7 +735,7 @@ srs_amf0_t srs_amf0_parse(char* data, int size, int* nparsed) | ||
735 | return amf0; | 735 | return amf0; |
736 | } | 736 | } |
737 | 737 | ||
738 | -srs_amf0_t srs_amf0_create_number(amf0_number value) | 738 | +srs_amf0_t srs_amf0_create_number(srs_amf0_number value) |
739 | { | 739 | { |
740 | return SrsAmf0Any::number(value); | 740 | return SrsAmf0Any::number(value); |
741 | } | 741 | } |
@@ -790,43 +790,43 @@ int srs_amf0_serialize(srs_amf0_t amf0, char* data, int size) | @@ -790,43 +790,43 @@ int srs_amf0_serialize(srs_amf0_t amf0, char* data, int size) | ||
790 | return ret; | 790 | return ret; |
791 | } | 791 | } |
792 | 792 | ||
793 | -amf0_bool srs_amf0_is_string(srs_amf0_t amf0) | 793 | +srs_amf0_bool srs_amf0_is_string(srs_amf0_t amf0) |
794 | { | 794 | { |
795 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 795 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
796 | return any->is_string(); | 796 | return any->is_string(); |
797 | } | 797 | } |
798 | 798 | ||
799 | -amf0_bool srs_amf0_is_boolean(srs_amf0_t amf0) | 799 | +srs_amf0_bool srs_amf0_is_boolean(srs_amf0_t amf0) |
800 | { | 800 | { |
801 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 801 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
802 | return any->is_boolean(); | 802 | return any->is_boolean(); |
803 | } | 803 | } |
804 | 804 | ||
805 | -amf0_bool srs_amf0_is_number(srs_amf0_t amf0) | 805 | +srs_amf0_bool srs_amf0_is_number(srs_amf0_t amf0) |
806 | { | 806 | { |
807 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 807 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
808 | return any->is_number(); | 808 | return any->is_number(); |
809 | } | 809 | } |
810 | 810 | ||
811 | -amf0_bool srs_amf0_is_null(srs_amf0_t amf0) | 811 | +srs_amf0_bool srs_amf0_is_null(srs_amf0_t amf0) |
812 | { | 812 | { |
813 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 813 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
814 | return any->is_null(); | 814 | return any->is_null(); |
815 | } | 815 | } |
816 | 816 | ||
817 | -amf0_bool srs_amf0_is_object(srs_amf0_t amf0) | 817 | +srs_amf0_bool srs_amf0_is_object(srs_amf0_t amf0) |
818 | { | 818 | { |
819 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 819 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
820 | return any->is_object(); | 820 | return any->is_object(); |
821 | } | 821 | } |
822 | 822 | ||
823 | -amf0_bool srs_amf0_is_ecma_array(srs_amf0_t amf0) | 823 | +srs_amf0_bool srs_amf0_is_ecma_array(srs_amf0_t amf0) |
824 | { | 824 | { |
825 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 825 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
826 | return any->is_ecma_array(); | 826 | return any->is_ecma_array(); |
827 | } | 827 | } |
828 | 828 | ||
829 | -amf0_bool srs_amf0_is_strict_array(srs_amf0_t amf0) | 829 | +srs_amf0_bool srs_amf0_is_strict_array(srs_amf0_t amf0) |
830 | { | 830 | { |
831 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 831 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
832 | return any->is_strict_array(); | 832 | return any->is_strict_array(); |
@@ -838,19 +838,19 @@ const char* srs_amf0_to_string(srs_amf0_t amf0) | @@ -838,19 +838,19 @@ const char* srs_amf0_to_string(srs_amf0_t amf0) | ||
838 | return any->to_str_raw(); | 838 | return any->to_str_raw(); |
839 | } | 839 | } |
840 | 840 | ||
841 | -amf0_bool srs_amf0_to_boolean(srs_amf0_t amf0) | 841 | +srs_amf0_bool srs_amf0_to_boolean(srs_amf0_t amf0) |
842 | { | 842 | { |
843 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 843 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
844 | return any->to_boolean(); | 844 | return any->to_boolean(); |
845 | } | 845 | } |
846 | 846 | ||
847 | -amf0_number srs_amf0_to_number(srs_amf0_t amf0) | 847 | +srs_amf0_number srs_amf0_to_number(srs_amf0_t amf0) |
848 | { | 848 | { |
849 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 849 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
850 | return any->to_number(); | 850 | return any->to_number(); |
851 | } | 851 | } |
852 | 852 | ||
853 | -void srs_amf0_set_number(srs_amf0_t amf0, amf0_number value) | 853 | +void srs_amf0_set_number(srs_amf0_t amf0, srs_amf0_number value) |
854 | { | 854 | { |
855 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; | 855 | SrsAmf0Any* any = (SrsAmf0Any*)amf0; |
856 | any->set_number(value); | 856 | any->set_number(value); |
@@ -269,10 +269,10 @@ extern flv_bool srs_flv_is_keyframe(char* data, int32_t size); | @@ -269,10 +269,10 @@ extern flv_bool srs_flv_is_keyframe(char* data, int32_t size); | ||
269 | *************************************************************/ | 269 | *************************************************************/ |
270 | /* the output handler. */ | 270 | /* the output handler. */ |
271 | typedef void* srs_amf0_t; | 271 | typedef void* srs_amf0_t; |
272 | -typedef int amf0_bool; | ||
273 | -typedef double amf0_number; | 272 | +typedef int srs_amf0_bool; |
273 | +typedef double srs_amf0_number; | ||
274 | extern srs_amf0_t srs_amf0_parse(char* data, int size, int* nparsed); | 274 | extern srs_amf0_t srs_amf0_parse(char* data, int size, int* nparsed); |
275 | -extern srs_amf0_t srs_amf0_create_number(amf0_number value); | 275 | +extern srs_amf0_t srs_amf0_create_number(srs_amf0_number value); |
276 | extern srs_amf0_t srs_amf0_create_ecma_array(); | 276 | extern srs_amf0_t srs_amf0_create_ecma_array(); |
277 | extern srs_amf0_t srs_amf0_create_strict_array(); | 277 | extern srs_amf0_t srs_amf0_create_strict_array(); |
278 | extern srs_amf0_t srs_amf0_create_object(); | 278 | extern srs_amf0_t srs_amf0_create_object(); |
@@ -282,19 +282,19 @@ extern void srs_amf0_free_bytes(char* data); | @@ -282,19 +282,19 @@ extern void srs_amf0_free_bytes(char* data); | ||
282 | extern int srs_amf0_size(srs_amf0_t amf0); | 282 | extern int srs_amf0_size(srs_amf0_t amf0); |
283 | extern int srs_amf0_serialize(srs_amf0_t amf0, char* data, int size); | 283 | extern int srs_amf0_serialize(srs_amf0_t amf0, char* data, int size); |
284 | /* type detecter */ | 284 | /* type detecter */ |
285 | -extern amf0_bool srs_amf0_is_string(srs_amf0_t amf0); | ||
286 | -extern amf0_bool srs_amf0_is_boolean(srs_amf0_t amf0); | ||
287 | -extern amf0_bool srs_amf0_is_number(srs_amf0_t amf0); | ||
288 | -extern amf0_bool srs_amf0_is_null(srs_amf0_t amf0); | ||
289 | -extern amf0_bool srs_amf0_is_object(srs_amf0_t amf0); | ||
290 | -extern amf0_bool srs_amf0_is_ecma_array(srs_amf0_t amf0); | ||
291 | -extern amf0_bool srs_amf0_is_strict_array(srs_amf0_t amf0); | 285 | +extern srs_amf0_bool srs_amf0_is_string(srs_amf0_t amf0); |
286 | +extern srs_amf0_bool srs_amf0_is_boolean(srs_amf0_t amf0); | ||
287 | +extern srs_amf0_bool srs_amf0_is_number(srs_amf0_t amf0); | ||
288 | +extern srs_amf0_bool srs_amf0_is_null(srs_amf0_t amf0); | ||
289 | +extern srs_amf0_bool srs_amf0_is_object(srs_amf0_t amf0); | ||
290 | +extern srs_amf0_bool srs_amf0_is_ecma_array(srs_amf0_t amf0); | ||
291 | +extern srs_amf0_bool srs_amf0_is_strict_array(srs_amf0_t amf0); | ||
292 | /* value converter */ | 292 | /* value converter */ |
293 | extern const char* srs_amf0_to_string(srs_amf0_t amf0); | 293 | extern const char* srs_amf0_to_string(srs_amf0_t amf0); |
294 | -extern amf0_bool srs_amf0_to_boolean(srs_amf0_t amf0); | ||
295 | -extern amf0_number srs_amf0_to_number(srs_amf0_t amf0); | 294 | +extern srs_amf0_bool srs_amf0_to_boolean(srs_amf0_t amf0); |
295 | +extern srs_amf0_number srs_amf0_to_number(srs_amf0_t amf0); | ||
296 | /* value setter */ | 296 | /* value setter */ |
297 | -extern void srs_amf0_set_number(srs_amf0_t amf0, amf0_number value); | 297 | +extern void srs_amf0_set_number(srs_amf0_t amf0, srs_amf0_number value); |
298 | /* object value converter */ | 298 | /* object value converter */ |
299 | extern int srs_amf0_object_property_count(srs_amf0_t amf0); | 299 | extern int srs_amf0_object_property_count(srs_amf0_t amf0); |
300 | extern const char* srs_amf0_object_property_name_at(srs_amf0_t amf0, int index); | 300 | extern const char* srs_amf0_object_property_name_at(srs_amf0_t amf0, int index); |
-
请 注册 或 登录 后发表评论