MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / get_packet_send_clock

Function get_packet_send_clock

ffserver.c:2213–2225  ·  view source on GitHub ↗

return the estimated time at which the current packet must be sent (in us) */

Source from the content-addressed store, hash-verified

2211/* return the estimated time at which the current packet must be sent
2212 (in us) */
2213static int64_t get_packet_send_clock(HTTPContext *c)
2214{
2215 int bytes_left, bytes_sent, frame_bytes;
2216
2217 frame_bytes = c->cur_frame_bytes;
2218 if (frame_bytes <= 0)
2219 return c->cur_pts;
2220 else {
2221 bytes_left = c->buffer_end - c->buffer_ptr;
2222 bytes_sent = frame_bytes - bytes_left;
2223 return c->cur_pts + (c->cur_frame_duration * bytes_sent) / frame_bytes;
2224 }
2225}
2226
2227
2228static int http_prepare_data(HTTPContext *c)

Callers 1

http_send_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected