[asterisk-commits] dlee: branch dlee/playback-controls r389404 - in /team/dlee/playback-controls...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 21 14:11:03 CDT 2013
Author: dlee
Date: Tue May 21 14:10:58 2013
New Revision: 389404
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389404
Log:
Clean up
Modified:
team/dlee/playback-controls/include/asterisk/stasis_app_playback.h
team/dlee/playback-controls/res/res_stasis_playback.c
Modified: team/dlee/playback-controls/include/asterisk/stasis_app_playback.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback-controls/include/asterisk/stasis_app_playback.h?view=diff&rev=389404&r1=389403&r2=389404
==============================================================================
--- team/dlee/playback-controls/include/asterisk/stasis_app_playback.h (original)
+++ team/dlee/playback-controls/include/asterisk/stasis_app_playback.h Tue May 21 14:10:58 2013
@@ -66,7 +66,7 @@
/*! Fast forward playback. */
STASIS_PLAYBACK_FORWARD,
/*! Enum end sentinel. */
- STASIS_PLAYBACK_OPER_MAX,
+ STASIS_PLAYBACK_MEDIA_OP_MAX,
};
/*!
@@ -78,7 +78,7 @@
*
* \param control Control for \c res_stasis.
* \param file Base filename for the file to play.
- * \param language Spoken language of the file to play.
+ * \param language Selects the file based on language.
* \param skipms Number of milliseconds to skip for forward/reverse operations.
* \param offsetms Number of milliseconds to skip before playing.
* \return Playback control object.
@@ -129,11 +129,11 @@
*
* \param playback Playback control object.
* \param control Media control operation.
- * \return 0 on success.
- * \return -1 Playback isn't in a valid state for the operation.
- * \return -2 Operation failed.
+ * \return \c STASIS_PLAYBACK_OPER_OK on success.
+ * \return \ref stasis_playback_oper_results indicating failure.
*/
-int stasis_app_playback_operation(struct stasis_app_playback *playback,
+enum stasis_playback_oper_results stasis_app_playback_operation(
+ struct stasis_app_playback *playback,
enum stasis_app_playback_media_operation operation);
/*!
Modified: team/dlee/playback-controls/res/res_stasis_playback.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback-controls/res/res_stasis_playback.c?view=diff&rev=389404&r1=389403&r2=389404
==============================================================================
--- team/dlee/playback-controls/res/res_stasis_playback.c (original)
+++ team/dlee/playback-controls/res/res_stasis_playback.c Tue May 21 14:10:58 2013
@@ -390,7 +390,7 @@
* \brief A sparse array detailing how commands should be handled in the
* various playback states. Unset entries imply invalid operations.
*/
-playback_opreation_cb operations[STASIS_PLAYBACK_STATE_MAX][STASIS_PLAYBACK_OPER_MAX] = {
+playback_opreation_cb operations[STASIS_PLAYBACK_STATE_MAX][STASIS_PLAYBACK_MEDIA_OP_MAX] = {
[STASIS_PLAYBACK_STATE_QUEUED][STASIS_PLAYBACK_STOP] = playback_cancel,
[STASIS_PLAYBACK_STATE_QUEUED][STASIS_PLAYBACK_RESTART] = playback_noop,
@@ -410,7 +410,8 @@
[STASIS_PLAYBACK_STATE_STOPPED][STASIS_PLAYBACK_STOP] = playback_noop,
};
-int stasis_app_playback_operation(struct stasis_app_playback *playback,
+enum stasis_playback_oper_results stasis_app_playback_operation(
+ struct stasis_app_playback *playback,
enum stasis_app_playback_media_operation operation)
{
playback_opreation_cb cb;
@@ -418,7 +419,7 @@
ast_assert(playback->state >= 0 && playback->state < STASIS_PLAYBACK_STATE_MAX);
- if (operation < 0 || operation >= STASIS_PLAYBACK_OPER_MAX) {
+ if (operation < 0 || operation >= STASIS_PLAYBACK_MEDIA_OP_MAX) {
ast_log(LOG_ERROR, "Invalid playback operation %d\n", operation);
return -1;
}
More information about the asterisk-commits
mailing list