[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/media/square.flv test...
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/media/square.flv test... |
Date: |
Mon, 14 May 2007 13:17:33 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/05/14 13:17:33
Modified files:
. : ChangeLog
Added files:
testsuite/media: square.flv
testsuite/misc-ming.all: NetStream-Square.c Video-EmbedSquare.c
Log message:
* testsuite/media/square.flv: Added. Used for testing.
* testsuite/misc-ming.all/NetStream-Square.c: Added. Created
simple
SWF which plays square.flv using NetStream.
* testsuite/misc-ming.all/Video-EmbedSquare.c: Added. Created
simple
SWF which plays an embedded video (ripped from square.flv).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3194&r2=1.3195
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/media/square.flv?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/NetStream-Square.c?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Video-EmbedSquare.c?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3194
retrieving revision 1.3195
diff -u -b -r1.3194 -r1.3195
--- ChangeLog 14 May 2007 13:05:59 -0000 1.3194
+++ ChangeLog 14 May 2007 13:17:32 -0000 1.3195
@@ -16,6 +16,11 @@
2007-05-14 Tomas Groth Christensen <address@hidden>
* libbase/FLVParser.cpp: Fixed a out-of-bound error (bug #19866).
+ * testsuite/media/square.flv: Added. Used for testing.
+ * testsuite/misc-ming.all/NetStream-Square.c: Added. Created simple
+ SWF which plays square.flv using NetStream.
+ * testsuite/misc-ming.all/Video-EmbedSquare.c: Added. Created simple
+ SWF which plays an embedded video (ripped from square.flv).
2007-05-14 Sandro Santilli <address@hidden>
Index: testsuite/media/square.flv
===================================================================
RCS file: testsuite/media/square.flv
diff -N testsuite/media/square.flv
Binary files /dev/null and /tmp/cvsbVLBuv differ
Index: testsuite/misc-ming.all/NetStream-Square.c
===================================================================
RCS file: testsuite/misc-ming.all/NetStream-Square.c
diff -N testsuite/misc-ming.all/NetStream-Square.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/NetStream-Square.c 14 May 2007 13:17:33 -0000
1.1
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/*
+ * Plays an external FLV video
+ * Should be used with the MovieTester to test if the video decoder works.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 7
+#define OUTPUT_FILENAME "NetStream-ExtSquare.swf"
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+
+ Ming_init();
+ Ming_useSWFVersion (OUTPUT_VERSION);
+
+ SWFVideoStream stream;
+ SWFDisplayItem item;
+ SWFAction a;
+ char* buffer=
+ "nc=new NetConnection();"
+ "nc.connect(null);"
+ "_global.stream = new NetStream(nc);"
+ "video.attachVideo(_global.stream); "
+ "_global.stream.setBufferTime(2); "
+ "_global.stream.play(\"../media/square.flv\");";
+
+ int video_width = 128;
+ int video_height = 96;
+
+ mo = newSWFMovie();
+ SWFMovie_setDimension(mo, 128, 96);
+
+ SWFMovie_setRate(mo, 15);
+
+ stream = newSWFVideoStream();
+ SWFVideoStream_setDimension(stream, video_width, video_height);
+ item = SWFMovie_add(mo, (SWFBlock)stream);
+// SWFDisplayItem_moveTo(item, (400 - video_width / 2), 0);
+ SWFDisplayItem_setName(item, "video");
+
+ a = newSWFAction(buffer);
+
+ if(a == NULL) return -1;
+ SWFMovie_add(mo, (SWFBlock)a);
+
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
Index: testsuite/misc-ming.all/Video-EmbedSquare.c
===================================================================
RCS file: testsuite/misc-ming.all/Video-EmbedSquare.c
diff -N testsuite/misc-ming.all/Video-EmbedSquare.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/Video-EmbedSquare.c 14 May 2007 13:17:33 -0000
1.1
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/*
+ * Plays video stored internal in the SWF.
+ * Should be used with the MovieTester to test if the video decoder works.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 7
+#define OUTPUT_FILENAME "Video-EmbedSquare.swf"
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+
+ Ming_init();
+ Ming_useSWFVersion (OUTPUT_VERSION);
+
+ int frames;
+ SWFVideoStream stream;
+ SWFDisplayItem item;
+ FILE *flv;
+
+ flv = fopen("../media/square.flv", "rb");
+ if (flv == NULL) return -1;
+
+ mo = newSWFMovie();
+ SWFMovie_setDimension(mo, 128, 96);
+
+ if (mo == NULL) return -1;
+
+ SWFMovie_setRate(mo, 5);
+
+ stream = newSWFVideoStream_fromFile(flv);
+ item = SWFMovie_add(mo, (SWFBlock)stream);
+
+ // TODO: dynamic frame rate adjust
+ frames = SWFVideoStream_getNumFrames(stream);
+ for(; frames > 0; frames--)
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog testsuite/media/square.flv test...,
Tomas Groth <=