static int sami_probe(AVProbeData *p) { char buf[6]; FFTextReader tr; ff_text_init_buf(&tr, p->buf, p->buf_size); ff_text_read(&tr, buf, sizeof(buf)); return !strncmp(buf, "<SAMI>", 6) ? AVPROBE_SCORE_MAX : 0; }
static int realtext_probe(AVProbeData *p) { char buf[7]; FFTextReader tr; ff_text_init_buf(&tr, p->buf, p->buf_size); ff_text_read(&tr, buf, sizeof(buf)); return !av_strncasecmp(buf, "<window", 7) ? AVPROBE_SCORE_EXTENSION : 0; }
static int ass_probe(AVProbeData *p) { char buf[13]; FFTextReader tr; ff_text_init_buf(&tr, p->buf, p->buf_size); ff_text_read(&tr, buf, sizeof(buf)); if (!memcmp(buf, "[Script Info]", 13)) return AVPROBE_SCORE_MAX; return 0; }
static int scc_probe(const AVProbeData *p) { char buf[18]; FFTextReader tr; ff_text_init_buf(&tr, p->buf, p->buf_size); while (ff_text_peek_r8(&tr) == '\r' || ff_text_peek_r8(&tr) == '\n') ff_text_r8(&tr); ff_text_read(&tr, buf, sizeof(buf)); if (!memcmp(buf, "Scenarist_SCC V1.0", 18)) return AVPROBE_SCORE_MAX; return 0; }