MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decklink_get_attr_string

Function decklink_get_attr_string

libavdevice/decklink_common.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static int decklink_get_attr_string(IDeckLink *dl, BMDDeckLinkAttributeID cfg_id, const char **s)
107{
108 DECKLINK_STR tmp;
109 HRESULT hr;
110 IDeckLinkProfileAttributes *attr;
111 *s = NULL;
112 if (dl->QueryInterface(IID_IDeckLinkProfileAttributes, (void **)&attr) != S_OK)
113 return AVERROR_EXTERNAL;
114 hr = attr->GetString(cfg_id, &tmp);
115 attr->Release();
116 if (hr == S_OK) {
117 *s = DECKLINK_STRDUP(tmp);
118 DECKLINK_FREE(tmp);
119 if (!*s)
120 return AVERROR(ENOMEM);
121 } else if (hr == E_FAIL) {
122 return AVERROR_EXTERNAL;
123 }
124 return 0;
125}
126
127static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfigurationID cfg_id)
128{

Callers 2

ff_decklink_list_devicesFunction · 0.85
ff_decklink_init_deviceFunction · 0.85

Calls 2

QueryInterfaceMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected