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

Function segment_list_print_entry

libavformat/segment.c:321–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321static void segment_list_print_entry(AVIOContext *list_ioctx,
322 ListType list_type,
323 const SegmentListEntry *list_entry,
324 void *log_ctx)
325{
326 switch (list_type) {
327 case LIST_TYPE_FLAT:
328 avio_printf(list_ioctx, "%s\n", list_entry->filename);
329 break;
330 case LIST_TYPE_CSV:
331 case LIST_TYPE_EXT:
332 print_csv_escaped_str(list_ioctx, list_entry->filename);
333 avio_printf(list_ioctx, ",%f,%f\n", list_entry->start_time, list_entry->end_time);
334 break;
335 case LIST_TYPE_M3U8:
336 avio_printf(list_ioctx, "#EXTINF:%f,\n%s\n",
337 list_entry->end_time - list_entry->start_time, list_entry->filename);
338 break;
339 case LIST_TYPE_FFCONCAT:
340 {
341 char *buf;
342 if (av_escape(&buf, list_entry->filename, NULL, AV_ESCAPE_MODE_AUTO, AV_ESCAPE_FLAG_WHITESPACE) < 0) {
343 av_log(log_ctx, AV_LOG_WARNING,
344 "Error writing list entry '%s' in list file\n", list_entry->filename);
345 return;
346 }
347 avio_printf(list_ioctx, "file %s\n", buf);
348 av_free(buf);
349 break;
350 }
351 default:
352 av_assert0(!"Invalid list type");
353 }
354}
355
356static int segment_end(AVFormatContext *s, int write_trailer, int is_last)
357{

Callers 1

segment_endFunction · 0.85

Calls 5

avio_printfFunction · 0.85
print_csv_escaped_strFunction · 0.85
av_escapeFunction · 0.85
av_logFunction · 0.85
av_freeFunction · 0.50

Tested by

no test coverage detected