I think they are just generating fingerprints of the video data on the device. Then they send it to the cloud where they compare it with a huge database of TV shows, etc.
> you may download one copy of such Content to a single computer or mobile device (as applicable) for your personal, non-commercial home use only, provided that you (a) keep intact all copyright and other proprietary notices, (b) make no modifications to, and do not rent, lease, loan, sell, distribute, copy (except to create a single copy for your own back-up purposes), or create any derivative works based on a Site or the Content, in whole or in part,
I would say thats commercial derivative works.
I think shazam had to agree permissions to sample works for fingerprinting.