(a)
Every person who attempts, by means of any threat or violence, to deter or prevent an executive officer from performing any duty imposed upon the officer by law, or who knowingly resists, by the use of force or violence, the
officer, in the performance of his
or her duty, is punishable by a fine not exceeding ten thousand dollars ($10,000), or by imprisonment pursuant to subdivision (h) of Section 1170, or in a county jail not exceeding one year, or by both such fine and imprisonment.
(b)
The fact that a person takes a photograph or makes an audio or video recording of an executive officer, while the officer is in a public place or the person taking the photograph or making the recording is in a place he or she has the right to be, does not constitute, in and of itself, a violation of subdivision (a).