summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-09-27 22:49:55 +0000
committerBenny Prijono <bennylp@teluu.com>2006-09-27 22:49:55 +0000
commitf91822a157bb753d4e83d553cb3aa3e4186a33b5 (patch)
tree89e2aaddc8103bdca2997af3db1ca5ba3d242396 /pjmedia/include
parenta018c05e4ebb1b8814c001185fcb61e54499f7d2 (diff)
Added pjmedia_snd_stream_get_info() function.
** NOTE SOUND DEVICE IMPLEMENTORS: YOU'LL NEED TO IMPLEMENT THIS FUNCTION TOO *** git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@744 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/sound.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/sound.h b/pjmedia/include/pjmedia/sound.h
index ecff739a..39c71b92 100644
--- a/pjmedia/include/pjmedia/sound.h
+++ b/pjmedia/include/pjmedia/sound.h
@@ -75,6 +75,24 @@ typedef struct pjmedia_snd_dev_info
} pjmedia_snd_dev_info;
/**
+ * Stream information, can be retrieved from a live stream by calling
+ * #pjmedia_snd_stream_get_info().
+ */
+typedef struct pjmedia_snd_stream_info
+{
+ pjmedia_dir dir; /**< Stream direction. */
+ int play_id; /**< Playback dev id, or -1 for rec only*/
+ int rec_id; /**< Capture dev id, or -1 for play only*/
+ unsigned clock_rate; /**< Actual clock rate. */
+ unsigned channel_count; /**< Number of channels. */
+ unsigned samples_per_frame; /**< Samples per frame. */
+ unsigned bits_per_sample; /**< Bits per sample. */
+ unsigned rec_latency; /**< Record latency, in samples. */
+ unsigned play_latency; /**< Playback latency, in samples. */
+} pjmedia_snd_stream_info;
+
+
+/**
* This callback is called by player stream when it needs additional data
* to be played by the device. Application must fill in the whole of output
* buffer with sound samples.
@@ -232,6 +250,19 @@ PJ_DECL(pj_status_t) pjmedia_snd_open_player( int index,
/**
+ * Get information about live stream.
+ *
+ * @param strm The stream to be queried.
+ * @param i Pointer to stream information to be filled up with
+ * information about the stream.
+ *
+ * @return PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm,
+ pjmedia_snd_stream_info *pi);
+
+
+/**
* Start the stream.
*
* @param stream The recorder or player stream.