[Mplayer-dev-eng] AC3 output.

German Gomez Garcia german at piraos.com
Mon Aug 13 00:56:00 CEST 2001


On 08.12 04:14 Arpi wrote:
> Hi,
> Yes, Peter Niemayer <niemayer at isg.de> sent a patch, but I refused it.
> You should read the list archive back to find the reasons.

	Is there any other method to search the list other than Geocrawler? 
it seems that their search engine is broken??
	
	When searching for peter niemayer in mplayer-dev-eng I get the
following:

Your search for
htsearch detected an error. Please report this to the returned matches
webmaster of this site. The error message is:
Unable to read configuration file '/bigassraid/htdig//conf/11473.conf'

If there is not other way to search the mailing list archive could you
please tell me the main reasons for you refusing his patch? I don't want
to make similar mistakes :-)

> In short:
> - AC3 passthrough code shouldn't be in libac3.
>   libac3 is a software decoder. just memcpy'ing soem buyes shouldn't be
>   there.
	
	Well, in fact I suppose that libac3 is the decoder library for
AC3, so when you need to decode it partially (in fact only reorder some
headers to make it IEC985 compliant) it should be there also, shouldn't
it? I mean I can change two lines in the decode_frame in order to make
AC3 through spdif work, just skip everything but the search for sync and
header building.

>   It should go to dec_audio.c. There is 2 coices:
>    - adding to PCM codec (it already has some support)
>    - adding a new codec, for example HWAC3
>   A simple AC3 frame sync code can be written in 10 lines. I see no
>   sense of using libac3 for this purpose.
>   Btw I think that AC3 stream shouldn't be synced and hacked to work,
>   it's enough to send ac3 starting code once, before the playback starts,
>   and then send the ac3 stream unmodified. So no extra code required.
>   (must be tested, i have no external AC3 decoder)
	
	Uhmm, what happen if you fast forward or rewind the stream?

> - sh_audio->o_bps must be fixed (must be set to compressed ac3 bytes /
> sec)
>   to avoid A-V desync and buffer overflow.
> - as you said too, a control() function should be added to ao_oss.c, to
>   query/set AC3 support.
> - you have to #ifdef AFMT_AC3 constant everywhere, because it isn't
> defined
>   on non-linux systems, and in older linux kernel includes (old
> soundcard.h)

	That was what I was thinking: just change the two lines in the,
decode_frame. In the main.c check for the -spdif option, and check if
/dev/dsp is AFMT_AC3 capable, if it is set some global variable, then
change the two lines in decode_frame so it doesn't "decode" anything
and make some changes in ao_oss to initialize the card correctly and 
write the raw data, really simple and quite easy to review :-)

	- german

-------------------------------------------------------------------------
German Gomez Garcia          | Send email with "SEND GPG KEY" as subject 
<german at piraos.com>          | to receive my GnuPG public key.

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list