libobs: Add profiler section for send_packet

This makes it a bit more clear when muxing takes longer than expected
instead of attributing the time to the do_encode.
master
Kurt Kartaltepe 2021-03-28 20:16:46 -07:00 committed by Jim
parent 1a16185977
commit b47e4858b8
1 changed files with 3 additions and 0 deletions

View File

@ -882,15 +882,18 @@ static void send_first_video_packet(struct obs_encoder *encoder,
da_free(data); da_free(data);
} }
static const char *send_packet_name = "send_packet";
static inline void send_packet(struct obs_encoder *encoder, static inline void send_packet(struct obs_encoder *encoder,
struct encoder_callback *cb, struct encoder_callback *cb,
struct encoder_packet *packet) struct encoder_packet *packet)
{ {
profile_start(send_packet_name);
/* include SEI in first video packet */ /* include SEI in first video packet */
if (encoder->info.type == OBS_ENCODER_VIDEO && !cb->sent_first_packet) if (encoder->info.type == OBS_ENCODER_VIDEO && !cb->sent_first_packet)
send_first_video_packet(encoder, cb, packet); send_first_video_packet(encoder, cb, packet);
else else
cb->new_packet(cb->param, packet); cb->new_packet(cb->param, packet);
profile_end(send_packet_name);
} }
void full_stop(struct obs_encoder *encoder) void full_stop(struct obs_encoder *encoder)