What about a big 
switch(state) {
case GST_STATE_PLAYING:
    return NAME_GST_STATE_PLAYING;
...