BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJMEDIA Reference

PJMEDIA and PJMEDIA-CODEC Examples

PJMEDIA and PJMEDIA-CODEC Examples

Please find below some PJMEDIA related examples that may help in giving some more info:

  • page_pjmedia_samples_level_c
    This is a good place to start learning about Media Ports Framework, as it shows that Media Ports Framework are only "passive" objects with get_frame() and put_frame() interface, and someone has to call these to retrieve/store media frames.
  • page_pjmedia_samples_playfile_c
    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.
  • page_pjmedia_samples_recfile_c
    Demonstrates how to capture audio from microphone to WAV file.
  • page_pjmedia_samples_playsine_c
    Demonstrates how to create a custom Media Ports Framework (in this case a sine wave generator) and integrate it to PJMEDIA.
  • page_pjmedia_samples_confsample_c
    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.
  • page_pjmedia_samples_confbench_c
    I use this to benchmark/optimize the conference bridge algorithm, but readers may find the source useful.
  • page_pjmedia_samples_resampleplay_c
    Demonstrates how to use Resample Port to change the sampling rate of a media port (in this case, a AVI File Player).
  • page_pjmedia_samples_sndtest_c
    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
  • page_pjmedia_samples_streamutil_c
    This example mainly demonstrates how to stream media (in this case a AVI File Player) to remote peer using RTP.
  • page_pjmedia_samples_siprtp_c
    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
  • page_pjmedia_samples_tonegen_c
    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.
  • page_pjmedia_samples_aectest_c
    Play a file to speaker, run AEC, and record the microphone input to see if echo is coming.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.