Also, please don't put more than one C statement on the same line.
Do you mean code like this:
`case WG_WMV_VIDEO_FORMAT_WMV1: wmv_format = "WMV1"; break;` ?
If do, I just follow the parttern in wg_format_to_caps_video_h264(). Should I put `wmv_format = "WMV1";` and `break;` into new lines?
Sorry, I guess I didn't catch that when it was submitted the first time. In general I would prefer to avoid that kind of thing, yes. Use separate lines, or perhaps a helper function or a table.
Also, why do you need to change both the frontend and backend?
I changed wg_format_to_caps_video() (do you mean this is backend?) because we now totally ignore framerate settings in this function. the gst_video_info_set_format() call here only set format, width, height to info. Then we convert info to caps. So the result caps don't have framerate. Therefore I set framerate to info to make the result caps hold framerate information.
Yes, I use "frontend" to refer to individual wg API consumers, and "backend" to refer to the common wg API itself. Sorry for the lack of clarity.
I had forgotten we do this, but that's actually intentional; see the following lines in wg_format_to_caps_video() where we explicitly strip the framerate. There's potentially an argument for changing that, but in general I don't think we ever need to restrict the framerate we pass to GStreamer. If we want the output framerate to match the input in a transform, we can copy it directly. If I'm not missing anything, that should remove the need for patch 2/4 entirely.