summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/include/pjmedia')
-rw-r--r--pjmedia/include/pjmedia/codec.h36
-rw-r--r--pjmedia/include/pjmedia/endpoint.h9
-rw-r--r--pjmedia/include/pjmedia/errno.h20
3 files changed, 65 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h
index f10e9ab5..ade7ef46 100644
--- a/pjmedia/include/pjmedia/codec.h
+++ b/pjmedia/include/pjmedia/codec.h
@@ -182,6 +182,27 @@ struct pjmedia_codec_op
pj_status_t (*close)(pjmedia_codec *codec);
+ /**
+ * Instruct the codec to inspect the specified payload/packet and
+ * split the packet info individual frames.
+ *
+ * @param codec The codec instance
+ * @param pkt The input packet.
+ * @param pkt_size Size of the packet.
+ * @param frame_cnt On input, specifies the maximum number of frames
+ * in the array. On output, the codec must fill
+ * with number of frames detected in the packet.
+ * @param frames On output, specifies the frames that have been
+ * detected in the packet.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+ pj_status_t (*get_frames)(pjmedia_codec *codec,
+ void *pkt,
+ pj_size_t pkt_size,
+ unsigned *frame_cnt,
+ pjmedia_frame frames[]);
+
/**
* Instruct the codec to encode the specified input frame.
*
@@ -399,6 +420,21 @@ PJ_DECL(pj_status_t) pjmedia_codec_mgr_enum_codecs( pjmedia_codec_mgr *mgr,
pjmedia_codec_info info[]);
/**
+ * Get default codec param for the specified codec info.
+ *
+ * @param mgr The codec manager.
+ * @param info The codec info, which default parameter's is being
+ * queried.
+ * @param param On return, will be filled with the default codec
+ * parameter.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_mgr_get_default_param(pjmedia_codec_mgr *mgr,
+ const pjmedia_codec_info *info,
+ pjmedia_codec_param *param );
+
+/**
* Request the codec manager to allocate one instance of codec with the
* specified codec info. The codec will enumerate all codec factories
* until it finds factory that is able to create the specified codec.
diff --git a/pjmedia/include/pjmedia/endpoint.h b/pjmedia/include/pjmedia/endpoint.h
index 27e8f4bf..da3dbdb8 100644
--- a/pjmedia/include/pjmedia/endpoint.h
+++ b/pjmedia/include/pjmedia/endpoint.h
@@ -118,6 +118,15 @@ PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
pjmedia_sdp_session **p_sdp );
+/**
+ * Dump media endpoint capabilities.
+ *
+ * @param endpt The media endpoint.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt);
+
PJ_END_DECL
diff --git a/pjmedia/include/pjmedia/errno.h b/pjmedia/include/pjmedia/errno.h
index 8e5479aa..28cad73e 100644
--- a/pjmedia/include/pjmedia/errno.h
+++ b/pjmedia/include/pjmedia/errno.h
@@ -248,6 +248,21 @@ PJ_BEGIN_DECL
* Unsupported codec.
*/
#define PJMEDIA_CODEC_EUNSUP (PJMEDIA_ERRNO_START+80) /* 220080 */
+/**
+ * @hideinitializer
+ * Unable to create codec.
+ */
+#define PJMEDIA_CODEC_EFAILED (PJMEDIA_ERRNO_START+81) /* 220081 */
+/**
+ * @hideinitializer
+ * Codec frame is too short.
+ */
+#define PJMEDIA_CODEC_EFRMTOOSHORT (PJMEDIA_ERRNO_START+82) /* 220082 */
+/**
+ * @hideinitializer
+ * PCM buffer is too short.
+ */
+#define PJMEDIA_CODEC_EPCMTOOSHORT (PJMEDIA_ERRNO_START+83) /* 220083 */
/************************************************************
@@ -273,6 +288,11 @@ PJ_BEGIN_DECL
* Missing rtpmap.
*/
#define PJMEDIA_EMISSINGRTPMAP (PJMEDIA_ERRNO_START+103) /* 220103 */
+/**
+ * @hideinitializer
+ * Invalid media type.
+ */
+#define PJMEDIA_EINVALIMEDIATYPE (PJMEDIA_ERRNO_START+104) /* 220104 */