Manage events from internal thread using callbacks

Change-Id: I69007ac203d0a5b28f32f902a070f33dfb1e0d03
Do not use a blocking probe to check EOS event

Change-Id: I8160ed9f390c711772acfd27e6c91bffe2e0f777