UAV::Pilot::Driver::ARDrone::Video
my $cv = AnyEvent->condvar; my $handler = ...; # An object that does UAV::Pilot::Driver::ARDrone::VideoHandler my $ardrone = ...; # An instance of UAV::Pilot::Driver::ARDrone my $video = UAV::Pilot::Driver::ARDrone::Video->new({ handler => $handler, condvar => $cv, driver => $ardrone, }); $video->init_event_loop; $cv->recv;
Processes the Parrot AR.Drone v2 video stream, which is an h264 stream with some additional header data.
Note that this will not work with the AR.Drone v1.
new({ handler => $handler, condvar => $cv, driver => $ardrone, })
Constructor. The handler param is an object that does the role UAV::Pilot::Driver::ARDrone::VideoHandler. Param condvar is an AnyEvent::CondVar. Param driver is an instance of UAV::Pilot::Driver::ARDrone.
handler
UAV::Pilot::Driver::ARDrone::VideoHandler
condvar
driver
UAV::Pilot::Driver::ARDrone
Starts the AnyEvent loop for processing video packets.
The AR.Drone will close the connection when emergency mode is toggled. Calling this will close the stream on our end and reintitlize.
You shouldn't have to call this directly. Pass this object to your UAV::Pilot::Control::ARDrone instance and it will do it for you.
UAV::Pilot::Control::ARDrone
To install UAV::Pilot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UAV::Pilot
CPAN shell
perl -MCPAN -e shell install UAV::Pilot
For more information on module installation, please visit the detailed CPAN module installation guide.