Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
| Microsoft DirectShow 9.0 | 
Signal Format
A DV camcorder's signal format can be NTSC or PAL, standard or long-play.
MSDV Driver
To get the input signal format from the MSDV driver, call the IAMExtTransport::GetTransportBasicParameters method and pass in the ED_TRANSBASIC_INPUT_SIGNAL flag. The method returns a defined constant, indicating the format.
The following code checks the signal format, and uses this value to calculates the average time per frame. The variable Mode receives the signal-format constant.
LONG Mode, AvgTimePerFrame;
hr = MyDevCap.pTransport->GetTransportBasicParameters(
        ED_TRANSBASIC_INPUT_SIGNAL, &Mode, NULL);
if (SUCCEEDED(hr))
{
    switch (Mode)
    {
    case ED_TRANSBASIC_SIGNAL_525_60_SD: // NTSC SD
        AvgTimePerFrame = 33;  // 33 msec (29.97 FPS)
        break;
    case ED_TRANSBASIC_SIGNAL_525_60_SDL: // NTSC SDL
        AvgTimePerFrame = 33;  
        break;
    case ED_TRANSBASIC_SIGNAL_625_50_SD: // PAL SD
        AvgTimePerFrame = 40;  // 40 msec (25 FPS)
        break;
    case ED_TRANSBASIC_SIGNAL_625_50_SDL: // PAL SDL
        AvgTimePerFrame = 40;  
        break;
    default: 
        // Unknown type
        AvgTimePerFrame = 33; // Default
        break;
    }
}
To get the output signal format, call the same method with the ED_TRANSBASIC_OUTPUT_SIGNAL flag.
UVC Driver
To get the input or output signal format from the UVC driver, call IAMStreamConfig::GetFormat on the pin and examine the video format block. (For UVC devices, the code shown in the previous example usually returns ED_TRANSBASIC_SIGNAL_UNKNOWN, so it is not reliable.)
See Also