With the recent changes to the graphics/v4l-dev-KERNEL extensions, bcm2835-codec loads automatically enabling hardware accelerated codecs for ffmpeg and gstreamer.
$ ffplay -i video.mp4 -vcodec h264_v4l2m2m
gst-launch-1.0 -v filesrc location=video.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 ! autovideosink