PJMEDIA and PJMEDIA-CODEC Examples
Please find below some PJMEDIA related examples that may help in giving some more info:
This is a good place to start learning about Media Ports Framework, as it shows that Media Ports Framework are only "passive" objects with
put_frame() interface, and someone has to call these to retrieve/store media frames.
This example shows that when application connects a media port (in this case a AVI File Player) to Sound Device Port, media will flow automatically since the Sound Device Port provides Clock/Timing.
Demonstrates how to capture audio from microphone to WAV file.
Demonstrates how to create a custom Media Ports Framework (in this case a sine wave generator) and integrate it to PJMEDIA.
This demonstrates how to use the Conference Bridge. The sample program can open multiple WAV files, and instruct the conference bridge to mix the signal before playing it to the sound device.
I use this to benchmark/optimize the conference bridge algorithm, but readers may find the source useful.
Demonstrates how to use Resample Port to change the sampling rate of a media port (in this case, a AVI File Player).
This program performs some tests to the sound device to get some quality parameters (such as sound jitter and clock drifts).
Screenshots on WinXP:
sndtest screenshot on WinXP
This example mainly demonstrates how to stream media (in this case a AVI File Player) to remote peer using RTP.
This is a useful program (integrated with PJSIP) to actively measure the network quality/impairment parameters by making one or more SIP calls (or receiving one or more SIP calls) and display the network impairment of each stream direction at the end of the call. The program is able to measure network quality parameters such as jitter, packet lost/reorder/duplicate, round trip time, etc.
Note that the remote peer MUST support RTCP so that network quality of each direction can be calculated. Using siprtp for both endpoints is recommended.
Screenshots on WinXP:
siprtp screenshot on WinXP
This is a simple program to generate a tone and write the samples to a raw PCM file. The main purpose of this file is to analyze the quality of the tones/sine wave generated by PJMEDIA tone/sine wave generator.
Play a file to speaker, run AEC, and record the microphone input to see if echo is coming.