[stagefright] refactor pthread
[stagefright] refactor