refactoring for crash bug on gst_bus_add_watch