UAV::Pilot::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({ handlers => [ $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({ handlers => [ $handler ], condvar => $cv, driver => $ardrone, })
Constructor. The handlers param is an array of objects that do the role UAV::Pilot::Driver::ARDrone::VideoHandler. Param condvar is an AnyEvent::CondVar. Param driver is an instance of UAV::Pilot::Driver::ARDrone.
handlers
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
add_handler( $handler );
Adds a UAV::Pilot::Video::H264Handler object to the list of handlers.
UAV::Pilot::Video::H264Handler
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.