} // namespace
DeckLinkCapture::DeckLinkCapture(IDeckLink *card, int card_index)
- : card_index(card_index)
+ : card_index(card_index), card(card)
{
{
const char *model_name;
if (has_dequeue_callbacks) {
dequeue_cleanup_callback();
}
+ input->Release();
+ config->Release();
+ card->Release();
}
HRESULT STDMETHODCALLTYPE DeckLinkCapture::QueryInterface(REFIID, LPVOID *)
class DeckLinkCapture : public CaptureInterface, IDeckLinkInputCallback
{
public:
- DeckLinkCapture(IDeckLink *card, int card_index);
+ DeckLinkCapture(IDeckLink *card, int card_index); // Takes ownership of <card>.
~DeckLinkCapture();
// IDeckLinkInputCallback.
IDeckLinkConfiguration *config = nullptr;
+ IDeckLink *card = nullptr;
IDeckLinkInput *input = nullptr;
BMDTimeValue frame_duration;
BMDTimeScale time_scale;