[Bug 759389] fakesrc ! wasapisink and any other combination raises The stream is in the wrong format
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Apr 11 07:24:13 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=759389
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #325582|none |needs-work
status| |
--- Comment #15 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 325582:
--> (https://bugzilla.gnome.org/review?bug=759389&attachment=325582)
Does not apply, something went wrong here with the patch:
patch: **** malformed patch at line 58: @@ -93,6 +96,12 @@
gst_wasapi_sink_class_init (GstWasapiSinkClass * klass)
::: sys/wasapi/gstwasapisink.c
@@ +100,3 @@
+ hr = CoInitializeEx (NULL, COINIT_MULTITHREADED);
+ if (FAILED (hr)) {
+ // TODO print error
You could make this a GST_ERROR() for now. Better than nothing
@@ +142,3 @@
+ caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (bsink));
+
+ //TODO filter it against the filter caps if filter!=NULL
Why don't you just do it then? That's as fast as writing that comment :P
if (filter) {
GstCaps *tmp = gst_caps_intersect_full (filter, caps,
GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (caps);
caps = tmp;
}
@@ +212,3 @@
hr = IAudioClient_Initialize (self->client, AUDCLNT_SHAREMODE_SHARED,
AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
+ spec->buffer_time * 10, 0, (WAVEFORMATEX *) & format, NULL);
buffer_time / latency_time are in microseconds btw, not milliseconds. So if
WASAPI wants it in 100ns units, you would have to divide by 10.
@@ +232,3 @@
+ "IAudioClient::GetBufferSize (number of audio frames that the buffer can
hold) :%i",
+ NumBufferFrames);
+ newTime = NumBufferFrames / self->info.channels * self->info.rate / 1000;
gst_util_uint64_scale() is usually helpful for these kind of things to prevent
overflows while keeping precision
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list