mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
linphone_player_open prototype change: adding MSFactory * as parameter.
This commit is contained in:
parent
642a624e59
commit
29f51d8d27
5 changed files with 9 additions and 9 deletions
|
|
@ -627,7 +627,7 @@ typedef struct _LinphonePlayer LinphonePlayer;
|
|||
**/
|
||||
typedef void (*LinphonePlayerEofCallback)(struct _LinphonePlayer *obj, void *user_data);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
|
||||
LINPHONE_PUBLIC int linphone_player_open(MSFactory* f, LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
|
||||
LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj);
|
||||
LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj);
|
||||
LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms);
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
* @param user_data a user-data provided in the callback to help the application to retrieve its context.
|
||||
* @return 0 if successful, -1 otherwise
|
||||
**/
|
||||
int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){
|
||||
int linphone_player_open(MSFactory *f, LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){
|
||||
obj->user_data=user_data;
|
||||
obj->cb=cb;
|
||||
return obj->open(obj,filename, NULL);
|
||||
return obj->open(obj,filename, f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static void drag_data_received(GtkWidget *widget, GdkDragContext *context, gint
|
|||
const char *path=(const char*)data;
|
||||
if (player){
|
||||
if (strstr(path,"file://")==path) path+=strlen("file://");
|
||||
if (linphone_player_open(player,path,on_end_of_play,NULL)==0){
|
||||
if (linphone_player_open(linphone_core_get_factory((void*)linphone_call_get_core(call)),player,path,on_end_of_play,NULL)==0){
|
||||
linphone_player_start(player);
|
||||
}else{
|
||||
GtkWidget *warn=gtk_message_dialog_new(GTK_WINDOW(widget),GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
|
|
|
|||
|
|
@ -2918,7 +2918,7 @@ static void call_with_file_player(void) {
|
|||
player=linphone_call_get_player(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(player);
|
||||
if (player){
|
||||
BC_ASSERT_EQUAL(linphone_player_open(player,hellopath,on_eof,marie),0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory, player,hellopath,on_eof,marie),0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_start(player),0, int, "%d");
|
||||
}
|
||||
/* This assert should be modified to be at least as long as the WAV file */
|
||||
|
|
@ -2984,7 +2984,7 @@ static void call_with_mkv_file_player(void) {
|
|||
player=linphone_call_get_player(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(player);
|
||||
if (player){
|
||||
int res = linphone_player_open(player,hellomkv,on_eof,marie);
|
||||
int res = linphone_player_open(marie->lc->factory, player,hellomkv,on_eof,marie);
|
||||
//if(!ms_filter_codec_supported("opus")) {
|
||||
if(!ms_factory_codec_supported(marie->lc->factory, "opus") && !ms_factory_codec_supported(pauline->lc->factory, "opus")){
|
||||
BC_ASSERT_EQUAL(res, -1, int, "%d");
|
||||
|
|
@ -5048,7 +5048,7 @@ static void call_with_rtp_io_mode(void) {
|
|||
player = linphone_call_get_player(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(player);
|
||||
if (player) {
|
||||
BC_ASSERT_EQUAL(linphone_player_open(player, hellopath, on_eof, marie) , 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory, player, hellopath, on_eof, marie) , 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_start(player) , 0, int, "%d");
|
||||
}
|
||||
|
||||
|
|
@ -5340,7 +5340,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
|
|||
BC_ASSERT_PTR_NOT_NULL(player);
|
||||
if (player) {
|
||||
// This will ask pauline to play the file
|
||||
BC_ASSERT_EQUAL(linphone_player_open(player, hellopath, on_eof, pauline),0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory,player, hellopath, on_eof, pauline),0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_player_start(player), 0, int, "%d");
|
||||
}
|
||||
/* This assert should be modified to be at least as long as the WAV file */
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static void play_file(const char *filename, bool_t supported_format, const char
|
|||
BC_ASSERT_PTR_NOT_NULL(player);
|
||||
if(player == NULL) goto fail;
|
||||
|
||||
res = linphone_player_open(player, filename, eof_callback, &eof);
|
||||
res = linphone_player_open(linphone_core_get_factory((void*)lc_manager->lc), player, filename, eof_callback, &eof);
|
||||
if(supported_format && (audio_codec_supported || video_codec_supported)) {
|
||||
BC_ASSERT_EQUAL(res, 0, int, "%d");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue