Expose ms2 MS_VIDEO_DECODER_FIRST_IMAGE_DECODED event to application

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2012-03-26 15:22:20 +02:00
parent 35ab327fb2
commit 8ffeb3eb7c
3 changed files with 12 additions and 3 deletions

View file

@ -842,12 +842,18 @@ static void rendercb(void *data, const MSPicture *local, const MSPicture *remote
#ifdef VIDEO_ENABLED
static void video_stream_event_cb(void *user_pointer, const MSFilter *f, const unsigned int event_id, const void *args){
LinphoneCall* call = (LinphoneCall*) user_pointer;
ms_warning("In linphonecall.c: video_stream_event_cb");
switch (event_id) {
case MS_VIDEO_DECODER_DECODING_ERRORS:
ms_warning("Case is MS_VIDEO_DECODER_DECODING_ERRORS");
linphone_call_send_vfu_request((LinphoneCall*) user_pointer);
linphone_call_send_vfu_request(call);
break;
case MS_VIDEO_DECODER_FIRST_IMAGE_DECODED:
ms_message("First video frame decoded successfully");
if (call->core->vtable.call_first_video_frame != NULL)
call->core->vtable.call_first_video_frame(call->core, call);
break;
default:
ms_warning("Unhandled event %i", event_id);
break;

View file

@ -613,7 +613,9 @@ typedef void (*DtmfReceived)(struct _LinphoneCore* lc, LinphoneCall *call, int d
typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_to);
/** Callback prototype */
typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *lf);
/** Callback prototype */
typedef void (*CallFirstVideoFrameCb)(struct _LinphoneCore *lc, LinphoneCall *call);
/**
* This structure holds all callbacks that the application should implement.
* None is mandatory.
@ -637,6 +639,7 @@ typedef struct _LinphoneVTable{
DisplayUrlCb display_url;
ShowInterfaceCb show; /**< Notifies the application that it should show up*/
CallEncryptionChangedCb call_encryption_changed; /**<Notifies on change in the encryption of call streams */
CallFirstVideoFrameCb call_first_video_frame; /** Notifies on first successful video frame decoding */
} LinphoneCoreVTable;
/**

@ -1 +1 @@
Subproject commit 33599a544a23878604cd42a769c1044d599c1347
Subproject commit ef76a73e369e5afe9d7172b4330ebce2b2aee0ae