Issue setting caps with 1.5.1

Matt Zawojski matt.zawojski at exacom.com
Fri Jun 12 10:48:03 PDT 2015


Hi,

I have been developing my application with the 1.4.5 Windows build of gstreamer.  With the recent release of the Windows binaries for 1.5.1 I thought I would give them a try.

Using the 1.5.1 version I am running into an issue setting the caps on an appsrc.  I am using the same code, just swapping between gstreamer versions.  It works on 1.4.5, but does not on 1.5.1.  Below is the GST_DEBUG output that I am seeing from each:

Version 1.4.5
0:00:29.393220373  9672   0FB24820 DEBUG               pipeline gstpipeline.c:217:gst_pipeline_init:<GstPipeline at 191D90D0> set bus <bus1> on pipeline
0:00:29.764539149  9672   0FB24820 DEBUG                  queue gstqueue.c:460:gst_queue_init:<GstQueue at 19201760> initialized queue's not_empty & not_full conditions
0:00:29.766658860  9672   0FB24820 DEBUG                 appsrc gstappsrc.c:1174:gst_app_src_set_caps:<app_source> setting caps to audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:29.767038230  9672   0FB24820 DEBUG                 appsrc gstappsrc.c:1301:gst_app_src_get_stream_type:<app_source> getting stream_type of 0
0:00:29.960076285  9672   0FB24820 DEBUG                 appsrc gstappsrc.c:1275:gst_app_src_set_stream_type:<app_source> setting stream_type of 1
0:00:29.961369444  9672   0FB24820 DEBUG                 appsrc gstappsrc.c:601:gst_app_src_internal_get_caps:<app_source> caps: audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:29.961839717  9672   0FB24820 DEBUG                 appsrc gstappsrc.c:601:gst_app_src_internal_get_caps:<app_source> caps: audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:30.565777547  9672   0FB24820 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:30.565879812  9672   0FB24820 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:30.566769775  9672   0FB24820 DEBUG           audioconvert gstaudioconvert.c:331:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:30.761016684  9672   0FB24820 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:30.761189692  9672   0FB24820 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:30.762297747  9672   0FB24820 DEBUG           audioconvert gstaudioconvert.c:331:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, The thread 0x25e0 has exited with code 0 (0x0).
S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:30.962977829  9672   0FB24820 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:30.963092556  9672   0FB24820 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:30.963835903  9672   0FB24820 DEBUG           audioconvert gstaudioconvert.c:331:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:31.161045201  9672   0FB24820 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:31.161152964  9672   0FB24820 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:31.161909873  9672   0FB24820 DEBUG           audioconvert gstaudioconvert.c:331:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:31.373848281  9672   19105BA0 DEBUG                 appsrc gstappsrc.c:769:gst_app_src_start:<app_source> starting
0:00:31.373877238  9672   19105BA0 DEBUG                 appsrc gstappsrc.c:892:gst_app_src_do_seek:<app_source> seeking to 0, format time
0:00:31.375821374  9672   19105BA0 DEBUG                 appsrc gstappsrc.c:913:gst_app_src_do_seek:<app_source><2015-Jun-09 15:04:12.688154> - MESSAGE_PROCESSING: Received state change for the pipeline.
flushing queue
0:00:31.560343201  9672   19105BA0 DEBUG               pipeline gstpipeline.c:280:reset_start_time:<audio-pipeline> reset start_time to 0
0:00:31.560974019  9672   190858F8 FIXME                default gstutils.c:3643:gst_pad_create_stream_id_internal:<app_source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:31.561131265  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2507:type_found:<decode_bin> typefind found caps audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:31.561164621  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3046:gst_decode_chain_new:<decode_bin> Creating new chain 191E3260 with parent group 00000000
0:00:31.561183314  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1493:analyze_new_pad:<decode_bin> Pad typefind:src caps:audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:31.759920725  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:4381:gst_decode_pad_new:<decode_bin> making new decodepad
0:00:31.760011994  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1451:copy_sticky_events:<'':decodepad0> store sticky event stream-start event: 191E3188, time 99:99:99.999999999, seq-num 61, GstEventStreamStart, stream-id=(string)a15bd26b64105f5fff81ebd64d919ecd, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;
0:00:31.760240349  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1451:copy_sticky_events:<'':decodepad0> store sticky event caps event: 191E3218, time 99:99:99.999999999, seq-num 63, GstEventCaps, caps=(GstCaps)"audio/ms-gsm\,\ rate\=\(int\)8000\,\ channels\=\(int\)1";
0:00:31.760418855  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1346:gst_decode_bin_autoplug_continue:<decode_bin> autoplug-continue returns TRUE
0:00:31.959960091  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1360:gst_decode_bin_autoplug_factories:<decode_bin> finding factories
0:00:31.985098250  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1382:gst_decode_bin_autoplug_factories:<decode_bin> autoplug-factories returns 1910EF40
0:00:32.160122982  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1903:connect_pad:<decode_bin> pad typefind:src , chain:191E3260, 1 factories, caps audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:32.160576394  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1451:copy_sticky_events:<'':decodepad0> store sticky event stream-start event: 191E3188, time 99:99:99.999999999, seq-num 61, GstEventStreamStart, stream-id=(string)a15bd26b64105f5fff81ebd64d919ecd, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;
0:00:32.160992419  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1451:copy_sticky_events:<'':decodepad0> store sticky event caps event: 191E3218, time 99:99:99.999999999, seq-num 63, GstEventCaps, caps=(GstCaps)"audio/ms-gsm\,\ rate\=\(int\)8000\,\ channels\=\(int\)1";
0:00:32.360019031  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1398:gst_decode_bin_autoplug_select:<decode_bin> default autoplug-select returns TRY
0:00:32.360145855  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2033:connect_pad:<decode_bin> autoplug select requested try
0:00:32.360379708  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1440:clear_sticky_events:<'':decodepad0> clearing sticky event stream-start event: 191E3188, time 99:99:99.999999999, seq-num 61, GstEventStreamStart, stream-id=(string)a15bd26b64105f5fff81ebd64d919ecd, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;
0:00:32.360796100  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1440:clear_sticky_events:<'':decodepad0> clearing sticky event caps event: 191E3218, time 99:99:99.999999999, seq-num 63, GstEventCaps, caps=(GstCaps)"audio/ms-gsm\,\ rate\=\(int\)8000\,\ channels\=\(int\)1";
0:00:32.560556894  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2326:connect_element:<decode_bin> Attempting to connect element avdec_gsm_ms0 [chain:191E3260] further
0:00:32.560711209  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2339:connect_element:<decode_bin> got a source pad template src
0:00:32.560826303  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2350:connect_element:<decode_bin> got the pad for always template src
0:00:32.560971453  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:1493:analyze_new_pad:<decode_bin> Pad avdec_gsm_ms0:src caps:audio/x-raw, layout=(string)interleaved, format=(string){ U8, S16LE, S32LE, F32LE, F64LE }
0:00:32.561222901  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:2427:expose_pad:<decode_bin> pad avdec_gsm_ms0:src, chain:191E3260
0:00:32.759962144  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:4263:gst_decode_pad_set_blocked:<'':decodepad0> blocking pad: 1
0:00:32.760084935  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3428:gst_decode_chain_is_complete:<decode_bin> Chain 191E3260 is complete: 0
0:00:32.988153008  9672   19105BA0 DEBUG                 appsrc gstappsrc.c:1564:gst_app_src_push_buffer_full:<app_source> queueing buffer 1DEE5030
0:00:32.988193694  9672   190858F8 DEBUG                 appsrc gstappsrc.c:1079:gst_app_src_create:<app_source> we have buffer 1DEE5030 of size 1625
0:00:32.988604954  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3428:gst_decode_chain_is_complete:<decode_bin><2015-Jun-09 15:04:14.286245> - DATA_REQUESTS: Successfully passed buffer in to Application Source. For Record ID:  21 With timestamp: 0
Chain 191E3260 is complete: 1
0:00:33.160074232  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3954:gst_decode_bin_expose:<decode_bin> Exposing currently active chains/groups
0:00:33.160554402  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:4030:gst_decode_bin_expose:<decode_bin> About to expose dpad decodepad0 as src_0
0:00:33.160766996  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3940:debug_sticky_event:<'':src_0> sticky event stream-start
0:00:33.160946968  9672   190858F8 DEBUG              decodebin gstdecodebin2.c:3940:debug_sticky_event:<'':src_0> sticky event caps

