Sending my own audio frames

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

 



 
Thanks for your anwser Norman.
 
You are using a very diferent approach from mine. Could you provide some more information ( or some source code ) ?
 
My DirectShow sound reading routines are pushing audio frames that i need to send throw PJSIP.
 
So i need to call put_frame on a media port.
How did you created this "Passive" port ?
 
You also add it to the conference bridge, right ?
 
Thanks in advance...
 
Rafael Maia
 


From: norman@myasd.comTo: pjsip at lists.pjsip.orgDate: Fri, 9 Jan 2009 12:17:19 -0500Subject: Re: Sending my own audio framesI use pjmedia_port_info_init to create a player port. Something like this:


    pool = pjsua_pool_create("MyPlayerPool", 4000, 4000);
    pj_strdup2(pool, &base.info.name, "MyPlayer");

    base.get_frame = &file_get_frame_get;
    base.put_frame = &file_put_frame_get;
    base.on_destroy = &file_on_destroy_get;

    pjmedia_port_info_init(&base.info, &name, SIGNATURE, sampling_rate, channel_count, bits_per_sample, samples_per_frame);


This works well for playing files in a non-standard format that I need to support. You put your sample generation code in file_get_frame_get.




Norman Franke
Answering Service for Directors, Inc.
www.myasd.com

On Jan 9, 2009, at 9:24 AM, Rafael Maia wrote:

 Hi, i made a media player in DirectShow that captures PCM audio frames from mp3 audio files. I need to send this audio frames to PJSIP. Can anyone help me? I have tried adding a passive_port to the conference bridge and it did not worked. Now i am trying to use splitcomb. And i can send some noise. Here's a code sample: // 1? pjmedia_splitcom_createpj_status_t status = pjmedia_splitcomb_create(pool_vars, nSamplesPerSec, nChannels, samplesPerFrame, wBitsPerSample, 0, &p_splitcomb);// for each channelfor(unsigned int i = 0; i < nChannels; i++)  {     unsigned int p_slot;     pjmedia_port* p_port;      // 2? pjmedia_splitcom_create_rev_channel     status = pjmedia_splitcomb_create_rev_channel(pool_vars, p_splitcomb, i, 0, &p_port);      // 3? pjmedia_conf_add_port     status = pjmedia_conf_add_port(conference_bridge, pool_vars, p_port, NULL, &p_slot);}  And then, when i want to send an audio frame i do the following: pjmedia_port_put_frame(p_splitcomb, &frame);   What is wrong with my code?Am i using splitcom correctly? Any help would be appreciated... Rafael Maia 

O jeito mais f?cil de manter a sua lista de amigos sempre em ordem! Organize seus contatos!_______________________________________________Visit our blog: http://blog.pjsip.orgpjsip mailing listpjsip at lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_________________________________________________________________
Confira v?deos com not?cias do NY Times, gols direto do Lance, videocassetadas e muito mais no MSN Video!
http://video.msn.com/?mkt=pt-br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090109/6a354bd0/attachment-0001.html>


[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