Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

32.10. Decoding VPS

Capturing vertical blanking intervals is even easier than capturing image data:

use Video::Capture::V4l;
use Video::Capture::VBI;

my $vbi = new Video::Capture::V4l::VBI
  or die "unable to create VBI capturing object";

# The next line is optional
$vbi->backlog(25);        # Maximum 1 second backlog (~1600kb)

# We all love endless loops ;)
for (;;) {
    # Retrieve next vbi frame
    my $field = $vbi->field;

    # Decode the field and iterate over all lines
    for (decode_field $vbi, VBI_VPS) {
        # ... Do something ...
    }
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial