On 2/22/22 16:48, Rémi Bernon wrote:
+NTSTATUS wg_transform_push_data(void *args) +{
- struct wg_transform_push_data_params *params = args;
- struct wg_transform *transform = params->transform;
- struct wg_sample *sample = params->sample;
- GstFlowReturn ret;
- GstBuffer *buffer;
- buffer = gst_buffer_new_and_alloc(sample->size);
- if (!buffer)
return STATUS_NO_MEMORY;
- gst_buffer_fill(buffer, 0, sample->data, sample->size);
- if ((ret = gst_pad_push(transform->my_src, buffer)))
return MF_E_NOTACCEPTING;
Does MF_E_NOTACCEPTING correspond to any failure GstFlowReturn, though? As far as I can tell GStreamer doesn't even have an equivalent; it just blocks in the chain function if applicable.
(Side note: I'd really prefer that we don't mix two different error code namespaces. Note that we're already returning STATUS_NO_MEMORY here when the PE side expects an HRESULT.)