Hi again, Lubo, Jean, Emil,
I am now trying to implement JavaEncoder and JavaDecoder based on
JMF(extended from com.ibm.media.codec.audio.AudioCodec), and here are my
1. Except for the method "int process(Buffer input, Buffer output)", which
methods are needed to be overridden in JavaEncoder?
2. In CELT, the decoder is dependent on encoder, e.g. (1). both the
encoder(CELTEncoder) and decoder(CELTDecoder) need to be initialized with
exactly the same mode(CELTMode), otherwise the quality will be very bad.
(2). the number of bytes to read from "data" by clet_decode() method MUST be
exactly the number of bytes returned by the encoder. However, in
JMF,JavaEncoder and JavaDecoder seem to be unrelated with each other. How to
solve these problems?
3. celt_encode() encodes one frame once, but i am not very sure about the
process unit of process() in JavaEncoder. Should i process one frame in
process() at a time just like celt_encode() or shoud i process the whole
audio stream in process()? In my opinion, i think the former sounds
4. Before celt_encode can work, a CELTMode and a CELTEncoder should be
constructed and parameters such as sample rate, frame size, channels should
be supplied. This information is specified in the audio format of the input
stream. Since the input buffer is only accessible in process(Buffer input,
Buffer output), how to get this information prior to the call of process() ?
5. AudioFormat. The requirement of CELT is sample rate, frame size,
channels, bytes per frame, but frame size and bytes per frame don't have
correspondence member in AudioFormat. So how to set the input format and
supported format in JavaEncoder? And in the constructor AudioFormat(String
encoding), what's the proper value of encoding for CELT?
Thanks in advance.