Skip to content

Commit 008a1fd

Browse files
committed
Add a couple of methods to SWFVideoStream
1 parent 6b4b6b8 commit 008a1fd

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

ext/ming/ming.c

+45
Original file line numberDiff line numberDiff line change
@@ -3519,13 +3519,58 @@ PHP_METHOD(swfvideostream, hasaudio)
35193519
}
35203520
/* }}} */
35213521

3522+
/* {{{ proto swfvideostream::nextFrame */
3523+
PHP_METHOD(swfvideostream, nextFrame)
3524+
{
3525+
if (ZEND_NUM_ARGS() != 0) {
3526+
WRONG_PARAM_COUNT;
3527+
}
3528+
3529+
RETURN_LONG(SWFVideoStream_nextFrame(getVideoStream(getThis() TSRMLS_CC)));
3530+
}
3531+
/* }}} */
3532+
3533+
/* {{{ proto swfvideostream::setFrameMode */
3534+
PHP_METHOD(swfvideostream, setFrameMode)
3535+
{
3536+
long mode;
3537+
SWFVideoStream stream = getVideoStream(getThis() TSRMLS_CC);
3538+
if(!stream)
3539+
php_error(E_ERROR, "getVideoStream returned NULL");
3540+
3541+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &mode) == FAILURE) {
3542+
return;
3543+
}
3544+
3545+
RETURN_LONG(SWFVideoStream_setFrameMode(stream, mode));
3546+
}
3547+
/* }}} */
3548+
3549+
/* {{{ proto swfvideostream::seek(frame, whence) */
3550+
PHP_METHOD(swfvideostream, seek)
3551+
{
3552+
long frame, whence;
3553+
SWFVideoStream stream = getVideoStream(getThis() TSRMLS_CC);
3554+
if(!stream)
3555+
php_error(E_ERROR, "getVideoStream returned NULL");
3556+
3557+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &frame, &whence) == FAILURE) {
3558+
return;
3559+
}
3560+
3561+
RETURN_LONG(SWFVideoStream_seek(stream, frame, whence));
3562+
}
3563+
/* }}} */
35223564

35233565

35243566
static zend_function_entry swfvideostream_functions[] = {
35253567
PHP_ME(swfvideostream, __construct, NULL, 0)
35263568
PHP_ME(swfvideostream, setdimension, NULL, 0)
35273569
PHP_ME(swfvideostream, getnumframes, NULL, 0)
35283570
PHP_ME(swfvideostream, hasaudio, NULL, 0)
3571+
PHP_ME(swfvideostream, setFrameMode, NULL, 0)
3572+
PHP_ME(swfvideostream, nextFrame, NULL, 0)
3573+
PHP_ME(swfvideostream, seek, NULL, 0)
35293574
{ NULL, NULL, NULL }
35303575
};
35313576

0 commit comments

Comments
 (0)