mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #742, refine the u_intxx_t to uintxx_t
This commit is contained in:
parent
011ac4f6a9
commit
b16ab038ce
49 changed files with 278 additions and 275 deletions
|
@ -136,8 +136,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
srs_human_trace("publish stream success");
|
||||
|
||||
u_int32_t timestamp = 0;
|
||||
u_int32_t time_delta = 45;
|
||||
uint32_t timestamp = 0;
|
||||
uint32_t time_delta = 45;
|
||||
// @remark, to decode the file.
|
||||
char* p = audio_raw;
|
||||
for (;p < audio_raw + file_size;) {
|
||||
|
|
|
@ -134,8 +134,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
srs_human_trace("publish stream success");
|
||||
|
||||
u_int32_t timestamp = 0;
|
||||
u_int32_t time_delta = 17;
|
||||
uint32_t timestamp = 0;
|
||||
uint32_t time_delta = 17;
|
||||
// @remark, to decode the file.
|
||||
char* p = audio_raw;
|
||||
for (;p < audio_raw + file_size;) {
|
||||
|
|
|
@ -38,7 +38,7 @@ int main(int argc, char** argv)
|
|||
int size;
|
||||
char type;
|
||||
char* data;
|
||||
u_int32_t timestamp;
|
||||
uint32_t timestamp;
|
||||
|
||||
// srs debug info.
|
||||
char srs_server_ip[128];
|
||||
|
|
|
@ -51,8 +51,8 @@ int main(int argc, char** argv)
|
|||
int size;
|
||||
char type;
|
||||
char* data;
|
||||
u_int32_t timestamp;
|
||||
u_int32_t basetime = 0;
|
||||
uint32_t timestamp;
|
||||
uint32_t basetime = 0;
|
||||
|
||||
// user options
|
||||
const char* rtmp_url = NULL;
|
||||
|
|
|
@ -189,7 +189,7 @@ int build_keyframes(srs_flv_t ic, srs_amf0_t *pname, srs_amf0_t* pdata, srs_amf0
|
|||
|
||||
// packet data
|
||||
char type;
|
||||
u_int32_t timestamp = 0;
|
||||
uint32_t timestamp = 0;
|
||||
char* data = NULL;
|
||||
int32_t size;
|
||||
int64_t offset = 0;
|
||||
|
@ -294,7 +294,7 @@ int do_inject_flv(srs_flv_t ic, srs_flv_t oc, srs_amf0_t amf0_name, srs_amf0_t a
|
|||
char header[13];
|
||||
// packet data
|
||||
char type;
|
||||
u_int32_t timestamp = 0;
|
||||
uint32_t timestamp = 0;
|
||||
char* data = NULL;
|
||||
int32_t size;
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ int parse_flv(srs_flv_t flv)
|
|||
char header[13];
|
||||
// packet data
|
||||
char type;
|
||||
u_int32_t timestamp = 0;
|
||||
uint32_t timestamp = 0;
|
||||
char* data = NULL;
|
||||
int32_t size;
|
||||
int64_t offset = 0;
|
||||
|
|
|
@ -183,7 +183,7 @@ int main(int argc, char** argv)
|
|||
// 5bits, 7.3.1 NAL unit syntax,
|
||||
// ISO_IEC_14496-10-AVC-2003.pdf, page 44.
|
||||
// 7: SPS, 8: PPS, 5: I Frame, 1: P Frame, 9: AUD, 6: SEI
|
||||
u_int8_t nut = (char)data[nb_start_code] & 0x1f;
|
||||
uint8_t nut = (char)data[nb_start_code] & 0x1f;
|
||||
srs_human_trace("sent packet: type=%s, time=%d, size=%d, fps=%.2f, b[%d]=%#x(%s)",
|
||||
srs_human_flv_tag_type2string(SRS_RTMP_TYPE_VIDEO), dts, size, fps, nb_start_code, (char)data[nb_start_code],
|
||||
(nut == 7? "SPS":(nut == 8? "PPS":(nut == 5? "I":(nut == 1? "P":(nut == 9? "AUD":(nut == 6? "SEI":"Unknown")))))));
|
||||
|
|
|
@ -40,8 +40,8 @@ int connect_oc(srs_rtmp_t ortmp);
|
|||
#define RE_PULSE_MS 300
|
||||
#define RE_PULSE_JITTER_MS 3000
|
||||
int64_t re_create();
|
||||
void re_update(int64_t re, int32_t starttime, u_int32_t time);
|
||||
void re_cleanup(int64_t re, int32_t starttime, u_int32_t time);
|
||||
void re_update(int64_t re, int32_t starttime, uint32_t time);
|
||||
void re_cleanup(int64_t re, int32_t starttime, uint32_t time);
|
||||
|
||||
int64_t tools_main_entrance_startup_time;
|
||||
int main(int argc, char** argv)
|
||||
|
@ -128,7 +128,7 @@ int main(int argc, char** argv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int do_proxy(srs_flv_t flv, srs_rtmp_t ortmp, int64_t re, int32_t* pstarttime, u_int32_t* ptimestamp)
|
||||
int do_proxy(srs_flv_t flv, srs_rtmp_t ortmp, int64_t re, int32_t* pstarttime, uint32_t* ptimestamp)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -160,7 +160,7 @@ int do_proxy(srs_flv_t flv, srs_rtmp_t ortmp, int64_t re, int32_t* pstarttime, u
|
|||
return ret;
|
||||
}
|
||||
|
||||
u_int32_t timestamp = *ptimestamp;
|
||||
uint32_t timestamp = *ptimestamp;
|
||||
|
||||
if ((ret = srs_human_print_rtmp_packet(type, timestamp, data, size)) != 0) {
|
||||
srs_human_trace("print packet failed. ret=%d", ret);
|
||||
|
@ -185,7 +185,7 @@ int do_proxy(srs_flv_t flv, srs_rtmp_t ortmp, int64_t re, int32_t* pstarttime, u
|
|||
int proxy(srs_flv_t flv, srs_rtmp_t ortmp)
|
||||
{
|
||||
int ret = 0;
|
||||
u_int32_t timestamp = 0;
|
||||
uint32_t timestamp = 0;
|
||||
int32_t starttime = -1;
|
||||
|
||||
char header[13];
|
||||
|
@ -252,7 +252,7 @@ int64_t re_create()
|
|||
|
||||
return re;
|
||||
}
|
||||
void re_update(int64_t re, int32_t starttime, u_int32_t time)
|
||||
void re_update(int64_t re, int32_t starttime, uint32_t time)
|
||||
{
|
||||
// send by pulse algorithm.
|
||||
int64_t now = srs_utils_time_ms();
|
||||
|
@ -261,7 +261,7 @@ void re_update(int64_t re, int32_t starttime, u_int32_t time)
|
|||
usleep((useconds_t)(diff * 1000));
|
||||
}
|
||||
}
|
||||
void re_cleanup(int64_t re, int32_t starttime, u_int32_t time)
|
||||
void re_cleanup(int64_t re, int32_t starttime, uint32_t time)
|
||||
{
|
||||
// for the last pulse, always sleep.
|
||||
// for the virtual live encoder long time publishing.
|
||||
|
|
|
@ -117,8 +117,8 @@ int proxy(srs_rtmp_t irtmp, srs_rtmp_t ortmp)
|
|||
int size;
|
||||
char type;
|
||||
char* data;
|
||||
u_int32_t timestamp;
|
||||
u_int64_t nb_msgs = 0;
|
||||
uint32_t timestamp;
|
||||
uint64_t nb_msgs = 0;
|
||||
|
||||
if ((ret = connect_ic(irtmp)) != 0) {
|
||||
return ret;
|
||||
|
|
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
|||
int size;
|
||||
char type;
|
||||
char* data;
|
||||
u_int32_t timestamp;
|
||||
uint32_t timestamp;
|
||||
|
||||
if (srs_rtmp_read_packet(rtmp, &type, ×tamp, &data, &size) != 0) {
|
||||
goto rtmp_destroy;
|
||||
|
|
|
@ -73,7 +73,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
srs_human_trace("publish stream success");
|
||||
|
||||
u_int32_t timestamp = 0;
|
||||
uint32_t timestamp = 0;
|
||||
for (;;) {
|
||||
char type = SRS_RTMP_TYPE_VIDEO;
|
||||
int size = 4096;
|
||||
|
|
|
@ -275,14 +275,14 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
int64_t nb_packets = 0;
|
||||
u_int32_t pre_timestamp = 0;
|
||||
uint32_t pre_timestamp = 0;
|
||||
int64_t pre_now = -1;
|
||||
int64_t start_time = -1;
|
||||
for (;;) {
|
||||
int size;
|
||||
char type;
|
||||
char* data;
|
||||
u_int32_t timestamp;
|
||||
uint32_t timestamp;
|
||||
|
||||
if (srs_rtmp_read_packet(rtmp, &type, ×tamp, &data, &size) != 0) {
|
||||
srs_human_trace("read rtmp packet failed.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue