Does playbin2 work with alsaspdifsink?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Does playbin2 work with alsaspdifsink?

Akihiro TSUKADA
Hi, all,
I'm writing a small element, (named aac2spdif), which encapsulates AAC ADTS
frames into IEC61937/IEC958 frames, and I have problem in outputting to alsaspdif.
For example,
   uridecodebin uri=file:///foo.aac ! alsaspdifsink
or
   filesrc location=foo.aac ! aacparse ! aac2spdif ! alsaspdifsink
worked, although I had to modify the ranks of some of those elements.  but
  playbin2 uri=file///foo.aac audio-sink=alsaspdifsink
does not work, aborts during PREROLLING, saying like the following.
------------------
.........
0:00:00.053798086 14224      0x1f541b0 DEBUG               playbin2 gstplaybin2.c:2657:no_more_pads_cb:<playbin20> linked type audio/x-raw-, result: 0
0:00:00.053816686 14224      0x1f541b0 DEBUG               playbin2 gstplaybin2.c:2666:no_more_pads_cb:<playbin20> pending 1 > 0
0:00:00.053830766 14224      0x1f541b0 INFO                playbin2 gstplaybin2.c:2695:no_more_pads_cb:<playbin20> setting default audio sink <bin0>
0:00:00.053848046 14224      0x1f541b0 INFO                playbin2 gstplaybin2.c:2706:no_more_pads_cb:<playbin20> setting default video sink (NULL)
ERROR: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0: Internal GStreamer error: pad problem.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
追加のデバッグ情報:[additional debug info]
gstplaysink.c(1885): gen_audio_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0:
Failed to configure the audio sink.
ERROR: pipeline doesn't want to preroll.
---------------
It also says before the above messages,
> 0:00:00.053221521 14224      0x1f541b0 DEBUG               playbin2 gstplaybin2.c:2378:pad_added_cb:<playbin20> pad uridecodebin0:src0 with caps audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 8 ] added in group 0x1fa2ab8

So,
it seems to me that specifying audio-sink property does not affect the caps of playbin2.
Is there any requirement on the elements contained in playbin2
to work properly with alsaspdifsink?

I'm using gstreamer 0.10.31, gst-plugins-base 0.10.31, and gst-plugins-bad 0.10.20
 on Fedora14 x86_64.

regards,
tskd
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Does playbin2 work with alsaspdifsink?

Akihiro TSUKADA
looking through the debug log,
I have noticed that the uridecodebin continued to auto-plug aacparse to the caps
"audio/mpeg, framed=true, mpeg=2", and then, instead of auto-plugging aac2spdif,
it (wrongly) auto-plugged an faad AAC decoder, which outputs the caps "audio/x-raw-...",
 and this caps naturally does not fit to alsaspdif, which requires "audio/x-iec958".

So, uridecodebin selected faad, not aac2spdif, but I assigned them the ranks of
MARGINAL and PRIMARY respectively.  In addition, I specified alsaspdif as an
custom audio-sink, and it requires the caps "audio/x-iec958".....

In order to prevent the above problem, I guess that
uridecodebin must have the "caps" property set in playbin2::activate_group()
or somewhere else. Is this right? or should aac2spdif or aacparse  do something?

Cheers
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Does playbin2 work with alsaspdifsink?

Julien Moutte-2
Hi,

You would need to write an AAC to IEC958 converter and then raise the rank of that element to a higher rank than the AAC decoders. You will also need to make sure it's listed as a decoder otherwise playbin2 will ignore it. That's how we handle SPDIF passthrough for AC3 and DTS in Moovida.

Best regards,
Julien Moutte,
FLUENDO S.A.


On Tue, Feb 8, 2011 at 10:51 AM, Akihiro TSUKADA <[hidden email]> wrote:
looking through the debug log,
I have noticed that the uridecodebin continued to auto-plug aacparse to the caps
"audio/mpeg, framed=true, mpeg=2", and then, instead of auto-plugging aac2spdif,
it (wrongly) auto-plugged an faad AAC decoder, which outputs the caps "audio/x-raw-...",
 and this caps naturally does not fit to alsaspdif, which requires "audio/x-iec958".

So, uridecodebin selected faad, not aac2spdif, but I assigned them the ranks of
MARGINAL and PRIMARY respectively.  In addition, I specified alsaspdif as an
custom audio-sink, and it requires the caps "audio/x-iec958".....

In order to prevent the above problem, I guess that
uridecodebin must have the "caps" property set in playbin2::activate_group()
or somewhere else. Is this right? or should aac2spdif or aacparse  do something?

Cheers
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Does playbin2 work with alsaspdifsink?

Akihiro TSUKADA
Hi, Julien,

Thank you for your comments.
it works now!

> You would need to write an AAC to IEC958 converter and then raise the rank
> of that element to a higher rank than the AAC decoders.

I set the rank of
 AAC to IEC958 converter (aac2spdif): GST_RANK_PRIMARY
and
 faad/ffdec_aac: GST_RANK_MARGINAL
so, the ranks are ok. but I set the klass of aac2spdif as just "Filter/Audio".
Changing "Filter/Audio" to "Decoder/Filter/Audio" was enough.
(though the element is actually a muxer or an encoder;))
I saw the source code of ac3hw but I missed the point.
thanks again for your advice.
# it would be nice if we could somehow configure the rank of elements at runtime.

regards,
tskd
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Does playbin2 work with alsaspdifsink?

Julien Moutte
# it would be nice if we could somehow configure the rank of elements at runtime.


This can also be done my manipulating the registry and reinserting the plugin feature.

Best regards,

 
regards,
tskd
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Does playbin2 work with alsaspdifsink?

Akihiro TSUKADA
> This can also be done my manipulating the registry and reinserting the
> plugin feature.

Do you mean GstRegistry object?
it certainly does, but it seems to require some code to be added.
I meant a gconf like configuration, without adding or modifying code in
applications like totem.
(yes, I misused the word "run-time"...)

best regards,
tskd
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel