Timm Murray > UAV-Pilot-0.4 > UAV::Pilot::Driver::ARDrone::Video

Download:
UAV-Pilot-0.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source   Latest Release: UAV-Pilot-0.5

NAME ^

  UAV::Pilot::Driver::ARDrone::Video

SYNOPSIS ^

    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;

DESCRIPTION ^

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.

METHODS ^

new

    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.

init_event_loop

Starts the AnyEvent loop for processing video packets.

emergency_restart

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.

syntax highlighting: