Those are empty egg capsules of Stramonita haemastoma.
Stramonita haemastoma is a big predatory marine snail of the family Muricidae. It inhabits coastal waters (intertidal and subtidal) up to depth of 9 meters. It is thought to be quite common in the Mediterranean Sea, but areas with low abundance exist. However it was reported that the population in Israel in Eastern Mediterranean has collapsed because of warming of the coastal waters. The subspecies living in the Mediterranean Sea is Stramonita haemastoma haemastoma.
My egg capsules of Stramonita haemastoma comes from southern Croatia. Eggs are laid in clusters to solid surface. Number of snails are laying eggs on the same place making collective spawns.
Empty egg capsules of Stramonita haemastoma attached on a valve of a bivalve Mytilus edulis. The filaments all around are byssus filaments of the bivalve:
The spawning season was reported from late April to August. Unfertilized capsules are purple, freshly laid capsules are yellow. The egg development lasts about 20 days. But all of capsules on the photos are empty already, because I collected them in late September.
The each capsule is about 10 mm in height, 3 mm wide and 2 mm thick. Although one capsule is just 10 mm long, it contain thousands of eggs (from about 2300 eggs to about 6050 eggs). One female will deposit from 20 to 86 capsules, usually 47 capsules on average. This gives incredible number of about 200 000 eggs per one female. When are hatching larvae leaving the capsule, larvae are about 50 μm in shell height.
Lahbib Y., Abidli S. & El Menif T. N. 2011: Spawning and intracapsular development of Stramonita haemastoma haemastoma (Gastropoda: Muricidae) collected in northern Tunisia. Marine Biology Research, 7(7): 719-726. DOI: 10.1080/17451000.2011.558099.
Rilov. G. 2016: Multi-species collapses at the warm edge of a warming sea. Scientific Reports, 6: article number: 36897. DOI: 10.1038/srep36897.