We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Setting Bit Rate Throttle programmatically in ISAPI Extension [Answered]RSS

4 replies

Last post Apr 16, 2009 02:55 PM by arjenw

  • Setting Bit Rate Throttle programmatically in ISAPI Extension

    Apr 13, 2009 09:46 AM|arjenw|LINK

    Hello, When I use Bit Rate Throttling together with TransmitFile in my IIS Extension module this works fine and the default Media Format Rule(s) apply.

    I am sending the MP4 file differently though. The metadata (the 'moov' atom) is send with Transmit file by specifing the pHead and HeadLength fields in (HSE_TF_INFO) and the actual movie data (the 'mdat' atom) is send with using the hFile (HANDLE).

    Now the Bit Rate Throttling module doesn't kick in. I assume this is because BRT 'only' checks for rules in the given file and doesn't look in the memory that is passed in the header.

    If that's the case, then a solution may be to programmatically specify the BRT variables ResponseThrottler-Enabled, ResponseThrottler-FileExtension and ResponseThrottler-EncodedBitRateKbps, but I am uncertain how to specify these variables?

    I've tried to set them as part of the HSE_REQ_SEND_RESPONSE_HEADER_EX, but that doesn't seem to work.

    I should mention that I am using an ISAPI Extension that has to be compatible with IIS 5.

    So my question is: How can I set the BRT variables programmatically in a C++ ISAPI Extension module that is written for IIS 5 and works in IIS 7?

    Best regards,

    Arjen


    HSE_SEND_HEADER_EX_INFO isapi programmatically iis brt c++

  • Re: Setting Bit Rate Throttle programmatically in ISAPI Extension

    Apr 13, 2009 02:59 PM|anilr|LINK

    You cannot set those server-variables using an ISAPI extension - you can only set them using a native/managed module/handler (CHttpModule/IHttpModule/IHttpHandler).

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: Setting Bit Rate Throttle programmatically in ISAPI Extension

    Apr 13, 2009 03:53 PM|arjenw|LINK

    Hi Anil,

    Thank you for your swift answer.

    So basically I have two options:

    1. Convert my IIS Extension to version 7 of the API.

    2. Ask the writers of the Bit Rate Throttle module to take into account the header and footer fields (next to the actual FILE).

    Is that correct? Or perhaps you have some more ideas, as I prefer not to create another branch for this module?

    Much appreciated,

     

     

     

    isapi brt TransmitFile

  • Re: Setting Bit Rate Throttle programmatically in ISAPI Extension

    Apr 16, 2009 01:38 PM|anilr|LINK

    Yes, those are the only 2 options I can think of.

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: Setting Bit Rate Throttle programmatically in ISAPI Extension

    Apr 16, 2009 02:55 PM|arjenw|LINK

    Just wanted to say thank you for your anwers.