add jami
This commit is contained in:
63
net-voip/jami-daemon/files/ffmpeg-7.patch
Normal file
63
net-voip/jami-daemon/files/ffmpeg-7.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
diff --git a/src/media/audio/sound/dtmfgenerator.cpp b/src/media/audio/sound/dtmfgenerator.cpp
|
||||
index c05435f66..5b9eca18a 100644
|
||||
--- a/src/media/audio/sound/dtmfgenerator.cpp
|
||||
+++ b/src/media/audio/sound/dtmfgenerator.cpp
|
||||
@@ -115,7 +115,7 @@ DTMFGenerator::fillToneBuffer(int index)
|
||||
ptr->nb_samples = sampleRate_;
|
||||
ptr->format = tone_.getFormat().sampleFormat;
|
||||
ptr->sample_rate = sampleRate_;
|
||||
- ptr->channel_layout = AV_CH_LAYOUT_MONO;
|
||||
+ ptr->ch_layout.u.mask = AV_CH_LAYOUT_MONO;
|
||||
av_channel_layout_from_mask(&ptr->ch_layout, AV_CH_LAYOUT_MONO);
|
||||
av_frame_get_buffer(ptr.get(), 0);
|
||||
tone_.genSin(ptr.get(), 0, ptr->nb_samples, tones_[index].higher, tones_[index].lower);
|
||||
diff --git a/src/media/media_decoder.cpp b/src/media/media_decoder.cpp
|
||||
index ceaa036c6..0cbeae5be 100644
|
||||
--- a/src/media/media_decoder.cpp
|
||||
+++ b/src/media/media_decoder.cpp
|
||||
@@ -375,11 +375,11 @@ MediaDemuxer::Status
|
||||
MediaDemuxer::decode()
|
||||
{
|
||||
if (inputParams_.format == "x11grab" || inputParams_.format == "dxgigrab") {
|
||||
- auto ret = inputCtx_->iformat->read_header(inputCtx_);
|
||||
- if (ret == AVERROR_EXTERNAL) {
|
||||
- JAMI_ERR("Unable to read frame: %s\n", libav_utils::getError(ret).c_str());
|
||||
- return Status::ReadError;
|
||||
- }
|
||||
+ // auto ret = inputCtx_->iformat->read_header(inputCtx_);
|
||||
+ // if (ret == AVERROR_EXTERNAL) {
|
||||
+ // JAMI_ERR("Unable to read frame: %s\n", libav_utils::getError(ret).c_str());
|
||||
+ // return Status::ReadError;
|
||||
+ // }
|
||||
auto codecpar = inputCtx_->streams[0]->codecpar;
|
||||
if (baseHeight_ != codecpar->height || baseWidth_ != codecpar->width) {
|
||||
baseHeight_ = codecpar->height;
|
||||
diff --git a/src/media/media_io_handle.h b/src/media/media_io_handle.h
|
||||
index 7a64b85a7..a668e73c0 100644
|
||||
--- a/src/media/media_io_handle.h
|
||||
+++ b/src/media/media_io_handle.h
|
||||
@@ -32,7 +32,7 @@ struct AVIOContext;
|
||||
#endif
|
||||
|
||||
typedef int (*io_readcallback)(void* opaque, uint8_t* buf, int buf_size);
|
||||
-typedef int (*io_writecallback)(void* opaque, uint8_t* buf, int buf_size);
|
||||
+typedef int (*io_writecallback)(void* opaque, const uint8_t* buf, int buf_size);
|
||||
typedef int64_t (*io_seekcallback)(void* opaque, int64_t offset, int whence);
|
||||
|
||||
namespace jami {
|
||||
diff --git a/src/media/socket_pair.cpp b/src/media/socket_pair.cpp
|
||||
index 0589affd5..f0005f6b0 100644
|
||||
--- a/src/media/socket_pair.cpp
|
||||
+++ b/src/media/socket_pair.cpp
|
||||
@@ -382,8 +382,8 @@ SocketPair::createIOContext(const uint16_t mtu)
|
||||
[](void* sp, uint8_t* buf, int len) {
|
||||
return static_cast<SocketPair*>(sp)->readCallback(buf, len);
|
||||
},
|
||||
- [](void* sp, uint8_t* buf, int len) {
|
||||
- return static_cast<SocketPair*>(sp)->writeCallback(buf, len);
|
||||
+ [](void* sp, const uint8_t* buf, int len) {
|
||||
+ return static_cast<SocketPair*>(sp)->writeCallback((uint8_t*)buf, len);
|
||||
},
|
||||
0,
|
||||
reinterpret_cast<void*>(this));
|
||||
|
||||
Reference in New Issue
Block a user