RV: Re: StreamUtil test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have added created a callback function

static pj_status_t count_looped(){
	printf("PASSAGES %u",count_result);
	if(count_result == 1){
		pj_pool_release( pool );
	    pjmedia_endpt_destroy( med_endpt );
	    pj_caching_pool_destroy( &cp );
		pj_shutdown();

	}else{
	  count_result = count_result + 1;
	  return PJ_SUCCESS;
	}
}

This is the callback function code.

The problem is the pj_shutdown(), when is called, this return an error of
memory readed and the application don't close.

Any idea?

thanks
-----Mensaje original-----
De: cingusoft [mailto:cingusoft at gmail.com] 
Enviado el: jueves, 10 de abril de 2008 9:28
Para: 'pjsip at lists.pjsip.org'
Asunto: Re : Re: [pjsip] StreamUtil test


Hi Nanag 
Thanks for your help!

Only one question.

With pjmedia_wav_player_set_eof_cb() how is possible to stop the execution.

I have added a callback function and with a non-PJ_SUCCESS the application
send a silence but don't exit.
Sorruy for this stupid question but I'm very newbie :-).

Thanks for help

------------------------------

Message: 2
Date: Wed, 9 Apr 2008 15:29:34 +0200
From: "cingusoft" <cingusoft@xxxxxxxxx>
Subject: StreamUtil test
To: <pjsip at lists.pjsip.org>
Message-ID: <017701c89a45$c11fb240$1a04650a at aastra.com>
Content-Type: text/plain; charset="us-ascii"

Hi guys

I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c
example an all work very well.

My question is

The wav file is repited on infinite, have a looping or simillary

How can stop this loop, for example after two loops

 

Sorry for my poor English

 

Bye

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080409/
25437a41/attachment-0001.html 

------------------------------

Message: 3
Date: Wed, 9 Apr 2008 22:03:45 +0700
From: "Nanang Izzuddin" <nanang@xxxxxxxxx>
Subject: Re: StreamUtil test
To: "pjsip list" <pjsip at lists.pjsip.org>
Message-ID:
	<c7f43120804090803m69b9e9cfh53a261e1221a1400 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

You need to modify the code as below:

- To make it play just once (no loop), you can simply modify the
'flags' parameter of pjmedia_wav_player_port_create() from 0 to
PJMEDIA_FILE_NO_LOOP

- To limit the loop once or more, you should provide a callback
function (see pjmedia_wav_player_set_eof_cb()). Every time EOF
condition reached, the callback function will get called. Do counting
inside it, once the desired loop count reached, return non-PJ_SUCCESS
from the callback.

See pjmedia doc for detail.

If you want the app quit after playing finished, you will have to
manage to quit from streamutil app.


Cheers,
nanang


On 09/04/2008, cingusoft <cingusoft at gmail.com> wrote:
>
>
>
>
> Hi guys
>
> I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c
> example an all work very well.
>
> My question is
>
> The wav file is repited on infinite, have a looping or simillary
>
> How can stop this loop, for example after two loops
>
>
>
> Sorry for my poor English
>
>
>
> Bye
>
>
>
>
>
>
> _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>
>  pjsip mailing list
>  pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>



------------------------------

_______________________________________________
pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


End of pjsip Digest, Vol 8, Issue 29
************************************




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux