media: Update clock id for clock_gettime

clock_realtime can be manipulated using system time
change. System time clocks can go for a toss anytime.
Hence updating clock identifier to clock_monotonic
which cannot be manipulated. Also, initialize
pthread_cond API's to use monotonic clock to
avoid conversion of real time from monotonic clock.
Replace sem_timedwait API with sem_timedwait
monotonic_np as monotonic clock is used.

Change-Id: Id9ad1c042c1596e68955d3e30ddd447fb31747ef
2 files changed