Use GST_MESSAGE_TYPE macro to access the message type

Change-Id: Ia7de0806760e351b80d95266ba5bfc7e03eff0d2
Do not use a global variable for main loop in recorderendpoint test

Change-Id: Ifa008bdd2a18cd61d34d86130b69508999174521