Esempio n. 1
0
static int probe_file(const char *filename)
{
    InputFile ifile;
    int ret, i;

    ret = open_input_file(&ifile, filename);
    if (ret < 0)
        return ret;

    if (do_show_format)
        show_format(&ifile);

    if (do_show_streams) {
        probe_array_header("streams", 0);
        for (i = 0; i < ifile.nb_streams; i++)
            show_stream(&ifile, &ifile.streams[i]);
        probe_array_footer("streams", 0);
    }

    if (do_show_packets)
        show_packets(&ifile);

    close_input_file(&ifile);
    return 0;
}
Esempio n. 2
0
static int probe_file(const char *filename)
{
    AVFormatContext *fmt_ctx;
    int ret, i;

    if ((ret = open_input_file(&fmt_ctx, filename)))
        return ret;

    if (do_show_streams)
        for (i = 0; i < fmt_ctx->nb_streams; i++)
            show_stream(fmt_ctx, i);

    if (do_show_format)
        show_format(fmt_ctx);

    av_close_input_file(fmt_ctx);
    return 0;
}
Esempio n. 3
0
static int probe_file(const char *filename)
{
    AVFormatContext *fmt_ctx;
    int ret, i;

    if ((ret = open_input_file(&fmt_ctx, filename)))
        return ret;

    if (do_show_format)
        show_format(fmt_ctx);

    if (do_show_streams) {
        probe_array_header("streams", 0);
        for (i = 0; i < fmt_ctx->nb_streams; i++)
            show_stream(fmt_ctx, i);
        probe_array_footer("streams", 0);
    }

    if (do_show_packets)
        show_packets(fmt_ctx);

    close_input_file(&fmt_ctx);
    return 0;
}