Commit 7d16001d authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix creation of player in call.

parent 25e51fc6
......@@ -1048,13 +1048,7 @@ void linphone_call_stop_recording (LinphoneCall *call) {
}
LinphonePlayer *linphone_call_get_player (LinphoneCall *call) {
#if 0
if (!call->player)
call->player=linphone_call_build_player(call);
return call->player;
#else
return nullptr;
#endif
return L_GET_CPP_PTR_FROM_C_OBJECT(call)->getPlayer();
}
bool_t linphone_call_media_in_progress (const LinphoneCall *call) {
......
......@@ -67,6 +67,8 @@ public:
SalCallOp *getOp () const;
void setAudioMuted (bool value);
void createPlayer () const;
private:
/* CallListener */
void onAckBeingSent (LinphoneHeaders *headers) override;
......@@ -89,6 +91,7 @@ private:
LinphoneCore *core = nullptr;
Conference *conference = nullptr;
mutable LinphonePlayer *player = nullptr;
CallCallbackObj nextVideoFrameDecoded;
......
......@@ -103,6 +103,13 @@ int CallPrivate::startInvite (const Address *destination) {
// -----------------------------------------------------------------------------
void CallPrivate::createPlayer () const {
L_Q();
player = linphone_call_build_player(L_GET_C_BACK_PTR(q));
}
// -----------------------------------------------------------------------------
void CallPrivate::onAckBeingSent (LinphoneHeaders *headers) {
if (lcall)
linphone_call_notify_ack_processing(lcall, headers, false);
......@@ -445,6 +452,13 @@ const MediaSessionParams *Call::getParams () const {
return static_cast<const MediaSession *>(d->getActiveSession().get())->getMediaParams();
}
LinphonePlayer *Call::getPlayer () const {
L_D();
if (!d->player)
d->createPlayer();
return d->player;
}
float Call::getPlayVolume () const {
L_D();
return static_cast<const MediaSession *>(d->getActiveSession().get())->getPlayVolume();
......
......@@ -89,6 +89,7 @@ public:
float getMicrophoneVolumeGain () const;
void *getNativeVideoWindowId () const;
const MediaSessionParams *getParams () const;
LinphonePlayer *getPlayer () const;
float getPlayVolume () const;
LinphoneReason getReason () const;
float getRecordVolume () const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment