mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
feb7eca9a5
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
36 lines
602 B
C
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");
|
|
}
|