You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
<?php
|
|
|
|
//require 'class.ponvif.php';
|
|
require 'toto.php';
|
|
//$onvif = new Ponvif();
|
|
//$result = $onvif->discover();
|
|
//var_dump($result);
|
|
//exit();
|
|
$test=new ponvif();
|
|
//$test->setUsername('gagua');
|
|
$test->setUsername('admin');
|
|
$test->setPassword('4GetMyID');//109
|
|
//$test->setIPAddress('192.168.0.109');
|
|
$test->setIPAddress('192.168.200.106');
|
|
try {
|
|
$test->initialize();
|
|
|
|
if ( $test->isFault($sources=$test->getSources())) die("Error getting sources");
|
|
//print_r( $sources );
|
|
$profileToken=$sources[0][0]['profiletoken'];
|
|
$ptzNodeToken=$sources[0][0]['ptz']['nodetoken'];
|
|
//echo "Media: " . $test->media_GetStreamUri($profileToken) . "\n\n";
|
|
//echo "Snapshot: " . $test->media_GetSnapshotUri('Profile_2') . "\n\n";
|
|
//$PAPA = $test->media_GetVideoSources();
|
|
//$test->ptz_AbsoluteMove($profileToken, -1, -1, 0);
|
|
//$PAPA = $test->ptz_GetStatus($profileToken);
|
|
$test->ptz_ContinuousMove( $profileToken, -0.2, 0 );
|
|
//var_dump( $PAPA );
|
|
|
|
} catch (Exception $e) {
|
|
echo 'Caught exception: ', $e->getMessage(), "\n";
|
|
}
|
|
?>
|