1

i have successfully implemented Virtual webcam device based on Viveks' VCAM filter source code , but i want to extend it to Broadcast both Video and Audio as a single virtual webcam that transmit both Video and Audio...

For this i have tried this ...

const AMOVIESETUP_MEDIATYPE AMSMediaTypesVCam[] =
{
    {
        &MEDIATYPE_Video,
        &MEDIASUBTYPE_NULL
    },
    {
        &MEDIATYPE_Audio,
        &MEDIASUBTYPE_NULL
    }
};

const AMOVIESETUP_PIN AMSPinVCam =
{
    L"Output",             // Pin string name
    FALSE,                 // Is it rendered
    TRUE,                  // Is it an output
    FALSE,                 // Can we have none
    FALSE,                 // Can we have many
    &CLSID_NULL,           // Connects to filter
    NULL,                  // Connects to pin
    2,                     // Number of types
    AMSMediaTypesVCam      // Pin Media types
};

rest of the code is same as Vivek's virtaul webcam. Problem is I am not getting any call of Audio media type and not able to transmit my audio buffer to virtual webcam...

in GetMediaType function i have done the following ...

if (IsEqualGUID(*pmt->Type(), MEDIATYPE_Video) || iPosition == 1)
{
...setup bitmap format
}
else if (IsEqualGUID(*pmt->Type(), MEDIATYPE_Audio))
{
...setup wave format
}

in DecideBufferSize,

if (IsEqualGUID(*m_mt.Type(), MEDIATYPE_Video))
{
//video buffer alloc
}
else if (IsEqualGUID(*m_mt.Type(), MEDIATYPE_Audio))
{
//audio buffer alloc
}

Kindly guide me what additional changes need to be done ...

Thanks ...

enzio91900
  • 41
  • 8

0 Answers0