Are my disc brake pads contaminated? My rear brake never locks the rear wheel even with full pull on the lever, especially going down hill or fast. I can even pedal a bit with the brake depressed. 

This is a recent issue and sometime in a ride the full braking force returns for a couple of minutes. 

My pads are in a very bad condition and I've have new ones on order. My question is if they can be the reason for my problem? The bike was bought used so I don't know its history.

Rear pads:


Front pads:


Front, no flash:


And the disc, which looks ok:
These look pretty far gone, as suggested. Lucky the rotor isn't scored, or that would cost more than a set of pads.