Timm Murray > UAV-Pilot-0.8 > UAV::Pilot::Video::H264Decoder

Download:
UAV-Pilot-0.8.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source  

NAME ^

    UAV::Pilot::Video::H264Decoder

SYNOPSIS ^

    # $display is some object that does the role UAV::Pilot::Video::RawHandler, like 
    # UAV::Pilot::SDL::Video
    my $display = ...;

    my $decoder = UAV::Pilot::Video::H264Decoder->new({
        displays => [ $display ],
    });

DESCRIPTION ^

Decodes a stream of h.264 frames using ffmpeg. Does the UAV::Pilot::Video::H264Handler role.

FETCHING LAST PROCESSED FRAME ^

After a frame is decoded, there are two ways to fetch it: a fast way for things implemented in C, and a slow way for things implemented in Perl.

get_last_frame_c_obj

Returns a scalar which contains a pointer to the decoded AVFrame object. In C, you can derefernce the pointer to get the AVFrame and handle it from there.

get_last_frame_pixel_arrayref

Converts data of the three YUV channels into one array each, and then pushes those onto an array and returns the an arrayref. This is really, really slow, and not at all suitable for real-time processing. It has the advantage that you can do everything in Perl.

syntax highlighting: