From: Frank M. Kromann Date: Thu, 24 Jul 2008 08:22:48 +0000 (+0000) Subject: Add a couple of methods to SWFVideoStream X-Git-Tag: php-5.3.0alpha1~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=008a1fd8c2bb2a9c5d5b9909030a5a473bca35b2;p=php Add a couple of methods to SWFVideoStream --- diff --git a/ext/ming/ming.c b/ext/ming/ming.c index 685fbe787f..def3e76b59 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -3519,6 +3519,48 @@ PHP_METHOD(swfvideostream, hasaudio) } /* }}} */ +/* {{{ proto swfvideostream::nextFrame */ +PHP_METHOD(swfvideostream, nextFrame) +{ + if (ZEND_NUM_ARGS() != 0) { + WRONG_PARAM_COUNT; + } + + RETURN_LONG(SWFVideoStream_nextFrame(getVideoStream(getThis() TSRMLS_CC))); +} +/* }}} */ + +/* {{{ proto swfvideostream::setFrameMode */ +PHP_METHOD(swfvideostream, setFrameMode) +{ + long mode; + SWFVideoStream stream = getVideoStream(getThis() TSRMLS_CC); + if(!stream) + php_error(E_ERROR, "getVideoStream returned NULL"); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &mode) == FAILURE) { + return; + } + + RETURN_LONG(SWFVideoStream_setFrameMode(stream, mode)); +} +/* }}} */ + +/* {{{ proto swfvideostream::seek(frame, whence) */ +PHP_METHOD(swfvideostream, seek) +{ + long frame, whence; + SWFVideoStream stream = getVideoStream(getThis() TSRMLS_CC); + if(!stream) + php_error(E_ERROR, "getVideoStream returned NULL"); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &frame, &whence) == FAILURE) { + return; + } + + RETURN_LONG(SWFVideoStream_seek(stream, frame, whence)); +} +/* }}} */ static zend_function_entry swfvideostream_functions[] = { @@ -3526,6 +3568,9 @@ static zend_function_entry swfvideostream_functions[] = { PHP_ME(swfvideostream, setdimension, NULL, 0) PHP_ME(swfvideostream, getnumframes, NULL, 0) PHP_ME(swfvideostream, hasaudio, NULL, 0) + PHP_ME(swfvideostream, setFrameMode, NULL, 0) + PHP_ME(swfvideostream, nextFrame, NULL, 0) + PHP_ME(swfvideostream, seek, NULL, 0) { NULL, NULL, NULL } };