[ create a new paste ] login | about

Link: http://codepad.org/lJ0hJjLY    [ raw code | fork ]

C, pasted on Apr 22:
#define _XOPEN_SOURCE 600

#include "config.h"
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <limits.h>
#include <unistd.h>
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavcodec/opt.h"
#include "libavcodec/audioconvert.h"
#include "libavcodec/colorspace.h"
#include "libavutil/fifo.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
#include "libavformat/os_support.h"

#if HAVE_SYS_RESOURCE_H
#include <sys/types.h>
#include <sys/resource.h>
#elif HAVE_GETPROCESSTIMES
#include <windows.h>
#endif

#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif

#if HAVE_TERMIOS_H
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
#elif HAVE_CONIO_H
#include <conio.h>
#endif
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
#include <time.h>

#include "cmdutils.h"

#undef NDEBUG
#include <assert.h>
#if CONFIG_NETWORK
#include "libavformat/network.h"
#endif
#undef exit


AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
AVFormatContext *avformat_opts;

const char program_name[] = "FFmpeg";
const int program_birth_year = 2000;

static int nb_input_files = 0;
static int nb_output_files = 0;

int main(int argc, char **argv)
{
    int i;
    avcodec_register_all();
    av_register_all();

    for(i=0; i<CODEC_TYPE_NB; i++){
        avcodec_opts[i]= avcodec_alloc_context2(i);
    }
    avformat_opts = avformat_alloc_context();


    if (nb_output_files <= 0) {
        fprintf(stderr, "At least one output file must be specified\n");
    }

    if (nb_input_files == 0) {
        fprintf(stderr, "At least one input file must be specified\n");
    }

   return 0;
}


Create a new paste based on this one


Comments: