feat: update param name

This commit is contained in:
tqcq 2024-10-15 18:12:14 +08:00
parent 72aed9a96e
commit 7274e189be
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ struct sec_set_info {
EXTERN_C API_EXPORT void name##_release(void *Handle); \
EXTERN_C API_EXPORT int name##_in(void *Handle, const void *buf, const uint32_t len, void *param); \
EXTERN_C API_EXPORT int name##_out( \
void *Handle, void *buf, uint32_t *len, uint16_t *sei_end_offset, uint16_t *append_length, void **param);
void *Handle, void *buf, uint32_t *len, uint16_t *split_pos, uint16_t *append_length, void **param);
AW_API_DECLARE(HK_udp)
AW_API_DECLARE(HK_tcp)

View File

@ -42,7 +42,7 @@ HK_udp_release(void *Handle)
}
int
HK_udp_out(void *Handle, void *buf, uint32_t *len, uint16_t *sei_end_offset, uint16_t *append_length, void **param)
HK_udp_out(void *Handle, void *buf, uint32_t *len, uint16_t *split_pos, uint16_t *append_length, void **param)
{
sign::FrameManager *fm = (sign::FrameManager *) Handle;
auto frame = fm->Dequeue();
@ -53,7 +53,7 @@ HK_udp_out(void *Handle, void *buf, uint32_t *len, uint16_t *sei_end_offset, uin
*len = frame->size();
if (buf) { std::copy(frame->data(), frame->data() + frame->size(), data); }
if (sei_end_offset) { *sei_end_offset = frame->sei_end_offset(); }
if (split_pos) { *split_pos = frame->sei_end_offset(); }
if (append_length) { *append_length = frame->append_length(); }
if (param) { *param = frame->user_data(); }
@ -86,7 +86,7 @@ HK_tcp_in(void *Handle, const void *buf, const uint32_t len, void *param)
}
int
HK_tcp_out(void *Handle, void *buf, uint32_t *len, uint16_t *sei_end_offset, uint16_t *append_length, void **param)
HK_tcp_out(void *Handle, void *buf, uint32_t *len, uint16_t *split_pos, uint16_t *append_length, void **param)
{
sign::FrameManager *fm = (sign::FrameManager *) Handle;
auto frame = fm->Dequeue();
@ -105,7 +105,7 @@ HK_tcp_out(void *Handle, void *buf, uint32_t *len, uint16_t *sei_end_offset, uin
}
if (buf) { std::copy(frame->new_data(), frame->new_data() + frame->new_size(), data); }
if (sei_end_offset) { *sei_end_offset = frame->sei_end_offset(); }
if (split_pos) { *split_pos = frame->sei_end_offset(); }
if (append_length) { *append_length = frame->append_length(); }
if (param) { *param = frame->user_data(); }
INFOL("HK_tcp_out, pop a frame. old_len=%lu, new_len=%lu, sei_end_offset: %ld, append_length: %ld\n", frame->size(),