[FFmpeg-soc] [soc]: r2490 - libavfilter/diffs/03_ffplay_filters.diff
vitor
subversion at mplayerhq.hu
Thu Jun 19 21:03:58 CEST 2008
Author: vitor
Date: Thu Jun 19 21:03:58 2008
New Revision: 2490
Log:
Update ffplay patch to match the latest changes to the graph parser
Modified:
libavfilter/diffs/03_ffplay_filters.diff
Modified: libavfilter/diffs/03_ffplay_filters.diff
==============================================================================
--- libavfilter/diffs/03_ffplay_filters.diff (original)
+++ libavfilter/diffs/03_ffplay_filters.diff Thu Jun 19 21:03:58 2008
@@ -1,19 +1,19 @@
---- ffplay.c.old 2008-04-22 17:33:42.000000000 +0200
-+++ ffplay.c 2008-04-23 22:39:04.000000000 +0200
+--- ffplay.c.old 2008-06-19 20:58:45.000000000 +0200
++++ ffplay.c 2008-06-19 21:02:50.000000000 +0200
@@ -27,6 +27,12 @@
- #include "swscale.h"
- #include "avstring.h"
+ #include "libavdevice/avdevice.h"
+ #include "libswscale/swscale.h"
+#if ENABLE_AVFILTER
-+# include "avfilter.h"
-+# include "avfiltergraph.h"
-+# include "graphparser.h"
++# include "libavfilter/avfilter.h"
++# include "libavfilter/avfiltergraph.h"
++# include "libavfilter/graphparser.h"
+#endif
+
- #include "version.h"
#include "cmdutils.h"
-@@ -66,7 +72,9 @@
+ #include <SDL.h>
+@@ -65,7 +71,9 @@
/* NOTE: the size must be big enough to compensate the hardware audio buffersize size */
#define SAMPLE_ARRAY_SIZE (2*65536)
@@ -23,7 +23,7 @@
typedef struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
-@@ -86,6 +94,10 @@
+@@ -85,6 +93,10 @@
int width, height; /* source height & width */
enum PixelFormat pix_fmt;
int allocated;
@@ -34,7 +34,7 @@
} VideoPicture;
typedef struct SubPicture {
-@@ -168,6 +180,10 @@
+@@ -167,6 +179,10 @@
// QETimer *video_timer;
char filename[1024];
int width, height, xleft, ytop;
@@ -44,8 +44,8 @@
+#endif
} VideoState;
- void show_help(void);
-@@ -207,6 +223,9 @@
+ static void show_help(void);
+@@ -206,6 +222,9 @@
static int error_resilience = FF_ER_CAREFUL;
static int error_concealment = 3;
static int decoder_reorder_pts= 0;
@@ -55,7 +55,7 @@
/* current context */
static int is_full_screen;
-@@ -653,14 +672,22 @@
+@@ -652,14 +671,22 @@
vp = &is->pictq[is->pictq_rindex];
if (vp->bmp) {
@@ -80,7 +80,7 @@
/* if an active format is indicated, then it overrides the
mpeg format */
#if 0
-@@ -863,9 +890,15 @@
+@@ -862,9 +889,15 @@
} else if(!is_full_screen && screen_width){
w = screen_width;
h = screen_height;
@@ -96,7 +96,7 @@
} else {
w = 640;
h = 480;
-@@ -1171,9 +1204,19 @@
+@@ -1170,9 +1203,19 @@
if (vp->bmp)
SDL_FreeYUVOverlay(vp->bmp);
@@ -116,7 +116,7 @@
#if 0
/* XXX: use generic function */
-@@ -1211,8 +1254,11 @@
+@@ -1210,8 +1253,11 @@
VideoPicture *vp;
int dst_pix_fmt;
AVPicture pict;
@@ -129,7 +129,7 @@
/* wait until we have space to put a new picture */
SDL_LockMutex(is->pictq_mutex);
while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE &&
-@@ -1228,8 +1274,13 @@
+@@ -1227,8 +1273,13 @@
/* alloc or resize hardware picture buffer */
if (!vp->bmp ||
@@ -143,7 +143,7 @@
SDL_Event event;
vp->allocated = 0;
-@@ -1253,6 +1304,12 @@
+@@ -1252,6 +1303,12 @@
/* if the frame is not skipped, then display it */
if (vp->bmp) {
@@ -156,7 +156,7 @@
/* get a pointer on the bitmap */
SDL_LockYUVOverlay (vp->bmp);
-@@ -1264,6 +1321,19 @@
+@@ -1263,6 +1320,19 @@
pict.linesize[0] = vp->bmp->pitches[0];
pict.linesize[1] = vp->bmp->pitches[2];
pict.linesize[2] = vp->bmp->pitches[1];
@@ -176,7 +176,7 @@
img_convert_ctx = sws_getCachedContext(img_convert_ctx,
vp->width, vp->height, vp->pix_fmt, vp->width, vp->height,
dst_pix_fmt, sws_flags, NULL, NULL, NULL);
-@@ -1273,6 +1343,7 @@
+@@ -1272,6 +1342,7 @@
}
sws_scale(img_convert_ctx, src_frame->data, src_frame->linesize,
0, vp->height, pict.data, pict.linesize);
@@ -184,7 +184,7 @@
/* update the bitmap content */
SDL_UnlockYUVOverlay(vp->bmp);
-@@ -1382,6 +1453,138 @@
+@@ -1381,6 +1452,138 @@
return 0;
}
@@ -323,7 +323,7 @@
static int video_thread(void *arg)
{
VideoState *is = arg;
-@@ -1390,10 +1593,55 @@
+@@ -1389,10 +1592,55 @@
double pts;
int ret;
@@ -342,20 +342,20 @@
+
+
+ if(vfilters) {
-+ AVFilterInOut *inouts = av_malloc(sizeof(AVFilterInOut));
-+ inouts->name = "in";
-+ inouts->filter = filt_src;
-+ inouts->type = LinkTypeOut;
-+ inouts->pad_idx = 0;
-+ inouts->next = av_malloc(sizeof(AVFilterInOut));
++ AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut));
++ AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut));
+
-+ inouts->next->name = "out";
-+ inouts->next->filter = filt_out;
-+ inouts->next->type = LinkTypeIn;
-+ inouts->next->pad_idx = 0;
-+ inouts->next->next = NULL;
++ outputs->name = av_strdup("in");
++ outputs->filter = filt_src;
++ outputs->pad_idx = 0;
++ outputs->next = NULL;
+
-+ if (avfilter_parse_graph(graph, vfilters, inouts, NULL) < 0)
++ inputs->name = av_strdup("out");
++ inputs->filter = filt_out;
++ inputs->pad_idx = 0;
++ inputs->next = NULL;
++
++ if (avfilter_parse_graph(graph, vfilters, inputs, outputs, NULL) < 0)
+ goto the_end;
+ } else {
+ if(avfilter_link(filt_src, 0, filt_out, 0) < 0) goto the_end;
@@ -379,7 +379,7 @@
if (ret < 0) goto the_end;
-@@ -1410,6 +1658,9 @@
+@@ -1409,6 +1657,9 @@
stream_pause(cur_stream);
}
the_end:
@@ -389,7 +389,7 @@
av_free(frame);
return 0;
}
-@@ -2149,6 +2400,12 @@
+@@ -2148,6 +2399,12 @@
/* free all pictures */
for(i=0;i<VIDEO_PICTURE_QUEUE_SIZE; i++) {
vp = &is->pictq[i];
@@ -402,10 +402,10 @@
if (vp->bmp) {
SDL_FreeYUVOverlay(vp->bmp);
vp->bmp = NULL;
-@@ -2486,6 +2743,9 @@
+@@ -2484,6 +2741,9 @@
{ "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options", "bit_mask" },
{ "sync", HAS_ARG | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" },
- { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
+ { "threads", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
+#if ENABLE_AVFILTER
+ { "vfilters", OPT_STRING | HAS_ARG, {(void*)&vfilters}, "video filters", "filter list" },
+#endif
More information about the FFmpeg-soc
mailing list