Hi,
i want try app_rtsp with asterisk 1.10 (version actualy i use).
Howewer i’ve some errors when i try to compile it :
If I try with the default file code, i’ve these errors :
cc -O2 -fPIC -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes -c -o app_rtsp.o app_rtsp.c
app_rtsp.c: In function ‘MediaStatsRR’:
app_rtsp.c:238: warning: initialization makes integer from pointer without a cast
app_rtsp.c: In function ‘RtspPlayerBasicAuthorization’:
app_rtsp.c:361: warning: pointer targets in passing argument 2 of ‘ast_base64encode’ differ in signedness
app_rtsp.c: In function ‘GetUdpPorts’:
app_rtsp.c:413: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:416: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:438: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c: In function ‘rtsp_play’:
app_rtsp.c:1429: warning: pointer targets in assignment differ in signedness
app_rtsp.c:1477: error: invalid operands to binary == (have ‘union ast_frame_subclass’ and ‘int’)
app_rtsp.c:1489: error: incompatible types in assignment
app_rtsp.c:1495: error: incompatible types in assignment
app_rtsp.c:1603: warning: format ‘%x’ expects type ‘unsigned int’, but argument 6 has type ‘struct ast_format_cap *’
app_rtsp.c:1609: error: invalid operands to binary | (have ‘struct ast_format_cap *’ and ‘int’)
app_rtsp.c:1612: warning: passing argument 1 of ‘ast_translator_best_choice’ from incompatible pointer type
app_rtsp.c:1612: warning: passing argument 2 of ‘ast_translator_best_choice’ from incompatible pointer type
app_rtsp.c:1612: error: too few arguments to function ‘ast_translator_best_choice’
app_rtsp.c:1646: error: invalid operands to binary & (have ‘int’ and ‘struct ast_format_cap *’)
app_rtsp.c:1665: warning: passing argument 2 of ‘ast_set_write_format’ makes pointer from integer without a cast
app_rtsp.c:1886: error: incompatible types in assignment
app_rtsp.c:1901: error: incompatible types in assignment
app_rtsp.c:1912: error: invalid operands to binary | (have ‘union ast_frame_subclass’ and ‘int’)
app_rtsp.c: In function ‘rtsp_tunnel’:
app_rtsp.c:2141: error: invalid operands to binary == (have ‘union ast_frame_subclass’ and ‘int’)
app_rtsp.c:2078: warning: unused variable ‘i’
app_rtsp.c: In function ‘load_module’:
app_rtsp.c:2372: warning: passing argument 2 of ‘ast_register_application2’ from incompatible pointer type
make: *** [app_rtsp.o] Erreur 1
If I try with 1.8 version, i’ve :
debian:/home/technet/asteriskvideo/app_rtsp/1.8# make
cc -O2 -fPIC -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes -c -o app_rtsp.o app_rtsp.c
app_rtsp.c:71: error: expected specifier-qualifier-list before ‘format_t’
app_rtsp.c:74: warning: excess elements in struct initializer
app_rtsp.c:74: warning: (near initialization for ‘mimeTypes[0]’)
app_rtsp.c:74: warning: excess elements in struct initializer
app_rtsp.c:74: warning: (near initialization for ‘mimeTypes[0]’)
app_rtsp.c:75: warning: excess elements in struct initializer
app_rtsp.c:75: warning: (near initialization for ‘mimeTypes[1]’)
app_rtsp.c:75: warning: excess elements in struct initializer
app_rtsp.c:75: warning: (near initialization for ‘mimeTypes[1]’)
app_rtsp.c:76: warning: excess elements in struct initializer
app_rtsp.c:76: warning: (near initialization for ‘mimeTypes[2]’)
app_rtsp.c:76: warning: excess elements in struct initializer
app_rtsp.c:76: warning: (near initialization for ‘mimeTypes[2]’)
app_rtsp.c:77: warning: excess elements in struct initializer
app_rtsp.c:77: warning: (near initialization for ‘mimeTypes[3]’)
app_rtsp.c:77: warning: excess elements in struct initializer
app_rtsp.c:77: warning: (near initialization for ‘mimeTypes[3]’)
app_rtsp.c:78: warning: excess elements in struct initializer
app_rtsp.c:78: warning: (near initialization for ‘mimeTypes[4]’)
app_rtsp.c:78: warning: excess elements in struct initializer
app_rtsp.c:78: warning: (near initialization for ‘mimeTypes[4]’)
app_rtsp.c:79: warning: excess elements in struct initializer
app_rtsp.c:79: warning: (near initialization for ‘mimeTypes[5]’)
app_rtsp.c:79: warning: excess elements in struct initializer
app_rtsp.c:79: warning: (near initialization for ‘mimeTypes[5]’)
app_rtsp.c:80: warning: excess elements in struct initializer
app_rtsp.c:80: warning: (near initialization for ‘mimeTypes[6]’)
app_rtsp.c:80: warning: excess elements in struct initializer
app_rtsp.c:80: warning: (near initialization for ‘mimeTypes[6]’)
app_rtsp.c:81: warning: excess elements in struct initializer
app_rtsp.c:81: warning: (near initialization for ‘mimeTypes[7]’)
app_rtsp.c:81: warning: excess elements in struct initializer
app_rtsp.c:81: warning: (near initialization for ‘mimeTypes[7]’)
app_rtsp.c:82: warning: excess elements in struct initializer
app_rtsp.c:82: warning: (near initialization for ‘mimeTypes[8]’)
app_rtsp.c:82: warning: excess elements in struct initializer
app_rtsp.c:82: warning: (near initialization for ‘mimeTypes[8]’)
app_rtsp.c:83: warning: excess elements in struct initializer
app_rtsp.c:83: warning: (near initialization for ‘mimeTypes[9]’)
app_rtsp.c:83: warning: excess elements in struct initializer
app_rtsp.c:83: warning: (near initialization for ‘mimeTypes[9]’)
app_rtsp.c:84: warning: excess elements in struct initializer
app_rtsp.c:84: warning: (near initialization for ‘mimeTypes[10]’)
app_rtsp.c:84: warning: excess elements in struct initializer
app_rtsp.c:84: warning: (near initialization for ‘mimeTypes[10]’)
app_rtsp.c:85: warning: excess elements in struct initializer
app_rtsp.c:85: warning: (near initialization for ‘mimeTypes[11]’)
app_rtsp.c:85: warning: excess elements in struct initializer
app_rtsp.c:85: warning: (near initialization for ‘mimeTypes[11]’)
app_rtsp.c:86: warning: excess elements in struct initializer
app_rtsp.c:86: warning: (near initialization for ‘mimeTypes[12]’)
app_rtsp.c:86: warning: excess elements in struct initializer
app_rtsp.c:86: warning: (near initialization for ‘mimeTypes[12]’)
app_rtsp.c:87: warning: excess elements in struct initializer
app_rtsp.c:87: warning: (near initialization for ‘mimeTypes[13]’)
app_rtsp.c:87: warning: excess elements in struct initializer
app_rtsp.c:87: warning: (near initialization for ‘mimeTypes[13]’)
app_rtsp.c:88: warning: excess elements in struct initializer
app_rtsp.c:88: warning: (near initialization for ‘mimeTypes[14]’)
app_rtsp.c:88: warning: excess elements in struct initializer
app_rtsp.c:88: warning: (near initialization for ‘mimeTypes[14]’)
app_rtsp.c:89: warning: excess elements in struct initializer
app_rtsp.c:89: warning: (near initialization for ‘mimeTypes[15]’)
app_rtsp.c:89: warning: excess elements in struct initializer
app_rtsp.c:89: warning: (near initialization for ‘mimeTypes[15]’)
app_rtsp.c:90: warning: excess elements in struct initializer
app_rtsp.c:90: warning: (near initialization for ‘mimeTypes[16]’)
app_rtsp.c:90: warning: excess elements in struct initializer
app_rtsp.c:90: warning: (near initialization for ‘mimeTypes[16]’)
app_rtsp.c:91: warning: excess elements in struct initializer
app_rtsp.c:91: warning: (near initialization for ‘mimeTypes[17]’)
app_rtsp.c:91: warning: excess elements in struct initializer
app_rtsp.c:91: warning: (near initialization for ‘mimeTypes[17]’)
app_rtsp.c:92: warning: excess elements in struct initializer
app_rtsp.c:92: warning: (near initialization for ‘mimeTypes[18]’)
app_rtsp.c:92: warning: excess elements in struct initializer
app_rtsp.c:92: warning: (near initialization for ‘mimeTypes[18]’)
app_rtsp.c:93: warning: excess elements in struct initializer
app_rtsp.c:93: warning: (near initialization for ‘mimeTypes[19]’)
app_rtsp.c:93: warning: excess elements in struct initializer
app_rtsp.c:93: warning: (near initialization for ‘mimeTypes[19]’)
app_rtsp.c:94: warning: excess elements in struct initializer
app_rtsp.c:94: warning: (near initialization for ‘mimeTypes[20]’)
app_rtsp.c:94: warning: excess elements in struct initializer
app_rtsp.c:94: warning: (near initialization for ‘mimeTypes[20]’)
app_rtsp.c:95: warning: excess elements in struct initializer
app_rtsp.c:95: warning: (near initialization for ‘mimeTypes[21]’)
app_rtsp.c:95: warning: excess elements in struct initializer
app_rtsp.c:95: warning: (near initialization for ‘mimeTypes[21]’)
app_rtsp.c: In function ‘MediaStatsRR’:
app_rtsp.c:240: warning: initialization makes integer from pointer without a cast
app_rtsp.c: In function ‘RtspPlayerBasicAuthorization’:
app_rtsp.c:363: warning: pointer targets in passing argument 2 of ‘ast_base64encode’ differ in signedness
app_rtsp.c: In function ‘GetUdpPorts’:
app_rtsp.c:415: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:418: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:440: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c: At top level:
app_rtsp.c:969: error: expected specifier-qualifier-list before ‘format_t’
app_rtsp.c:977: error: expected specifier-qualifier-list before ‘format_t’
app_rtsp.c: In function ‘CreateMedia’:
app_rtsp.c:1014: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1023: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1024: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c: In function ‘DestroyMedia’:
app_rtsp.c:1042: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1043: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c: In function ‘CreateSDP’:
app_rtsp.c:1126: warning: division by zero
app_rtsp.c:1128: error: ‘struct <anonymous>’ has no member named ‘name’
app_rtsp.c:1131: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1131: error: ‘struct <anonymous>’ has no member named ‘format’
app_rtsp.c:1135: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1135: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1155: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1158: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1160: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1162: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c: In function ‘rtsp_play’:
app_rtsp.c:1366: error: ‘format_t’ undeclared (first use in this function)
app_rtsp.c:1366: error: (Each undeclared identifier is reported only once
app_rtsp.c:1366: error: for each function it appears in.)
app_rtsp.c:1366: error: expected ‘;’ before ‘audioFormat’
app_rtsp.c:1367: error: expected ‘;’ before ‘videoFormat’
app_rtsp.c:1431: warning: pointer targets in assignment differ in signedness
app_rtsp.c:1605: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘struct ast_format_cap *’
app_rtsp.c:1611: error: expected ‘;’ before ‘cap’
app_rtsp.c:1614: error: expected ‘;’ before ‘best’
app_rtsp.c:1616: error: ‘cap’ undeclared (first use in this function)
app_rtsp.c:1616: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1616: error: ‘best’ undeclared (first use in this function)
app_rtsp.c:1619: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1621: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1621: error: too few arguments to function ‘ast_best_codec’
app_rtsp.c:1622: error: ‘struct SDPMedia’ has no member named ‘all’
app_rtsp.c:1628: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1628: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1630: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1635: error: ‘audioFormat’ undeclared (first use in this function)
app_rtsp.c:1635: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1637: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1652: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1652: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1654: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1659: error: ‘videoFormat’ undeclared (first use in this function)
app_rtsp.c:1659: error: ‘struct SDPFormat’ has no member named ‘format’
app_rtsp.c:1661: error: ‘struct SDPFormat’ has no member named ‘control’
app_rtsp.c:1894: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c:1909: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c:1920: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c: In function ‘load_module’:
app_rtsp.c:2379: warning: passing argument 2 of ‘ast_register_application2’ from incompatible pointer type
make: *** [app_rtsp.o] Erreur 1
And if i add a [color=#800080]#define format_t long unsigned int[/color] to the last source file, i’ve :
debian:/home/technet/asteriskvideo/app_rtsp/1.8# make
cc -O2 -fPIC -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes -c -o app_rtsp.o app_rtsp.c
app_rtsp.c: In function ‘MediaStatsRR’:
app_rtsp.c:240: warning: initialization makes integer from pointer without a cast
app_rtsp.c: In function ‘RtspPlayerBasicAuthorization’:
app_rtsp.c:363: warning: pointer targets in passing argument 2 of ‘ast_base64encode’ differ in signedness
app_rtsp.c: In function ‘GetUdpPorts’:
app_rtsp.c:415: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:418: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c:440: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
app_rtsp.c: In function ‘rtsp_play’:
app_rtsp.c:1431: warning: pointer targets in assignment differ in signedness
app_rtsp.c:1605: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘struct ast_format_cap *’
app_rtsp.c:1611: error: invalid operands to binary | (have ‘struct ast_format_cap *’ and ‘int’)
app_rtsp.c:1614: warning: passing argument 1 of ‘ast_translator_best_choice’ from incompatible pointer type
app_rtsp.c:1614: warning: passing argument 2 of ‘ast_translator_best_choice’ from incompatible pointer type
app_rtsp.c:1614: error: too few arguments to function ‘ast_translator_best_choice’
app_rtsp.c:1621: warning: passing argument 1 of ‘ast_best_codec’ makes pointer from integer without a cast
app_rtsp.c:1621: error: too few arguments to function ‘ast_best_codec’
app_rtsp.c:1654: error: invalid operands to binary & (have ‘long unsigned int’ and ‘struct ast_format_cap *’)
app_rtsp.c:1673: warning: passing argument 2 of ‘ast_set_write_format’ makes pointer from integer without a cast
app_rtsp.c:1894: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c:1909: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c:1920: error: ‘union ast_frame_subclass’ has no member named ‘codec’
app_rtsp.c: In function ‘load_module’:
app_rtsp.c:2379: warning: passing argument 2 of ‘ast_register_application2’ from incompatible pointer type
make: *** [app_rtsp.o] Erreur 1
Must I switch to Asterisk 1.8 ? Or can you help me to compile it ?
Thanks !