回复: 回复: 回复: (no subject )

"烂馍馍." <[email protected]> Wed, 7 Dec 2011 16:14:32 +0800
Newsgroups gmane.comp.audio.compression.speex.devel
Message-ID <[email protected]>
Hi, i think it will work correct.when one thread use encode,the others wait for.
in java, i think we can do like this:
synchronized (Encode) {
        Encode.encode(short[] in, byte[] out);
}

In the doc of speex: it says the speex is not thread-safe.
 
------------------ 原始邮件 ------------------
发件人: "Денис Ромашенко"<[email protected]>;
发送时间: 2011年12月7日(星期三) 下午4:00
收件人: "烂馍馍."<[email protected]>; 
抄送: "Jean-Marc Valin"<[email protected]>; "speex-dev"<[email protected]>; 
主题: Re: [Speex-dev] 回复: 回复: (no subject)

 
I'll try to explain. I want to create dll with only one function "Encode" that will encode file to speex format. In my application I will use this function from 16 threads, if it will work correct?
 
2011/12/6 烂馍馍. <[email protected]>
 

 two thread send frames to only encoder at same time,two thread will use one buffer
.it will work wrong if not Handling thread synchronization.
 if not use same state, it need more memory, but no need to consider thread safe.
 
 ------------------ 原始邮件 ------------------
发件人: "Jean-Marc Valin"<[email protected]>;
 发送时间: 2011年12月6日(星期二) 下午3:24
收件人: ""烂馍馍.""<[email protected]>; 
 抄送: "speex-dev"<[email protected]>; 
主题: Re: 回复: [Speex-dev] (no subject)

 
Well, please explain what you would expect from a "thread safe" codec
 when you encode two frames at a time from the same encoder.

	Jean-Marc

On 11-12-05 11:56 PM, 烂馍馍. wrote:
> yes, you are right.but its not one instance of codec.
>  
>  
> ------------------ 原始邮件 ------------------
 > *发件人:* "Jean-Marc Valin"<[email protected]>;
> *发送时间:* 2011年12月6日(星期二) 中午12:52
 > *收件人:* "speex-dev"<[email protected]>;
> *主题:* Re: [Speex-dev] (no subject)
>  
> Actually, it *is* thread safe as long as you don't use the *same* state
 > at the same time from two calls. i.e. you can easily encode two
> different streams from two different threads.
> 
> Jean-Marc
> 
> On 11-12-01 04:55 AM, 烂馍馍. wrote:
>> it.s not safe.
 >> 
>> 
>> ------------------ Original ------------------
>> *From: * "Денис Ромашенко"<[email protected]>;
>> *Date: * Thu, Dec 1, 2011 04:43 PM
 >> *To: * "speex-dev"<[email protected]>;
>> *Subject: * [Speex-dev] (no subject)
>> 
>> Hi.
>>  Is the speexlib thread safe?
 >>
>> _______________________________________________
>> Speex-dev mailing list
>> [email protected]
>> http://lists.xiph.org/mailman/listinfo/speex-dev
 >>
>>
>>
>> _______________________________________________
>> Speex-dev mailing list
>> [email protected]
>> http://lists.xiph.org/mailman/listinfo/speex-dev
 > _______________________________________________
> Speex-dev mailing list
> [email protected]
> http://lists.xiph.org/mailman/listinfo/speex-dev
 



_______________________________________________
 Speex-dev mailing list
 [email protected]
 http://lists.xiph.org/mailman/listinfo/speex-dev
 




-- 
Regards

[email protected]
DDI (UK) +44(0)1932 773846
DDI (Il) +972(0)722451373
Mobile (Il) +972(0)545549366
 Switchboard (UK) +44(0)1932 779755
Fax (UK) +44(0)1932 780383
Visit us at www.retellrecorders.co.uk 
Retell Ltd, 53 Thames Street, Sunbury on Thames, Middlesex, TW16 5QH England. Company VAT No. GB819112250
 
Registered in England & Wales no. 4871004 Reg Office: Heathrow Business Centre, 65 High Street, Egham, Surrey TW20 9EY 
READ OUR TERMS AND CONDITIONS FOR OUR GOODS AND SERVICES available at www.retellrecorders.co.uk/buy/terms.htm before purchase.
 Please contact us if you do not wish to receive information about Retell's extensive range of call recording equipment.

THIS TRANSMISSION IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. All correspondence and agreement subject to contract. If you are not the intended recipient or employee or agent responsible for delivering the transmission to the intended recipient, please notify us by return.  Any distribution or copying of this document by anyone other than the intended recipient is strictly prohibited.  Retell cannot be held responsible for any alterations made to this document, intentionally or otherwise after transmission. We check all our mail and attachments for viruses using an up to date virus checker, but we cannot guarantee that they are virus free.

_______________________________________________
Speex-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/speex-dev