Daniel Sigurgeirsson wrote:
>  Hi,
>  
> this is still not completely clear to me (but then very few things
> are....). What I do realize (approximately) is that the flow of
> the MEDIA_PLAYFILE_STOP message would probably be as follows:
>  
> - MprFromFile would finish playing (either because there is no more data
> or it was told to stop) so it will send an internal message to:
> -> MpCallFlowGraph who would notify:
> -> CpPhoneMediaInterface which should hold on to the IMediaEventListener
> interface ptr passed to createConnection, this would call the onFileStop
> function in:
> -> SipConnection which would post the MEDIA_PLAYFILE_STOP message to:

No SipConnection wouldn't post it anywhere. It would call
Connection::fireSipXMediaEvent. Connection is parent of SipConnection.
fireSipXMediaEvent then uses TapiMgr singleton to fire the event to
sipxtapi - TapiMgr::getInstance().fireMediaEvent. You don't have to care
where the message goes beyond TapiMgr unless you introduce new events or
some new pointers into the event. Have a look at the SIP pim client
integration patch, it adds a new event type. Look at how it works.

> but I cannot find a simple way for MpCallFlowGraph to notify it's parent
> (assuming that the relationship is like that).
>  
MpCallFlowGraph doesn't have to notify anybody else than
CpPhoneMediaInterface.

> Also, I would really like the MEDIA_PLAYFILE_STOP message to indicate
> how much was actually played (I know that MprFromFile stores it in the
> mFileBufferIndex member variable, seems to be a matter of passing it as
> a parameter with all the messages). This addition would make room for
> functionality like pausing and then restarting, or playing a buffer,
> pausing, and then recording from that position.
>  
This is not a problem, you would just need to pass this new parameter to
message when it "propagates" to SipConnection and modify the sipxtapi
media event structure which holds all data.

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

Reply via email to