autovideosink with GstVideoOverlay -> handle gets destroyed by OS on minimize

Marc Krämer marc.kraemer at web.de
Tue Dec 16 04:20:27 PST 2014


To reproduce my problem without code:

(1. Step)
gst-launch-1.0.exe -v --gst-debug=GST_ELEMENT_D3D*:6 filesrc 
location=d:\t.avi  !
decodebin name="dec" ! d3dvideosink  dec. ! audioconvert ! autoaudiosink

(2. Step)
Minimize appearing Video Window
Result: ERROR: from element 
/GstPipeline:pipeline0/GstDecodeBin:dec/GstAviDemux:avidemux0: Internal 
data stream error.

Can't see any matching Bug Report. Should I create ?

[tested win8.1 64Bit]

Full Result:
/GstPipeline:pipeline0/GstDecodeBin:dec/GstTypeFindElement:typefind.GstPad:src: 
caps = video/x-msvideo
/GstPipeline:pipeline0/GstDecodeBin:dec/GstTypeFindElement:typefind.GstPad:src: 
caps = "NULL"
/GstPipeline:pipeline0/GstDecodeBin:dec/GstMultiQueue:multiqueue0.GstPad:src_0: 
caps = "video/mpeg\,\ mpegversion\=\(int\)4\,\ 
systemstream\=\(boolean\)false\,\
  framerate\=\(fraction\)25/1\,\ width\=\(int\)640\,\ height\=\(int\)352"
/GstPipeline:pipeline0/GstDecodeBin:dec/GstMultiQueue:multiqueue0.GstPad:src_0: 
caps = "video/mpeg\,\ mpegversion\=\(int\)4\,\ 
systemstream\=\(boolean\)false\,\
  framerate\=\(fraction\)25/1\,\ width\=\(int\)640\,\ height\=\(int\)352"
/GstPipeline:pipeline0/GstDecodeBin:dec/GstMpeg4VParse:mpeg4vparse0.GstPad:sink: 
caps = "video/mpeg\,\ mpegversion\=\(int\)4\,\ 
systemstream\=\(boolean\)false\,
\ framerate\=\(fraction\)25/1\,\ width\=\(int\)640\,\ height\=\(int\)352"
/GstPipeline:pipeline0/GstDecodeBin:dec/GstMpeg4VParse:mpeg4vparse0.GstPad:src: 
caps = "video/mpeg\,\ mpegversion\=\(int\)4\,\ 
systemstream\=\(boolean\)false\,\
  framerate\=\(fraction\)25/1\,\ width\=\(int\)640\,\ 
height\=\(int\)352\,\ parsed\=\(boolean\)true\,\ 
profile\=\(string\)advanced-simple\,\ level\=\(string\)5\,
\ 
codec_data\=\(buffer\)000001b0f5000001b509000001000000012000868400670c5010b0518f\,\ 
pixel-aspect-ratio\=\(fraction\)1/1"
/GstPipeline:pipeline0/GstDecodeBin:dec/avdec_mpeg4:avdec_mpeg4-0.GstPad:sink: 
caps = "video/mpeg\,\ mpegversion\=\(int\)4\,\ 
systemstream\=\(boolean\)false\,\
framerate\=\(fraction\)25/1\,\ width\=\(int\)640\,\ 
height\=\(int\)352\,\ parsed\=\(boolean\)true\,\ 
profile\=\(string\)advanced-simple\,\ level\=\(string\)5\,\
  codec_data\=\(buffer\)000001b0f5000001b509000001000000012000868400670c5010b0518f\,\ pixel-aspect-ratio\=\(fraction\)1/1"
Redistribute latency...
/GstPipeline:pipeline0/GstDecodeBin:dec/avdec_mpeg4:avdec_mpeg4-0.GstPad:src: 
caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ 
height\=\(in
t\)352\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ 
interlace-mode\=\(string\)progressive\,\ chroma-site\=\(string\)mpeg2\,\ 
colorimetry\=\(string\)bt601\,\ framer
ate\=\(fraction\)25/1"
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = 
"audio/x-raw\,\ format\=\(string\)S16LE\,\ 
layout\=\(string\)interleaved\,\ rate\=\(int\
)48000\,\ channels\=\(int\)2\,\ channel-mask\=\(bitmask\)0x0000000000000003"
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = 
"audio/x-raw\,\ format\=\(string\)S16LE\,\ 
layout\=\(string\)interleaved\,\ rate\=\(int\
)48000\,\ channels\=\(int\)2\,\ channel-mask\=\(bitmask\)0x0000000000000003"
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad1: 
caps = "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(strin
g\)interleaved\,\ rate\=\(int\)48000\,\ channels\=\(int\)2\,\ 
channel-mask\=\(bitmask\)0x0000000000000003"
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstDirectSoundSink:autoaudiosink0-actual-sink-directsound.GstPad:sink: 
caps = "audio/x-raw\,\ format\=\(s
tring\)S16LE\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)48000\,\ 
channels\=\(int\)2\,\ channel-mask\=\(bitmask\)0x0000000000000003"
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink: 
caps = "audio/x-raw\,\ format\=\(string\)S16LE\,\ 
layout\=\(string\)interleaved\,\ rate
\=\(int\)48000\,\ channels\=\(int\)2\,\ 
channel-mask\=\(bitmask\)0x0000000000000003"
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = 
"audio/x-raw\,\ format\=\(string\)S16LE\,\ 
layout\=\(string\)interleaved\,\ rate\=\(int
\)48000\,\ channels\=\(int\)2\,\ 
channel-mask\=\(bitmask\)0x0000000000000003"
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
ERROR: from element 
/GstPipeline:pipeline0/GstDecodeBin:dec/GstAviDemux:avidemux0: Internal 
data stream error.
Additional debug info:
gstavidemux.c(5678): gst_avi_demux_loop (): 
/GstPipeline:pipeline0/GstDecodeBin:dec/GstAviDemux:avidemux0:
streaming stopped, reason error
Execution ended after 0:00:02.771283502
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...



