If I understand what you mean:

1) I add an array mpMediaEventListeners of IMediaEventListener* to
MpCallFlowGraph.

In MpCallFlowGraph constructor, I initialize the array elements to NULL as
all flowgraph arrays.

2) In MpCallFlowGraph::createConnection( IMediaEventListener*
pMediaEventListener=NULL ), I store pMediaEventListener to the "found
ConnectionId" array slot.

3) In a resource linked to a specific connection such as mpDecodeInBandDtmf,
I send notifications like this:

if( ((MpCallFlowGraph*)mpFlowGraph)->mpMediaEventListeners[mConnectionId] !=
null )
{

((MpCallFlowGraph*)mpFlowGraph)->mpMediaEventListeners[mConnectionId]->onInB
andDtmf(IDevice_Audio, dtmfDigit );
}

The cast from MpFlowGraphBase to MpCallFlowGraph isn't very clean. What
about the "new" resource notification scheme you are all talking about ? I
would also like to use this to get MEDIA_PLAYBUFFER_START/STOP and
MEDIA_PLAYFILE_START/STOP notifications from MprFromFile as it was working
in the sipxtapi-media-update branch...

Regards,

stipus

----- Original Message ----- 
From: "Alexander Chemeris" <[EMAIL PROTECTED]>
To: "stipus" <[EMAIL PROTECTED]>
Cc: "Daniel Sigurgeirsson" <[EMAIL PROTECTED]>;
<[email protected]>
Sent: Wednesday, July 25, 2007 12:52 AM
Subject: Re: [sipxtapi-dev] Inband DTMF revisited


> On 7/24/07, stipus <[EMAIL PROTECTED]> wrote:
> > The only problem I have is with notifications. Currently I added a
> > mpMediaEventListener member to the flowgraph, but this listener should
be
> > set in the InputConnection, as in the case there are several
connections,
> > only the latest connection  will get notified of DTMF media events...
>
> Why could not you add MediaEventListener for each connection similar to
> the way you've added DecodeInBandDtmf decoders? That is with an array.
>
> -- 
> Regards,
> Alexander Chemeris.
>
> SIPez LLC.
> SIP VoIP, IM and Presence Consulting
> http://www.SIPez.com
> tel: +1 (617) 273-4000
>
>
>

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to