The whinny is generally described as a way for horses to maintain or regain contact with each other and also as a friendly greeting. It's an effective way to attract another horse's attention over a distance, and emotions can certainly be transmitted through frequency of whinnying and different types of whinny.
I think the whinny can convey more than simple communications like 'I'm here and excited' or 'where are you, I'm scared'.
Getting video of a really interesting example isn't easy - but here's a fairly basic one. Paddy is often observed 'managing' the social life of the horses in his field - herding 'his' mares away from the other horses, and breaking up interactions between certain horses.