fmk Thu Nov 9 09:24:17 2006 UTC
Modified files:
/php-src/ext/ming config.m4 ming.c
Log:
MFB 5_2:
Revert patch for warnings about missing headers. These are fixed in the
latest version of libming.
Sync code for SWFMovie::streamMP3. This function will now return the number
of frames in the file.
http://cvs.php.net/viewvc.cgi/php-src/ext/ming/config.m4?r1=1.27&r2=1.28&diff_format=u
Index: php-src/ext/ming/config.m4
diff -u php-src/ext/ming/config.m4:1.27 php-src/ext/ming/config.m4:1.28
--- php-src/ext/ming/config.m4:1.27 Fri Nov 3 18:57:36 2006
+++ php-src/ext/ming/config.m4 Thu Nov 9 09:24:17 2006
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.27 2006/11/03 18:57:36 helly Exp $
+dnl $Id: config.m4,v 1.28 2006/11/09 09:24:17 fmk Exp $
dnl
PHP_ARG_WITH(ming, for MING support,
@@ -84,9 +84,6 @@
], [])
CPPFLAGS=$old_CPPFLAGS
- AC_CHECK_HEADERS([ming/displaylist.h])
- AC_CHECK_HEADERS([ming/movie.h])
-
PHP_NEW_EXTENSION(ming, ming.c, $ext_shared)
PHP_SUBST(MING_SHARED_LIBADD)
fi
http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.88&r2=1.89&diff_format=u
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.88 php-src/ext/ming/ming.c:1.89
--- php-src/ext/ming/ming.c:1.88 Fri Nov 3 18:57:36 2006
+++ php-src/ext/ming/ming.c Thu Nov 9 09:24:17 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ming.c,v 1.88 2006/11/03 18:57:36 helly Exp $ */
+/* $Id: ming.c,v 1.89 2006/11/09 09:24:17 fmk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -36,12 +36,6 @@
#include <stdio.h>
#include <math.h>
#include <ming.h>
-#ifdef HAVE_MING_DISPLAYLIST_H
-# include <ming/displaylist.h>
-#endif
-#ifdef HAVE_MING_MOVIE_H
-# include <ming/movie.h>
-#endif
#define FLOAT_Z_DVAL_PP(x) ((float)Z_DVAL_PP(x))
#define BYTE_Z_LVAL_PP(x) ((byte)Z_LVAL_PP(x))
@@ -2480,17 +2474,31 @@
/* }}} */
#ifdef HAVE_NEW_MING
-/* {{{ proto void swfmovie::streamMP3(mixed file)
- Sets sound stream of the SWF movie. The parameter can be stream or string.
*/
+/* {{{ proto int swfmovie::streamMP3(mixed file [, float skip])
+ Sets sound stream of the SWF movie. The parameter can be stream or string.
Retuens the number of frames. */
PHP_METHOD(swfmovie, streamMP3)
{
- zval **zfile;
+ zval **zfile, **zskip;
+ float skip;
SWFSoundStream sound;
SWFInput input;
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfile) ==
FAILURE) {
- WRONG_PARAM_COUNT;
+ switch (ZEND_NUM_ARGS()) {
+ case 1:
+ if(zend_get_parameters_ex(1, &zfile) == FAILURE)
+ WRONG_PARAM_COUNT;
+ skip = 0;
+ break;
+ case 2:
+ if(zend_get_parameters_ex(2, &zfile, &zskip) == FAILURE)
+ WRONG_PARAM_COUNT;
+ convert_to_double_ex(zskip);
+ skip = Z_DVAL_PP(zskip);
+ break;
+ default:
+ WRONG_PARAM_COUNT;
+ break;
}
if (Z_TYPE_PP(zfile) != IS_RESOURCE) {
@@ -2502,7 +2510,8 @@
}
sound = newSWFSoundStream_fromInput(input);
- SWFMovie_setSoundStream(movie, sound);
+ SWFMovie_setSoundStreamAt(movie, sound, skip);
+ RETURN_LONG(SWFSoundStream_getFrames(sound));
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php