Limit number of transcoded streams based on source video resolution

Hello,

I want to limit number of published transcoded streams to save server resources. For me it does not makes much sense to upscale live stream of say 480x360 to HD, as this will not give any quality improvement but will have effect on CPU and disk resources usage (live streams are to be recorded). While I solved the recording part with custom stream recorder, it would be more transparent to solve it on transcoder level instead.
I read How-to-control-which-streams-get-transcoded-using-server-side-API, but I'm not sure in two things:

1) That onCodecInfoVideo in my source stream handler will be called before any transcoded streams created, thus I will not be able to set resolution into source streams properties.
2) That it is guaranteed that onCodecInfoVideo will be called before isLiveStreamTranscode called, so I will be able to get target destination from created transcoded stream.

onCodecInfoVideo is called when the video codec packet is received. onLiveStreamTranscode will be called when the first packet for the stream is received. If the first packet is the video codec packet then onCodecInfoVideo will be called before onLiveStreamTranscode. If the first packet is some other type of packet then onLiveStreamTranscode will be called first.

Is there any way to shutdown transcoded stream individually once they have been already published? Calling TranscoderSession.shutdown(IMediaStream) on transcoded stream shutdowns all the streams except the source one.

The only solution I have found after spending 3 days in vain attempts, is to pass resolution parameters via query string from the streaming client (which is my app) and shutdown transrated stream in ILiveStreamTranscoderControl.isLiveStreamTranscode. Obviously not a beautidul solution, but attempt to deactivate encode worker threads for a specific stream breaks transcoder entirely. That's shame that API does not provide the functionality to shutdown/restart transcoder streams out of box.