summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-15 19:32:41 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-15 19:32:41 +0000
commitb50cc8a5b479f2bece31381846bc5c63c5e8cdff (patch)
treefafd368e9eaa885ee96b4bab4bd1d95f62cfcf10 /pjmedia/include
parent4bffa85a3577b72dab0141c44da5ca57914aec1f (diff)
Added Null port, and changed conference so that it does not call port get_frame() when there is no listener on the port
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@318 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia.h1
-rw-r--r--pjmedia/include/pjmedia/null_port.h53
2 files changed, 54 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia.h b/pjmedia/include/pjmedia.h
index 29e9503e..59ec1a6d 100644
--- a/pjmedia/include/pjmedia.h
+++ b/pjmedia/include/pjmedia.h
@@ -32,6 +32,7 @@
#include <pjmedia/file_port.h>
#include <pjmedia/g711.h>
#include <pjmedia/jbuf.h>
+#include <pjmedia/null_port.h>
#include <pjmedia/port.h>
#include <pjmedia/rtcp.h>
#include <pjmedia/rtp.h>
diff --git a/pjmedia/include/pjmedia/null_port.h b/pjmedia/include/pjmedia/null_port.h
new file mode 100644
index 00000000..c4f7c071
--- /dev/null
+++ b/pjmedia/include/pjmedia/null_port.h
@@ -0,0 +1,53 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_NULL_PORT_H__
+#define __PJMEDIA_NULL_PORT_H__
+
+/**
+ * @file null_port.h
+ * @brief Null media port.
+ */
+#include <pjmedia/port.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create Null port.
+ *
+ * @param sampling_rate Sampling rate of the port.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample Number of bits per sample.
+ * @param p_port Pointer to receive the port instance.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool,
+ unsigned sampling_rate,
+ unsigned samples_per_frame,
+ unsigned bits_per_sample,
+ pjmedia_port **p_port );
+
+
+
+PJ_END_DECL
+
+
+#endif /* __PJMEDIA_NULL_PORT_H__ */