[gstreamer-bugs] [Bug 618921] [dshowvideosink][PATCH] Replace CoIntialize with CoInitializeEx for bettrer integration with GStreamer threads

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon May 17 17:43:56 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=618921
  GStreamer | gst-plugins-bad | git

--- Comment #2 from Andoni Morales <ylatuya at gmail.com> 2010-05-18 00:43:49 UTC ---
Although it doesn't fix the COM mess, at least it fixes a particular use case.
The current implementation doesn't allow any transition. Just try to set the
sink from PLAYING to NULL and back to PLAY: it won't be able to create a new
instance of the graph.
I prefer to have a sink that can do transitions changing 2 lines of code rather
than having a sink that doesn't. 

Trying to solve the COM mess, a possible solution would be to create a thread
on which we call CoInitializeEx to create a MTA. Subsequent calls to
CoInitializeEx from other threads will enter this MTA and can safely call
CoUnitialize since all of them use the same MTA, one unique per process (only
the refcount will change and the MTA won't be freed since the first thread
hasn't called yet CoUnitialize). In finalize the thread used to initialize the
MTA will be the last one to leave the apartement and it can be unitialized
properly.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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