diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-06-20 15:39:07 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-06-20 15:39:07 +0000 |
commit | e03158426d316085bbec3088f3a54004dc832a0e (patch) | |
tree | bf745f7af641d801e7bc9cd8857da6d63ab22cd1 /pjsip-apps/src | |
parent | e120cd2fd516294025fb23da7403ceac296e2411 (diff) |
Yet again large diffs because of documentation/doxygen update
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@531 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src')
-rw-r--r-- | pjsip-apps/src/samples/confbench.c | 19 | ||||
-rw-r--r-- | pjsip-apps/src/samples/confsample.c | 12 | ||||
-rw-r--r-- | pjsip-apps/src/samples/level.c | 13 | ||||
-rw-r--r-- | pjsip-apps/src/samples/playfile.c | 16 | ||||
-rw-r--r-- | pjsip-apps/src/samples/playsine.c | 12 | ||||
-rw-r--r-- | pjsip-apps/src/samples/recfile.c | 13 | ||||
-rw-r--r-- | pjsip-apps/src/samples/resampleplay.c | 12 | ||||
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 1 | ||||
-rw-r--r-- | pjsip-apps/src/samples/sipstateless.c | 13 | ||||
-rw-r--r-- | pjsip-apps/src/samples/sndtest.c | 15 | ||||
-rw-r--r-- | pjsip-apps/src/samples/streamutil.c | 12 |
11 files changed, 125 insertions, 13 deletions
diff --git a/pjsip-apps/src/samples/confbench.c b/pjsip-apps/src/samples/confbench.c index 2dae32b7..26a0fac6 100644 --- a/pjsip-apps/src/samples/confbench.c +++ b/pjsip-apps/src/samples/confbench.c @@ -17,11 +17,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* + +/** + * \page page_pjmedia_samples_confbench_c Samples: Benchmarking Conference Bridge + * * Benchmarking pjmedia (conference bridge+resample). For my use only, * and it only works in Win32. + * + * This file is pjsip-apps/src/samples/confbench.c + * + * \includelineno confbench.c */ + #include <pjmedia.h> #include <pjlib-util.h> /* pj_getopt */ #include <pjlib.h> @@ -38,8 +46,8 @@ * HAS_RESAMPLE will activate resampling on about half * the port. */ -#define TEST_SET SMALL_SET -#define HAS_RESAMPLE 1 +#define TEST_SET LARGE_SET +#define HAS_RESAMPLE 0 #define SMALL_SET 16 @@ -265,7 +273,10 @@ int main() return 1; } + printf("Resampling is %s\n", (HAS_RESAMPLE?"active":"disabled")); + /* Create Null ports */ + printf("Creating %d null ports..\n", NULL_COUNT); for (i=0; i<NULL_COUNT; ++i) { status = pjmedia_null_port_create(pool, CLOCK_RATE, 1, SAMPLES_PER_FRAME*2, 16, &nulls[i]); PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1); @@ -275,6 +286,7 @@ int main() } /* Create sine ports. */ + printf("Creating %d sine generator ports..\n", SINE_COUNT); for (i=0; i<SINE_COUNT; ++i) { unsigned j, slot; @@ -304,6 +316,7 @@ int main() } /* Create idle ports */ + printf("Creating %d idle ports..\n", IDLE_COUNT); for (i=0; i<IDLE_COUNT; ++i) { pjmedia_port *dummy; status = pjmedia_null_port_create(pool, CLOCK_RATE, 1, SAMPLES_PER_FRAME, 16, &dummy); diff --git a/pjsip-apps/src/samples/confsample.c b/pjsip-apps/src/samples/confsample.c index 7ae80cdc..d87a916a 100644 --- a/pjsip-apps/src/samples/confsample.c +++ b/pjsip-apps/src/samples/confsample.c @@ -26,6 +26,18 @@ #include "util.h" +/** + * \page page_pjmedia_samples_confsample_c Samples: Using Conference Bridge + * + * Sample to mix multiple files in the conference bridge and play the + * result to sound device. + * + * This file is pjsip-apps/src/samples/confsample.c + * + * \includelineno confsample.c + */ + + /* For logging purpose. */ #define THIS_FILE "confsample.c" diff --git a/pjsip-apps/src/samples/level.c b/pjsip-apps/src/samples/level.c index e2169841..dcf6499d 100644 --- a/pjsip-apps/src/samples/level.c +++ b/pjsip-apps/src/samples/level.c @@ -17,6 +17,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/** + * \page page_pjmedia_samples_level_c Samples: Reading from WAV File + * + * This is a very simple example to use the @ref PJMEDIA_FILE_PLAY, to + * directly read the samples from the file. + * + * This file is pjsip-apps/src/samples/level.c + * + * \includelineno level.c + */ + + static const char *desc = " FILE: \n" " level.c \n" diff --git a/pjsip-apps/src/samples/playfile.c b/pjsip-apps/src/samples/playfile.c index 5b26cd57..754304b3 100644 --- a/pjsip-apps/src/samples/playfile.c +++ b/pjsip-apps/src/samples/playfile.c @@ -26,6 +26,22 @@ #include "util.h" +/** + * \page page_pjmedia_samples_playfile_c Samples: Playing WAV File to Sound Device + * + * This is a very simple example to use the @ref PJMEDIA_FILE_PLAY and + * @ref PJMED_SND_PORT. In this example, we open both the file and sound + * device, and connect the two of them, and voila! Sound will be playing + * the contents of the file. + * + * @see page_pjmedia_samples_recfile_c + * + * This file is pjsip-apps/src/samples/playfile.c + * + * \includelineno playfile.c + */ + + /* * playfile.c * diff --git a/pjsip-apps/src/samples/playsine.c b/pjsip-apps/src/samples/playsine.c index 931f9123..ae4bec8c 100644 --- a/pjsip-apps/src/samples/playsine.c +++ b/pjsip-apps/src/samples/playsine.c @@ -17,6 +17,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/** + * \page page_pjmedia_samples_playsine_c Samples: Using Custom Ports (Sine Wave Generator) + * + * This example demonstrate how to create a custom media port (in this case, a + * sine wave generator) and connect it to the sound device. + * + * This file is pjsip-apps/src/samples/playsine.c + * + * \includelineno playsine.c + */ + /* * playsine.c * diff --git a/pjsip-apps/src/samples/recfile.c b/pjsip-apps/src/samples/recfile.c index 2236dcad..29aa8324 100644 --- a/pjsip-apps/src/samples/recfile.c +++ b/pjsip-apps/src/samples/recfile.c @@ -17,6 +17,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/** + * \page page_pjmedia_samples_recfile_c Samples: Capturing Audio to WAV File + * + * In this example, we capture audio from the sound device and save it to + * WAVE file. + * + * @see page_pjmedia_samples_playfile_c + * + * This file is pjsip-apps/src/samples/recfile.c + * + * \includelineno recfile.c + */ #include <pjmedia.h> #include <pjlib.h> @@ -26,6 +38,7 @@ /* For logging purpose. */ #define THIS_FILE "recfile.c" + /* Configs */ #define CLOCK_RATE 44100 #define SAMPLES_PER_FRAME (CLOCK_RATE * 20 / 1000) diff --git a/pjsip-apps/src/samples/resampleplay.c b/pjsip-apps/src/samples/resampleplay.c index f8768591..9c7b2f1f 100644 --- a/pjsip-apps/src/samples/resampleplay.c +++ b/pjsip-apps/src/samples/resampleplay.c @@ -16,6 +16,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/** + * \page page_pjmedia_samples_resampleplay_c Samples: Using Resample Port + * + * This example demonstrates how to use @ref PJMEDIA_RESAMPLE_PORT to + * change the sampling rate of the media streams. + * + * This file is pjsip-apps/src/samples/resampleplay.c + * + * \includelineno resampleplay.c + */ + #include <pjmedia.h> #include <pjlib-util.h> #include <pjlib.h> diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index 42709660..4ffe0123 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -20,6 +20,7 @@ + /* Usage */ static const char *USAGE = " PURPOSE: \n" diff --git a/pjsip-apps/src/samples/sipstateless.c b/pjsip-apps/src/samples/sipstateless.c index c3cfe071..4c8354c5 100644 --- a/pjsip-apps/src/samples/sipstateless.c +++ b/pjsip-apps/src/samples/sipstateless.c @@ -103,20 +103,13 @@ int main() /* Create global endpoint: */ { - const pj_str_t *hostname; - const char *endpt_name; - /* Endpoint MUST be assigned a globally unique name. - * The name will be used as the hostname in Warning header. + * Ideally we should put hostname or public IP address, but + * we'll just use an arbitrary name here. */ - /* For this implementation, we'll use hostname for simplicity */ - hostname = pj_gethostname(); - endpt_name = hostname->ptr; - /* Create the endpoint: */ - - status = pjsip_endpt_create(&cp.factory, endpt_name, + status = pjsip_endpt_create(&cp.factory, "sipstateless", &sip_endpt); PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1); } diff --git a/pjsip-apps/src/samples/sndtest.c b/pjsip-apps/src/samples/sndtest.c index 2c469775..c2b75b99 100644 --- a/pjsip-apps/src/samples/sndtest.c +++ b/pjsip-apps/src/samples/sndtest.c @@ -17,6 +17,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/** + * \page page_pjmedia_samples_sndtest_c Samples: Sound Card Benchmark + * + * This example can be used to benchmark the quality of the sound card + * installed in the system. At the end of the test, it will report + * the jitter and clock drifts of the device. + * + * This file is pjsip-apps/src/samples/sndtest.c + * + * Screenshots on WinXP: \image html sndtest.jpg + * + * \includelineno sndtest.c + */ + + #include <pjmedia.h> #include <pjlib.h> #include <pjlib-util.h> diff --git a/pjsip-apps/src/samples/streamutil.c b/pjsip-apps/src/samples/streamutil.c index 29ba520e..4609df0b 100644 --- a/pjsip-apps/src/samples/streamutil.c +++ b/pjsip-apps/src/samples/streamutil.c @@ -18,6 +18,18 @@ */ +/** + * \page page_pjmedia_samples_streamutil_c Samples: Remote Streaming + * + * This example mainly demonstrates how to stream media file to remote + * peer using RTP. + * + * This file is pjsip-apps/src/samples/streamutil.c + * + * \includelineno streamutil.c + */ + + static const char *desc = " streamutil \n" " \n" |