recorder.h 3.16 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
/*
recorder.h
Copyright (C) 2010-2018 Belledonne Communications SARL

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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef LINPHONE_RECORDER_H_
#define LINPHONE_RECORDER_H_


#include "linphone/types.h"
#include "mediastreamer2/msinterfaces.h"


#ifdef __cplusplus
extern "C" {
#endif


/**
 * @addtogroup call_control
 * @{
 */

/**
 * Acquire a reference to the recorder.
 * @param[in] recorder #LinphoneRecorder object.
 * @return The same #LinphoneRecorder object.
**/
LINPHONE_PUBLIC LinphoneRecorder * linphone_recorder_ref(LinphoneRecorder *recorder);

/**
 * Release reference to the recorder.
 * @param[in] recorder #LinphoneRecorder object.
**/
LINPHONE_PUBLIC void linphone_recorder_unref(LinphoneRecorder *recorder);

/**
 * Retrieve the user pointer associated with the recorder.
 * @param[in] recorder #LinphoneRecorder object.
 * @return The user pointer associated with the recorder.
**/
LINPHONE_PUBLIC void *linphone_recorder_get_user_data(const LinphoneRecorder *recorder);

/**
 * Assign a user pointer to the recorder.
 * @param[in] recorder #LinphoneRecorder object.
 * @param[in] ud The user pointer to associate with the recorder.
**/
LINPHONE_PUBLIC void linphone_recorder_set_user_data(LinphoneRecorder *recorder, void *ud);

/**
 * Open a file for playing.
 * @param[in] obj #LinphoneRecorder object
 * @param[in] filename The path to the file to open
 */
70
LINPHONE_PUBLIC LinphoneStatus linphone_recorder_open(LinphoneRecorder *obj, const char *filename, int device_orientation);
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

/**
 * Start playing a file that has been opened with linphone_recorder_open().
 * @param[in] obj #LinphoneRecorder object
 * @return 0 on success, a negative value otherwise
 */
LINPHONE_PUBLIC LinphoneStatus linphone_recorder_start(LinphoneRecorder *obj);

/**
 * Pause the playing of a file.
 * @param[in] obj #LinphoneRecorder object
 * @return 0 on success, a negative value otherwise
 */
LINPHONE_PUBLIC LinphoneStatus linphone_recorder_pause(LinphoneRecorder *obj);

/**
 * Get the current state of a recorder.
 * @param[in] obj #LinphoneRecorder object
 * @return The current state of the recorder.
 */
LINPHONE_PUBLIC LinphoneRecorderState linphone_recorder_get_state(LinphoneRecorder *obj);

/**
 * Close the opened file.
 * @param[in] obj #LinphoneRecorder object
 */
LINPHONE_PUBLIC void linphone_recorder_close(LinphoneRecorder *obj);

99 100 101 102 103 104
/**
 * Close the opened file.
 * @param[in] obj #LinphoneRecorder object
 */
LINPHONE_PUBLIC void linphone_recorder_remove_file(LinphoneRecorder *obj, const char *filename);

105 106 107 108 109
#ifdef __cplusplus
}
#endif

#endif /* LINPHONE_RECORDER_H_ */