Commit bd9611a0 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed MediaCodec filter name for encoder & decoder + don't delete file when...

Fixed MediaCodec filter name for encoder & decoder + don't delete file when cancelling outgoing file transfer anymore
parent d5dfd232
......@@ -27,6 +27,7 @@ This changelog file was started on October 2019. Previous changes were more or l
- Real time text related function linphone_chat_message_get_char() now will always return the new line character,
which wasn't the case before if the getChar() was done after the composing callback was triggered for this character.
- linphone_core_interpret_url() will unescape characters first if possible if only a username is given as input parameter.
- linphone_chat_message_cancel_file_transfer() no longer deletes the file for outgoing messages.
### Fixed
- Internal refactoring of management of locally played tones, in order to fix race conditions.
......@@ -34,6 +35,7 @@ This changelog file was started on October 2019. Previous changes were more or l
- Error IMDN in LIME chat rooms not properly sent.
- Chat message lost during attachment auto download if Core stopped during the process.
- Windows tests.
- Name of MediaCodec encoder and decoder filters in H264Helper Java class.
## [4.4.0] 2020-06-16
......
......@@ -31,8 +31,8 @@ import org.linphone.mediastream.Log;
public class H264Helper {
private static String FILTER_NAME_OPENH264_ENC = "MSOpenH264Enc" ;
private static String FILTER_NAME_OPENH264_DEC = "MSOpenH264Dec" ;
private static String FILTER_NAME_MEDIA_CODEC_ENC = "MSMediaCodecH264Enc" ;
private static String FILTER_NAME_MEDIA_CODEC_DEC = "MSMediaCodecH264Dec" ;
private static String FILTER_NAME_MEDIA_CODEC_ENC = "MediaCodecH264Encoder" ;
private static String FILTER_NAME_MEDIA_CODEC_DEC = "MediaCodecH264Decoder" ;
public static String MODE_AUTO = "Auto" ;
public static String MODE_OPENH264 = "OpenH264" ;
......
......@@ -1108,19 +1108,31 @@ void FileTransferChatMessageModifier::cancelFileTransfer () {
}
if (!belle_http_request_is_cancelled(httpRequest)) {
shared_ptr<ChatMessage> message = chatMessage.lock();
if (message) {
lInfo() << "Canceling file transfer " << currentFileContentToTransfer->getFilePath();
lWarning() << "Deleting incomplete file " << currentFileContentToTransfer->getFilePath();
int result = unlink(currentFileContentToTransfer->getFilePath().c_str());
if (result != 0) {
lError() << "Couldn't delete file " << currentFileContentToTransfer->getFilePath() << ", errno is " << result;
if (currentFileContentToTransfer) {
string filePath = currentFileContentToTransfer->getFilePath();
if (!filePath.empty()) {
lInfo() << "Canceling file transfer using file: " << filePath;
shared_ptr<ChatMessage> message = chatMessage.lock();
if (message && message->getDirection() == ChatMessage::Direction::Incoming) {
lWarning() << "Deleting incomplete file " << filePath;
int result = unlink(filePath.c_str());
if (result != 0) {
lError() << "Couldn't delete file " << filePath << ", errno is " << result;
}
} else {
lWarning() << "http request still running for ORPHAN msg: this is a memory leak";
}
} else {
lInfo() << "Cancelling file transfer.";
}
} else {
lInfo() << "Warning: http request still running for ORPHAN msg: this is a memory leak";
lWarning() << "Found a http request for file transfer but no Content";
}
belle_http_provider_cancel_request(provider, httpRequest);
}
releaseHttpRequest();
}
......
......@@ -31,8 +31,8 @@ import org.linphone.core.tools.Log;
public class H264Helper {
private static String FILTER_NAME_OPENH264_ENC = "MSOpenH264Enc";
private static String FILTER_NAME_OPENH264_DEC = "MSOpenH264Dec";
private static String FILTER_NAME_MEDIA_CODEC_ENC = "MSMediaCodecH264Enc";
private static String FILTER_NAME_MEDIA_CODEC_DEC = "MSMediaCodecH264Dec";
private static String FILTER_NAME_MEDIA_CODEC_ENC = "MediaCodecH264Encoder";
private static String FILTER_NAME_MEDIA_CODEC_DEC = "MediaCodecH264Decoder";
public static String MODE_AUTO = "Auto";
public static String MODE_OPENH264 = "OpenH264";
......
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