#pragma once #include #include "../server/common.h" #include "../codec/codec.h" #define LIANA_TIMESTAMP_INVALID ((u64)-1) #define LIANA_BASE_DELAY ((u64)1600000) // 1600ms #define LIANA_BASE_PING ((u64)600000) // 600ms #define LIANA_PAUSE_DELAY LIANA_BASE_PING static inline void disown_packet(struct nn_packet *packet) { #ifdef CAMU_DIRECT_MODE if (packet->opaque) { switch (nn_packet_get_u8(packet, NNWT_PACKET_HEADER_LENGTH + 5)) { case CAMU_NORMAL: break; #ifdef CAMU_HAVE_FFMPEG case CAMU_FFMPEG_COMPAT: { AVPacket *pkt = (AVPacket *)packet->opaque; av_packet_free_side_data(pkt); av_packet_free(&pkt); break; } #endif } packet->opaque = NULL; } #else (void)packet; #endif }