Beware TMI

I'm not sure what this is please help it came out of me. I think I'm on my period so it could be the uterus lining but I've been bleeding since I've last had sex and since this came out I've slowed down. Could it be a miscarriage? Help please!