Dear Stefan,

Please ignore my last mail. I typed that too soon. It turned out function
needs to be defined in some other interfaces also. I am able to compile
now. Will keep updated.

Regards,

John



On Mon, Sep 29, 2014 at 4:02 PM, John Nash <[email protected]> wrote:

> OK I implemented function void DSMCall::playFile_precoded(const string&
> name, bool loop, bool front) and built dsm.so module and tried loading sems
> but hit an error
>  ERROR: could not find action for
> 'playFile_precoded("/usr/local/lib/sems/audio/min_ivr/demo.predef")'
> (missing import?)
>
> As this function is in DSMCALL.cpp and DSMCALL.h it should be able to
> parse right?
>
> On Mon, Sep 29, 2014 at 1:12 PM, Stefan Sayer <[email protected]>
> wrote:
>
>> John Nash wrote on 09/28/2014 06:11 AM:
>> > Sorry i was busy working something else last few days. I have started
>> > going through the code before changes. Before I go and start making
>> > mess in stable code I want to be clear on what I am doing.
>> >
>> > In prerecorded application I think following lines are responsible to
>> > finally play a file.
>> >
>> > 1- file->open() ---- Open the file of correct codec as per payload-type.
>> > 2- setOutput(file); ---- It i think copies the buffer into session to
>> > finally play.
>> not really, it sets the pointer of the session's output so that when
>> audio is requested its read from there
>>
>> > 3- AmSession::onSessionStart(); ---- This starts playing the file.
>> >
>> > Now the real reason i want to implement this in playfile() function of
>> > DSM.cpp because I want to use playfile_precoded (Lets say) multiple
>> > times (I want to play files like "You.g729", then "have.g729" then
>> > "Hundred.g729"...and so on.
>> >
>> > If we maky a playfile_precoded() it will be like this ...
>> > {
>> >
>> > AmPrecodedFileInstance* file =
>> > file_def->getFileInstance(RTPStream()->getPayloadType());
>> > if (!file) {
>> > ERROR("no payload\n");
>> > }
>> > if (!file || file->open()) {
>> > ERROR("PrecodedDialog::onSessionStart: Cannot open file\n");
>> > dlg->bye();
>> > setStopped();
>> > return;
>> > }
>> >
>> > setOutput(file);
>> >
>> > }
>> >
>> > But if i call this function multiple times wouldn't it set buffer to
>> > last file?.. There should be some kind of queue to really work it out
>> > (Or may be there already is)
>> there is a Playlist already in place for DSM. playFile in DSM just
>> adds them to the playlist, you can simply do the same with a precoded
>> file instance. have a look at the code in DSMCall and DSMCoreModule.
>>
>> >
>> > Also I need to implement Stop Function?
>> already taken care of
>>
>> stefan
>>
>>
>
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to