DirectDrawSink loses its link and goes to the NULL state
I am writing a player, which is able to play sound from a separate file.
I do this the following way.
1. Create directdrawsink instance. My player is the ActiveX component, and I have to embed its window into another application. So, I create this element before and set its window ID.
2. create playbin2, attach signal handler and bus watch, analyze messages and decide on them, which streams are present. I also set its "video-sink" property.
3. If video or audio is missing, post an application message with the small flag, that video (or audio) is missing.
4. Bus watch catches this message, destroys the playbin2 instance, creates an empty pipeline, puts two uridecodebins there and also two more bins, vbin and abin, containing, respectively, queue2, ffmpegcolorspace, videoscale and already existing videosink; and audioconver, audioresample, and autoaudiosink.
Bin creation is happening in the no-more-pads handler.
The code, creating bins is like the following.
Then I create ghostpad for the bin and link it with the uridecodebin.