| 104 | } |
| 105 | |
| 106 | static 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 | |
| 127 | static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfigurationID cfg_id) |
| 128 | { |
no test coverage detected