Parsing H.264 Bitstreams: A Practical Guide with Sample Code