First of all...
and this only pertains to California:
you CAN Legally record in a public area a public official in the course of their duties,
HOWEVER, if your presence, wheather or not your are recording, taking photos, etc is a disturbance in the police investigation or creating delay, he can legally detain you for that as a violation - penal code 148, its a misdemeanor.
In this idiots case, he was detained/arrested because he was either one disturbing/delaying the officer or too close to the officer and person in the blue car which required some reasonable privacy. He was later RELEASED because (again in CAlifornia) penal code 849(b) allows for an officer after an arrest under his discrestion to RELEASE the arrested person without a warrant and without having the arestee see a juduge/court.
so was the officer in legal rights? Yes
was the boy in legal rights? sort yes sort of no
was the boy a dumb dick? yes
2008 335i Coupe [05/2010]
2011 128i 6MT ///M-Sport [12/2012]