This kind of thing already exists when one is returning to the US... border agents have the right to search your media.
http://blog.wired.com/27bstroke6/2008/04/border-agents-c.html
"The 9th U.S. Circuit Court of Appeals sided with the government, finding that the so-called border exception to the Fourth Amendment's prohibition on unreasonable searches applied not just to suitcases and papers, but also to electronics.
The ruling (.pdf) came in a case where customs agents searched the laptop of Michael Arnold who was returning from the Philippines. They found images they believed to be child pornography, seized the laptop and later arrested him. While the lower court ruling excluded from trial the pictures of young boys the government says it found on the hard drive, they now can be used again."
Another source:
http://techdirt.com/articles/20080107/033235.shtml
How about this source, if wasn't just Obama... it all started with Bush...
http://www.computerweekly.com/Articles/2009/03/13/235268/obama-makes-copyright-treaty-a-national-secret.htm
For those saying it is an invasion of privacy so it can't happen, I argue that an invasion of privacy has already happened. I don't care that the guy had child porn on his laptop, he should not have been searched.
I believe Benjamin Franklin said it best:
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety."