Legally, probably. Sounds iffy, but that's the state of the law at present - it's evolving and is 'iffy'. A US Appeals Court has determined that this is protected by First Amendment Rights, and that:
"It is clearly established in this circuit that police officers cannot, consistently with the Constitution, prosecute citizens for violating wiretapping laws when they peacefully record a police officer performing his or her official duties in a public area," the appeals court said.
The ACLU has published Rights for Photographers and states that:
When in public spaces where you are lawfully present you have the
right to photograph anything that is in plain view. That includes
pictures of federal buildings, transportation facilities, and police.
Such photography is a form of public oversight over the government and
is important in a free society.
and in regards to your camera/phone:
Police officers may not confiscate or demand to view your digital
photographs or video without a warrant. The Supreme Court has ruled
that police may not search your cell phone when they arrest you,
unless they get a warrant. Although the court did not specifically
rule on whether law enforcement may search other electronic devices
such as a standalone camera, the ACLU believes that the constitution
broadly prevents warrantless searches of your digital data.
The Huffington Post has an article - It's Perfectly Legal To Film The Cops which confirms that it's legal in all 50 states:
“There’s no law anywhere in the United States that prohibits people
from recording the police on the street, in a park, or any other place
where the public is generally allowed,” Osterreicher said.
However, conflicting state laws might still find you in hot water - they might go after you with another sneaky rule, for example, from the same article, according to Massachusetts law, citizens are permitted to record police officers in public, but only if the police have been informed that a recording is taking place. You're more likely to run into problems if your recording interferes with police business, or if you're being a nuisance.
So if in doubt - ask the officers that you're filming first, and avoid the complications of offense, arrest and trial (if not worse) if possible.