gstreamer/ext/mpeg2dec/perftest.c
David Schleef feb7eca9a5 Make sure everybody wraps #include "config.h" in #ifdef HAVE_CONFIG_H
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c:
* ext/ffmpeg/gstffmpegcodecmap.c:
* ext/ffmpeg/gstffmpegdec.c:
* ext/ffmpeg/gstffmpegenc.c:
* ext/ffmpeg/gstffmpegprotocol.c:
* ext/gdk_pixbuf/gstgdkanimation.c:
* ext/jpeg/gstjpeg.c:
* ext/libpng/gstpng.c:
* ext/mpeg2dec/perftest.c:
* ext/speex/gstspeex.c:
* gst-libs/gst/resample/dtos.c:
* gst/intfloat/gstintfloatconvert.c:
* gst/oneton/gstoneton.c:
* gst/rtjpeg/RTjpeg.c:
* gst/rtp/gstrtp.c:
* sys/dxr3/dxr3init.c:
* sys/glsink/gstgl_nvimage.c:
* sys/glsink/gstgl_pdrimage.c:
* sys/glsink/gstglsink.c:
* testsuite/gst-lint:
Make sure everybody wraps #include "config.h" in #ifdef HAVE_CONFIG_H
2004-01-12 04:15:46 +00:00

36 lines
602 B
C

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gst/gst.h>
#include <unistd.h>
#include <fcntl.h>
#include <inttypes.h>
#include "output_video.h"
#include "gstmpeg2dec.h"
void new_frame (char *buf, void *data, uint64_t timestamp)
{
g_print(".");
}
int
main (int argc, char *argv[])
{
int fd, count = 20000;
mpeg2dec_t *decoder;
char buffer[2048];
fd = open (argv[1], O_RDONLY);
gst_init (&argc, &argv);
mpeg2_init (decoder, new_frame, NULL);
while (read (fd, buffer, 2048) && count--) {
mpeg2_decode_data(decoder, buffer, buffer + 2048);
}
g_print("\n");
}