- We record codec format(aka stream format) in `struct wg_parser_stream`, but this struct is created in pad_added_cb() by create_stream(). So we can't get the stream struct in autoplug_continue_cb() because we don't have wg_parser_stream when autoplug_continue_cb() is called. We should record the codec format when pad_added_cb() is called. Am I right?
Yes, that, sorry.
- if 1. is correct, do we still need to call wg_fromat_from_caps() in autoplug_continue_cb(),?
No, I think it's clear that won't work. That suggestion of mine was broken in the first place :-(