Version 1.5.1
0:00:18.940684766  1380   0FD95840 DEBUG               pipeline gstpipeline.c:217:gst_pipeline_init:<GstPipeline at 19EAE098> set bus <bus1> on pipeline
0:00:19.327259372  1380   0FD95840 DEBUG                  queue gstqueue.c:477:gst_queue_init:<GstQueue at 1EFA9FA8> initialized queue's not_empty & not_full conditions
1380   0FD95840 DEBUG                 appsrc gstappsrc.c:1241:gst_app_src_set_caps:<app_source> setting caps to audio/ms-gsm, rate=(int)8000, channels=(int)1
0:00:19.524209159  1380   0FD95840 DEBUG                 appsrc gstappsrc.c:1375:gst_app_src_get_stream_type:<app_source> getting stream_type of 0
0:00:19.524430550  1380   0FD95840 DEBUG                 appsrc gstappsrc.c:1349:gst_app_src_set_stream_type:<app_source> setting stream_type of 1
0:00:19.525703916  1380   0FD95840 DEBUG                 appsrc gstappsrc.c:645:gst_app_src_internal_get_caps:<app_source> caps: (NULL)
0:00:19.526015476  1380   0FD95840 DEBUG                 appsrc gstappsrc.c:645:gst_app_src_internal_get_caps:<app_source> caps: (NULL)
0:00:20.130137677  1380   0FD95840 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:20.130193758  1380   0FD95840 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:20.130611615  1380   0FD95840 DEBUG           audioconvert gstaudioconvert.c:338:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:20.324518007  1380   0FD95840 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:20.324585817  1380   0FD95840 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:20.324950893  1380   0FD95840 DEBUG           audioconvert gstaudioconvert.c:338:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:20.526748193  1380   0FD95840 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:20.526813804  1380   0FD95840 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:20.527093109  1380   0FD95840 DEBUG           audioconvert gstaudioconvert.c:338:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:20.724472116  1380   0FD95840 INFO           audiopanorama audiopanorama.c:324:gst_audio_panorama_transform_caps:<audio_panorama> [0] allow 2 channels
0:00:20.724539193  1380   0FD95840 DEBUG          audiopanorama audiopanorama.c:329:gst_audio_panorama_transform_caps:<audio_panorama> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved
0:00:20.724815932  1380   0FD95840 DEBUG           audioconvert gstaudioconvert.c:338:gst_audio_convert_transform_caps:<audio_convert> transformed audio/x-raw, format=(string){ F32LE, S16LE }, rate=(int)[ 1, 2147483647 ], channels=(int)2, layout=(string)interleaved into audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:20.937147639  1380   19EB55C0 DEBUG               pipeline gstpipeline.c:280:reset_start_time:<audio-pipeline> reset start_time to 0
0:00:20.937632940  1380   19EB55C0 DEBUG                 appsrc gstappsrc.c:813:gst_app_src_start:<app_source> starting
0:00:20.937660798  1380   19EB55C0 DEBUG                 appsrc gstappsrc.c:939:gst_app_src_do_seek:<app_source> seeking to 0, format time
0:00:21.125665869  1380   19EB55C0 DEBUG                 appsrc gstappsrc.c:956:gst_app_src_do_seek:<app_source> flushing queue
0:00:21.126886453  1380   19DD2588 FIXME                default gstutils.c:3761:gst_pad_create_stream_id_internal:<app_source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:21.126947665  1380   19DD2588 DEBUG                 appsrc gstappsrc.c:645:gst_app_src_internal_get_caps:<app_source> caps: (NULL)
0:00:21.524683831  1380   19EB55C0 DEBUG                 appsrc gstappsrc.c:1638:gst_app_src_push_buffer_full:<app_source> queueing buffer 1EFB4010
0:00:21.524725250  1380   19DD2588 DEBUG                 appsrc gstappsrc.c:1138:gst_app_src_create:<app_source> we have buffer 1EFB4010 of size 1625

With version 1.4.5 things carry on from there, the pipeline goes to the Playing state and all works well.  With version 1.5.1 you can see that "gst_app_src_internal_get_caps" returns NULL and nothing ever happens with the decodebin.  My pipeline stays in the CHANGE_ASYNC state and I'm stuck.

Cutting my code down to the pertinent lines, I am setting the caps like so:

const std::string AudioCaps::m_Capabilities_gsm = "audio/ms-gsm, rate=8000, channels=1";
GstCaps * m_GSMCaps = gst_caps_from_string(m_Capabilities_gsm.c_str());
g_object_set(m_AppSrc, "caps", m_GSMCaps, NULL);

Has something changed between versions as far as how caps need to be set for an appsrc?  I tried looking at the git commit log for appsrc and gstcaps, but nothing stood out to me.  Anyone have any ideas?

Thanks,
Matt Zawojski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150612/e2633394/attachment-0001.html>


More information about the gstreamer-devel mailing list