- Posts: 2
- Joined: Tue Jan 21, 2020 6:00 am
- Real Name: Yuichiro Danno
Hey there.
I am trying to extract SCTE-104 packets from the VANC's feed.
My code is below;
It seems to get SCTE-104 packet (I got the message "Got SCTE-104" and the result of IDeckLinkAncillaryPacket->getBytes is success),
but I cannot get any valuable AncillaryPacket Data.
Is there anything wrong ?
Please help.
I am trying to extract SCTE-104 packets from the VANC's feed.
My code is below;
It seems to get SCTE-104 packet (I got the message "Got SCTE-104" and the result of IDeckLinkAncillaryPacket->getBytes is success),
but I cannot get any valuable AncillaryPacket Data.
Is there anything wrong ?
Please help.
- Code: Select all
HRESULT DeckLinkDevice::VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket)
{
AncillaryDataStruct ancillaryData;
IDeckLinkVideoFrameAncillaryPackets* frameAncillaryPackets = NULL;
IDeckLinkAncillaryPacket* ancillaryPacket = NULL;
HRESULT result = S_OK;
uint8_t ancillaryPacketData;
unsigned int* size = 0;
std::string s = "";
CString displayMessage = NULL;
if (videoFrame == NULL)
return S_OK;
result = videoFrame->QueryInterface(IID_IDeckLinkVideoFrameAncillaryPackets, (void**)&frameAncillaryPackets);
if (result != S_OK)
{
fprintf(stderr, "Could not get ancillary packet store = %08x\n", result);
goto bail;
}
result = frameAncillaryPackets->GetFirstPacketByID(0x41, 0x7, &ancillaryPacket); // for SCTE-104 packet
if (result != S_OK) {
goto bail;
}
else {
MessageBox(NULL, TEXT("Got SCTE-104"), TEXT("title"), MB_OK);
}
result = ancillaryPacket->GetBytes(bmdAncillaryPacketFormatUInt8, (const void**)&ancillaryPacketData, size);
if (result != S_OK) {
MessageBox(NULL, TEXT("Could not get bmdAncillaryPacketFormatUInt8"), TEXT("title"), MB_OK);
goto bail;
}
else {
// ancillaryPacketData is blank
}