How can I set properties of encoders used in TimeShifting object?
From AVObjects Knowledge Base
There are 2 ways to do that:
1. Use GetVideoCodecProps() and SetVideoCodecProps() methods.
This methods use ICGetState interface of codecs ( http://msdn.microsoft.com/en-us/library/dd743157(v=VS.85).aspx ). That means that they get and set properties in binary structure and it is impossible to change them manually (data storing format is codec specific).
So, here is a sequence of actions to use them:
- Set all needed codec settings through property page.
- Get state (settings) with GetVideoCodecProps() method.
- Save received settings.
- On next usage restore this settings with SetVideoCodecProps() method.
Note: ICGetState is supported by VCM codecs only (they are marked as blue in GraphEdit). Edit).
2. Receive pointer to codec object and use it's DirectShow interface directly.
Here is a sequence of actions:
- Create an instance of codec DirectShow interface (must be provided by codec developers).
- Get the pointer to codec object with GetVideoEncoderFilter() or GetAudioEncoderFilter() method.
- Cast codec object to it's DirectShow interface instance.
- Use DirectShow interface instance methods to set codec properties.
Note: This method is supported by non-VCM codecs with DirectShow interface only.