>
> A short update after more research:
>
> > But whenever i minimize my app to system tray, the operating system 
> (ms windows in this case) destroys the handle.
>
> I was wrong. Handle does not got disposed. The inner state of the 
> control seems to become changed in a way d3dvideosink can't handle. 
> Found some post about 'window minimize' + 'directx' problems. Possible 
> a correlation to Controls AreaLayout reinitialisation. Seems to be a 
> interop Problem.
>
> Anyway, can anyone give me he hint how i can 'pause' the videosink 
> while playing audio on. And later, after reverting window minimize, 
> bring back the old pipeline state?
> I will be happy for any catchword!
>
> Best regards,
> marc
>
>
>
>> Therefore i receive a a general stream error. Everything make sense.
>>
>> Please, can anyone give me a hint what i should/could do?
>>
>>
>> Cheers,
>> marc
>>
>> BTW 1: gstreamer is a masterpeace
>>
>> BTW 2: Evaluated Pipeline at runtime:
>> Pipeline Element name:autoaudiosink klass: "Sink/Audio" longname: "" 
>> description: "Wrapper audio sink for automatically detected audio sink"
>> Pipeline Element name:autoaudiosink-actual-sink-directsound klass: 
>> "Sink/Audio" longname: "" description: "Output to a sound card via 
>> Direct Sound"
>> Pipeline Element name:volume klass: "Filter/Effect/Audio" longname: 
>> "" description: "Set volume on audio/raw streams"
>> Pipeline Element name:audioconvert klass: "Filter/Converter/Audio" 
>> longname: "" description: "Convert audio to different formats"
>> Pipeline Element name:autovideosink klass: "Sink/Video" longname: "" 
>> description: "Wrapper video sink for automatically detected video sink"
>> Pipeline Element name:autovideosink-actual-sink-d3dvideo klass: 
>> "Sink/Video" longname: "" description: "Display data using a Direct3D 
>> video renderer"
>> Pipeline Element name:videobalance klass: "Filter/Effect/Video" 
>> longname: "" description: "Adjusts brightness, contrast, hue, 
>> saturation on a video stream"
>> Pipeline Element name:textoverlay klass: "Filter/Editor/Video" 
>> longname: "" description: "Adds text strings on top of a video buffer"
>> Pipeline Element name:timeoverlay klass: "Filter/Editor/Video" 
>> longname: "" description: "Overlays buffer time stamps on a video 
>> stream"
>> Pipeline Element name:decodebin klass: "Generic/Bin/Decoder" 
>> longname: "" description: "Autoplug and decode to raw media"
>> Pipeline Element name:avdec_h264-1 klass: "Codec/Decoder/Video" 
>> longname: "" description: "libav h264 decoder"
>> Pipeline Element name:avdec_aac1 klass: "Codec/Decoder/Audio" 
>> longname: "" description: "libav aac decoder"
>> Pipeline Element name:aacparse1 klass: "Codec/Parser/Audio" longname: 
>> "" description: "Advanced Audio Coding parser"
>> Pipeline Element name:capsfilter1 klass: "Generic" longname: "" 
>> description: "Pass data without modification, limiting formats"
>> Pipeline Element name:h264parse1 klass: 
>> "Codec/Parser/Converter/Video" longname: "" description: "Parses 
>> H.264 streams"
>> Pipeline Element name:multiqueue1 klass: "Generic" longname: "" 
>> description: "Multiple data queue"
>> Pipeline Element name:qtdemux1 klass: "Codec/Demuxer" longname: "" 
>> description: "Demultiplex a QuickTime file into audio and video streams"
>> Pipeline Element name:typefind klass: "Generic" longname: "" 
>> description: "Finds the media type of a stream"
>> Pipeline Element name:filesrc klass: "Source/File" longname: "" 
>> description: "Read from arbitrary point in a file"
>>
>> BTW 3: Relevant logs:
>> 0:00:17.559373887  8772   055B4000 ERROR           d3dvideosink 
>> d3dhelpers.c:1452:d3d_resize_swap_chain:<autovideosink-actual-sink-d3dvideo> 
>> Error creating swapchian HRESULT: HR-SEV:1 HR-FAC:7 HR-CODE:87
>> 0:00:17.578525902  8772   0E89C3A0 INFO            d3dvideosink 
>> d3dhelpers.c:1837:d3d_render_buffer:<autovideosink-actual-sink-d3dvideo> 
>> Render 0:00:03.336666666
>> 0:00:17.578606918  8772   0E89C3A0 ERROR           d3dvideosink 
>> d3dhelpers.c:1391:d3d_resize_swap_chain:<autovideosink-actual-sink-d3dvideo> 
>> Direct3D swap chain does not exist
>> 0:00:17.579178429  8772   0B745CB0 WARN                 qtdemux 
>> qtdemux.c:4434:gst_qtdemux_loop:<qtdemux1> error: streaming stopped, 
>> reason error
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list