Merge remote-tracking branch 'origin/main' into epel8
This commit is contained in:
commit
51dd51b67b
@ -1,532 +0,0 @@
|
||||
From 6b54370a48287662daae5721782978662095a9e4 Mon Sep 17 00:00:00 2001
|
||||
From: mbattista <m0battista@gmail.com>
|
||||
Date: Fri, 7 May 2021 18:17:01 +0200
|
||||
Subject: [PATCH] Attended Transfer on GTK (#1435)
|
||||
|
||||
* attended transfer on gtk
|
||||
|
||||
* fix bug in clean number
|
||||
|
||||
* cleanup duplicated code and add ToolTip on how to use it.
|
||||
|
||||
Co-authored-by: Marcel Battista <marcel.battista@etes.de>
|
||||
---
|
||||
include/baresip.h | 1 +
|
||||
modules/gtk/call_window.c | 71 +++++++++++++++++++++++++++++++---
|
||||
modules/gtk/dial_dialog.c | 25 +++++++++---
|
||||
modules/gtk/gtk_mod.c | 78 +++++++++++++++++++++++++++++++++++++-
|
||||
modules/gtk/gtk_mod.h | 17 ++++++++-
|
||||
modules/menu/static_menu.c | 12 ++++--
|
||||
src/call.c | 29 ++++++++++++++
|
||||
7 files changed, 216 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/include/baresip.h b/include/baresip.h
|
||||
index 965bd99d4..a626c9dc3 100644
|
||||
--- a/include/baresip.h
|
||||
+++ b/include/baresip.h
|
||||
@@ -198,6 +198,7 @@ int call_send_digit(struct call *call, char key);
|
||||
bool call_has_audio(const struct call *call);
|
||||
bool call_has_video(const struct call *call);
|
||||
int call_transfer(struct call *call, const char *uri);
|
||||
+int call_replace_transfer(struct call *target_call, struct call *source_call);
|
||||
int call_status(struct re_printf *pf, const struct call *call);
|
||||
int call_debug(struct re_printf *pf, const struct call *call);
|
||||
int call_notify_sipfrag(struct call *call, uint16_t scode,
|
||||
diff --git a/modules/gtk/call_window.c b/modules/gtk/call_window.c
|
||||
index bb2f5ecfe..451b56256 100644
|
||||
--- a/modules/gtk/call_window.c
|
||||
+++ b/modules/gtk/call_window.c
|
||||
@@ -23,11 +23,12 @@ struct call_window {
|
||||
struct vumeter_enc *enc;
|
||||
} vu;
|
||||
struct transfer_dialog *transfer_dialog;
|
||||
+ struct dial_dialog *attended_transfer_dial;
|
||||
GtkWidget *window;
|
||||
GtkLabel *status;
|
||||
GtkLabel *duration;
|
||||
struct {
|
||||
- GtkWidget *hangup, *transfer, *hold, *mute;
|
||||
+ GtkWidget *hangup, *transfer, *hold, *mute, *attended_transfer;
|
||||
} buttons;
|
||||
struct {
|
||||
GtkProgressBar *enc, *dec;
|
||||
@@ -37,6 +38,7 @@ struct call_window {
|
||||
bool closed;
|
||||
int cur_key;
|
||||
struct play *play_dtmf_tone;
|
||||
+ struct call *attended_call;
|
||||
};
|
||||
|
||||
enum call_window_events {
|
||||
@@ -45,6 +47,7 @@ enum call_window_events {
|
||||
MQ_HOLD,
|
||||
MQ_MUTE,
|
||||
MQ_TRANSFER,
|
||||
+ MQ_ATTTRANSFER,
|
||||
};
|
||||
|
||||
static pthread_mutex_t last_data_mut = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -196,10 +199,17 @@ static void call_on_hangup(GtkToggleButton *btn, struct call_window *win)
|
||||
static void call_on_hold_toggle(GtkToggleButton *btn, struct call_window *win)
|
||||
{
|
||||
bool hold = gtk_toggle_button_get_active(btn);
|
||||
- if (hold)
|
||||
+ if (hold) {
|
||||
+ gtk_widget_set_sensitive(win->buttons.attended_transfer,
|
||||
+ TRUE);
|
||||
vumeter_timer_stop(win);
|
||||
+ }
|
||||
else
|
||||
+ {
|
||||
+ gtk_widget_set_sensitive(win->buttons.attended_transfer,
|
||||
+ FALSE);
|
||||
vumeter_timer_start(win);
|
||||
+ }
|
||||
mqueue_push(win->mq, MQ_HOLD, (void *)(size_t)hold);
|
||||
}
|
||||
|
||||
@@ -221,6 +231,25 @@ static void call_on_transfer(GtkToggleButton *btn, struct call_window *win)
|
||||
}
|
||||
|
||||
|
||||
+static void call_window_transfer_attended_call(GtkToggleButton *btn,
|
||||
+ struct call_window *win)
|
||||
+{
|
||||
+ (void)btn;
|
||||
+ mqueue_push(win->mq, MQ_ATTTRANSFER, win);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void call_on_attended_transfer(GtkToggleButton *btn,
|
||||
+ struct call_window *win)
|
||||
+{
|
||||
+ (void)btn;
|
||||
+ if (!win->attended_transfer_dial)
|
||||
+ win->attended_transfer_dial =
|
||||
+ dial_dialog_alloc(win->mod, win->call);
|
||||
+ dial_dialog_show(win->attended_transfer_dial);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static gboolean call_on_window_close(GtkWidget *widget, GdkEventAny *event,
|
||||
struct call_window *win)
|
||||
{
|
||||
@@ -319,6 +348,10 @@ static void mqueue_handler(int id, void *data, void *arg)
|
||||
case MQ_TRANSFER:
|
||||
call_transfer(win->call, data);
|
||||
break;
|
||||
+
|
||||
+ case MQ_ATTTRANSFER:
|
||||
+ call_replace_transfer(win->attended_call, win->call);
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,12 +364,14 @@ static void call_window_destructor(void *arg)
|
||||
gtk_mod_call_window_closed(window->mod, window);
|
||||
gtk_widget_destroy(window->window);
|
||||
mem_deref(window->transfer_dialog);
|
||||
+ mem_deref(window->attended_transfer_dial);
|
||||
gdk_threads_leave();
|
||||
|
||||
mem_deref(window->call);
|
||||
mem_deref(window->mq);
|
||||
mem_deref(window->vu.enc);
|
||||
mem_deref(window->vu.dec);
|
||||
+ mem_deref(window->attended_call);
|
||||
|
||||
if (window->duration_timer_tag)
|
||||
g_source_remove(window->duration_timer_tag);
|
||||
@@ -349,7 +384,8 @@ static void call_window_destructor(void *arg)
|
||||
}
|
||||
|
||||
|
||||
-struct call_window *call_window_new(struct call *call, struct gtk_mod *mod)
|
||||
+struct call_window *call_window_new(struct call *call, struct gtk_mod *mod,
|
||||
+ struct call *attended_call)
|
||||
{
|
||||
struct call_window *win;
|
||||
GtkWidget *window, *label, *status, *button, *progress, *image;
|
||||
@@ -428,13 +464,33 @@ struct call_window *call_window_new(struct call *call, struct gtk_mod *mod)
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_button_set_image(GTK_BUTTON(button), image);
|
||||
|
||||
- /* Transfer */
|
||||
+ /* Blind Transfer */
|
||||
button = gtk_button_new_with_label("Transfer");
|
||||
win->buttons.transfer = button;
|
||||
gtk_box_pack_end(GTK_BOX(button_box), button, FALSE, TRUE, 0);
|
||||
- g_signal_connect(button, "clicked", G_CALLBACK(call_on_transfer), win);
|
||||
+ g_signal_connect(button, "clicked",
|
||||
+ G_CALLBACK(call_on_transfer), win);
|
||||
+ image = gtk_image_new_from_icon_name("forward",
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
+ gtk_button_set_image(GTK_BUTTON(button), image);
|
||||
+
|
||||
+ /* Attended Transfer */
|
||||
+ button = gtk_button_new_with_label("Att. Transfer");
|
||||
+ win->buttons.attended_transfer = button;
|
||||
+ gtk_box_pack_end(GTK_BOX(button_box), button, FALSE, TRUE, 0);
|
||||
+ if (!attended_call) {
|
||||
+ g_signal_connect(button, "clicked",
|
||||
+ G_CALLBACK(call_on_attended_transfer), win);
|
||||
+ }
|
||||
+ else {
|
||||
+ g_signal_connect(button, "clicked",
|
||||
+ G_CALLBACK(call_window_transfer_attended_call), win);
|
||||
+ }
|
||||
image = gtk_image_new_from_icon_name("forward", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_button_set_image(GTK_BUTTON(button), image);
|
||||
+ gtk_widget_set_sensitive (button, FALSE);
|
||||
+ gtk_widget_set_tooltip_text(button,
|
||||
+ "Please put the call on 'Hold' to enable attended transfer");
|
||||
|
||||
/* Hold */
|
||||
button = gtk_toggle_button_new_with_label("Hold");
|
||||
@@ -467,9 +523,11 @@ struct call_window *call_window_new(struct call *call, struct gtk_mod *mod)
|
||||
G_CALLBACK(call_on_key_release), win);
|
||||
|
||||
win->call = mem_ref(call);
|
||||
+ win->attended_call = mem_ref(attended_call);
|
||||
win->mod = mod;
|
||||
win->window = window;
|
||||
win->transfer_dialog = NULL;
|
||||
+ win->attended_transfer_dial = NULL;
|
||||
win->status = GTK_LABEL(status);
|
||||
win->duration = GTK_LABEL(duration);
|
||||
win->closed = false;
|
||||
@@ -509,6 +567,7 @@ void call_window_closed(struct call_window *win, const char *reason)
|
||||
win->duration_timer_tag = 0;
|
||||
}
|
||||
gtk_widget_set_sensitive(win->buttons.transfer, FALSE);
|
||||
+ gtk_widget_set_sensitive(win->buttons.attended_transfer, FALSE);
|
||||
gtk_widget_set_sensitive(win->buttons.hold, FALSE);
|
||||
gtk_widget_set_sensitive(win->buttons.mute, FALSE);
|
||||
|
||||
@@ -522,6 +581,7 @@ void call_window_closed(struct call_window *win, const char *reason)
|
||||
|
||||
call_window_set_status(win, status);
|
||||
win->transfer_dialog = mem_deref(win->transfer_dialog);
|
||||
+ win->attended_transfer_dial = mem_deref(win->attended_transfer_dial);
|
||||
win->closed = true;
|
||||
|
||||
if (reason && strncmp(reason, user_trigger_reason,
|
||||
@@ -588,3 +648,4 @@ bool call_window_is_for_call(struct call_window *win, struct call *call)
|
||||
|
||||
return win->call == call;
|
||||
}
|
||||
+
|
||||
diff --git a/modules/gtk/dial_dialog.c b/modules/gtk/dial_dialog.c
|
||||
index 8590702f5..22abefdd4 100644
|
||||
--- a/modules/gtk/dial_dialog.c
|
||||
+++ b/modules/gtk/dial_dialog.c
|
||||
@@ -10,12 +10,14 @@
|
||||
#include <pthread.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk_mod.h"
|
||||
+#include <ctype.h>
|
||||
|
||||
|
||||
struct dial_dialog {
|
||||
struct gtk_mod *mod;
|
||||
GtkWidget *dialog;
|
||||
GtkComboBox *uri_combobox;
|
||||
+ struct call *attended_call;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,9 +28,14 @@ static int clean_number(char* str)
|
||||
/* only clean numeric numbers
|
||||
* In other cases trust the user input
|
||||
*/
|
||||
- int err = re_regex(str, str_len(str), "[A-Za-z]");
|
||||
- if (err == 0)
|
||||
- return -1;
|
||||
+ while (str[i]) {
|
||||
+ if (isalpha(str[i] != 0))
|
||||
+ return -1;
|
||||
+ else if (str[i] == '@')
|
||||
+ return -1;
|
||||
+ ++i;
|
||||
+ }
|
||||
+ i = 0;
|
||||
|
||||
/* remove (0) which is in some mal-formated numbers
|
||||
* but only if trailed by another character
|
||||
@@ -77,7 +84,13 @@ static void dial_dialog_on_response(GtkDialog *dialog, gint response_id,
|
||||
uri_combo_box_set_text(dd->uri_combobox,
|
||||
uri, length);
|
||||
}
|
||||
- gtk_mod_connect(dd->mod, uri);
|
||||
+ if (!dd->attended_call) {
|
||||
+ gtk_mod_connect(dd->mod, uri);
|
||||
+ }
|
||||
+ else {
|
||||
+ gtk_mod_connect_attended(dd->mod, uri,
|
||||
+ dd->attended_call);
|
||||
+ }
|
||||
}
|
||||
|
||||
gtk_widget_hide(GTK_WIDGET(dialog));
|
||||
@@ -92,7 +105,8 @@ static void destructor(void *arg)
|
||||
}
|
||||
|
||||
|
||||
-struct dial_dialog *dial_dialog_alloc(struct gtk_mod *mod)
|
||||
+struct dial_dialog *dial_dialog_alloc(struct gtk_mod *mod,
|
||||
+ struct call *attended_call)
|
||||
{
|
||||
struct dial_dialog *dd;
|
||||
GtkWidget *dial;
|
||||
@@ -138,6 +152,7 @@ struct dial_dialog *dial_dialog_alloc(struct gtk_mod *mod)
|
||||
dd->dialog = dial;
|
||||
dd->uri_combobox = GTK_COMBO_BOX(uri_combobox);
|
||||
dd->mod = mod;
|
||||
+ dd->attended_call = attended_call;
|
||||
|
||||
return dd;
|
||||
}
|
||||
diff --git a/modules/gtk/gtk_mod.c b/modules/gtk/gtk_mod.c
|
||||
index 55a806620..5cfa07830 100644
|
||||
--- a/modules/gtk/gtk_mod.c
|
||||
+++ b/modules/gtk/gtk_mod.c
|
||||
@@ -68,6 +68,7 @@ static struct gtk_mod mod_obj;
|
||||
enum gtk_mod_events {
|
||||
MQ_POPUP,
|
||||
MQ_CONNECT,
|
||||
+ MQ_CONNECTATTENDED,
|
||||
MQ_QUIT,
|
||||
MQ_ANSWER,
|
||||
MQ_HANGUP,
|
||||
@@ -143,7 +144,7 @@ static void menu_on_dial(GtkMenuItem *menuItem, gpointer arg)
|
||||
struct gtk_mod *mod = arg;
|
||||
(void)menuItem;
|
||||
if (!mod->dial_dialog)
|
||||
- mod->dial_dialog = dial_dialog_alloc(mod);
|
||||
+ mod->dial_dialog = dial_dialog_alloc(mod, NULL);
|
||||
dial_dialog_show(mod->dial_dialog);
|
||||
}
|
||||
|
||||
@@ -156,6 +157,7 @@ static void menu_on_dial_contact(GtkMenuItem *menuItem, gpointer arg)
|
||||
gtk_mod_connect(mod, uri);
|
||||
}
|
||||
|
||||
+
|
||||
static void menu_on_dial_history(GtkMenuItem *menuItem, gpointer arg)
|
||||
{
|
||||
struct gtk_mod *mod = arg;
|
||||
@@ -557,7 +559,19 @@ static void reject_activated(GSimpleAction *action, GVariant *parameter,
|
||||
static struct call_window *new_call_window(struct gtk_mod *mod,
|
||||
struct call *call)
|
||||
{
|
||||
- struct call_window *win = call_window_new(call, mod);
|
||||
+ struct call_window *win = call_window_new(call, mod, NULL);
|
||||
+ if (call) {
|
||||
+ mod->call_windows = g_slist_append(mod->call_windows, win);
|
||||
+ }
|
||||
+ return win;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static struct call_window *new_call_transfer_window(struct gtk_mod *mod,
|
||||
+ struct call *call,
|
||||
+ struct call *attended_call)
|
||||
+{
|
||||
+ struct call_window *win = call_window_new(call, mod, attended_call);
|
||||
if (call) {
|
||||
mod->call_windows = g_slist_append(mod->call_windows, win);
|
||||
}
|
||||
@@ -785,6 +799,42 @@ int gtk_mod_connect(struct gtk_mod *mod, const char *uri)
|
||||
}
|
||||
|
||||
|
||||
+int gtk_mod_connect_attended(struct gtk_mod *mod, const char *uri,
|
||||
+ struct call *attended_call)
|
||||
+{
|
||||
+ struct attended_transfer_store *ats;
|
||||
+ struct mbuf *uribuf = NULL;
|
||||
+ char *uri_copy = NULL;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ if (!mod)
|
||||
+ return ENOMEM;
|
||||
+
|
||||
+ uribuf = mbuf_alloc(64);
|
||||
+ ats = mem_zalloc(sizeof(struct attended_transfer_store), NULL);
|
||||
+ if (!uribuf)
|
||||
+ return ENOMEM;
|
||||
+
|
||||
+ err = account_uri_complete(ua_account(mod->ua_cur), uribuf, uri);
|
||||
+ if (err)
|
||||
+ return EINVAL;
|
||||
+
|
||||
+ uribuf->pos = 0;
|
||||
+ err = mbuf_strdup(uribuf, &uri_copy, uribuf->end);
|
||||
+ if (err)
|
||||
+ goto out;
|
||||
+
|
||||
+ ats->uri = (char *)uri_copy;
|
||||
+ ats->attended_call = attended_call;
|
||||
+
|
||||
+ err = mqueue_push(mod->mq, MQ_CONNECTATTENDED, ats);
|
||||
+
|
||||
+out:
|
||||
+ mem_deref(uribuf);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+
|
||||
bool gtk_mod_clean_number(struct gtk_mod *mod)
|
||||
{
|
||||
if (!mod)
|
||||
@@ -819,6 +869,7 @@ static void mqueue_handler(int id, void *data, void *arg)
|
||||
struct gtk_mod *mod = arg;
|
||||
const char *uri;
|
||||
struct call *call;
|
||||
+ struct attended_transfer_store *ats;
|
||||
int err;
|
||||
struct ua *ua = gtk_current_ua();
|
||||
|
||||
@@ -851,6 +902,29 @@ static void mqueue_handler(int id, void *data, void *arg)
|
||||
mem_deref(data);
|
||||
break;
|
||||
|
||||
+ case MQ_CONNECTATTENDED:
|
||||
+ ats = data;
|
||||
+ err = ua_connect(ua, &call, NULL, ats->uri, VIDMODE_ON);
|
||||
+ add_history_menu_item(mod, ats->uri, CALL_OUTGOING, "");
|
||||
+ if (err) {
|
||||
+ gdk_threads_enter();
|
||||
+ warning_dialog("Call failed",
|
||||
+ "Connecting to \"%s\" failed.\n"
|
||||
+ "Error: %m", ats->uri, err);
|
||||
+ gdk_threads_leave();
|
||||
+ break;
|
||||
+ }
|
||||
+ gdk_threads_enter();
|
||||
+ err = new_call_transfer_window(mod, call,
|
||||
+ ats->attended_call) == NULL;
|
||||
+ gdk_threads_leave();
|
||||
+ if (err) {
|
||||
+ ua_hangup(ua, call, 500, "Server Error");
|
||||
+ }
|
||||
+ mem_deref(ats->uri);
|
||||
+ mem_deref(data);
|
||||
+ break;
|
||||
+
|
||||
case MQ_HANGUP:
|
||||
call = data;
|
||||
ua_hangup(ua, call, 0, NULL);
|
||||
diff --git a/modules/gtk/gtk_mod.h b/modules/gtk/gtk_mod.h
|
||||
index 2f3bfb4f4..522202d26 100644
|
||||
--- a/modules/gtk/gtk_mod.h
|
||||
+++ b/modules/gtk/gtk_mod.h
|
||||
@@ -26,15 +26,27 @@ struct vumeter_dec {
|
||||
volatile bool started;
|
||||
};
|
||||
|
||||
+struct attended_transfer_store {
|
||||
+ struct call *attended_call;
|
||||
+ char *uri;
|
||||
+};
|
||||
+
|
||||
+
|
||||
/* Main menu */
|
||||
int gtk_mod_connect(struct gtk_mod *, const char *uri);
|
||||
+int gtk_mod_connect_attended(struct gtk_mod *, const char *uri,
|
||||
+ struct call *attended_call);
|
||||
+int gtk_mod_transfer(struct gtk_mod *, const char *uri,
|
||||
+ struct call *attended_call);
|
||||
void gtk_mod_call_window_closed(struct gtk_mod *, struct call_window *);
|
||||
|
||||
/* Call Window */
|
||||
-struct call_window *call_window_new(struct call *call, struct gtk_mod *mod);
|
||||
+struct call_window *call_window_new(struct call *call, struct gtk_mod *mod,
|
||||
+ struct call *attended_call);
|
||||
void call_window_got_vu_dec(struct vumeter_dec *);
|
||||
void call_window_got_vu_enc(struct vumeter_enc *);
|
||||
void call_window_transfer(struct call_window *, const char *uri);
|
||||
+void call_window_atttransfer(struct call_window *, const char *uri);
|
||||
void call_window_closed(struct call_window *, const char *reason);
|
||||
void call_window_ringing(struct call_window *);
|
||||
void call_window_progress(struct call_window *);
|
||||
@@ -43,7 +55,8 @@ void call_window_transfer_failed(struct call_window *, const char *reason);
|
||||
bool call_window_is_for_call(struct call_window *, struct call *);
|
||||
|
||||
/* Dial Dialog */
|
||||
-struct dial_dialog *dial_dialog_alloc(struct gtk_mod *);
|
||||
+struct dial_dialog *dial_dialog_alloc(struct gtk_mod *,
|
||||
+ struct call *attended_call);
|
||||
void dial_dialog_show(struct dial_dialog *);
|
||||
|
||||
/* Call transfer dialog */
|
||||
diff --git a/modules/menu/static_menu.c b/modules/menu/static_menu.c
|
||||
index 91bbfd948..1fcc25ca0 100644
|
||||
--- a/modules/menu/static_menu.c
|
||||
+++ b/modules/menu/static_menu.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <re.h>
|
||||
#include <baresip.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
@@ -395,9 +396,14 @@ static void clean_number(char *str)
|
||||
/* only clean numeric numbers
|
||||
* In other cases trust the user input
|
||||
*/
|
||||
- int err = re_regex(str, str_len(str), "[A-Za-z]");
|
||||
- if (err == 0)
|
||||
- return;
|
||||
+ while (str[i]) {
|
||||
+ if (isalpha(str[i] != 0))
|
||||
+ return;
|
||||
+ else if (str[i] == '@')
|
||||
+ return;
|
||||
+ ++i;
|
||||
+ }
|
||||
+ i = 0;
|
||||
|
||||
/* remove (0) which is in some mal-formated numbers
|
||||
* but only if trailed by another character
|
||||
diff --git a/src/call.c b/src/call.c
|
||||
index d9f35248a..496fcecdb 100644
|
||||
--- a/src/call.c
|
||||
+++ b/src/call.c
|
||||
@@ -2291,6 +2291,35 @@ int call_transfer(struct call *call, const char *uri)
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * Transfer the call to a target SIP uri and replace the source call
|
||||
+ *
|
||||
+ * @param call Call object
|
||||
+ * @param uri Target SIP uri
|
||||
+ *
|
||||
+ * @return 0 if success, otherwise errorcode
|
||||
+ */
|
||||
+int call_replace_transfer(struct call *call, struct call *source_call)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ info("transferring call to %s\n", source_call->peer_uri);
|
||||
+
|
||||
+ call->sub = mem_deref(call->sub);
|
||||
+ err = sipevent_drefer(&call->sub, uag_sipevent_sock(),
|
||||
+ sipsess_dialog(call->sess), ua_cuser(call->ua),
|
||||
+ auth_handler, call->acc, true,
|
||||
+ sipsub_notify_handler, sipsub_close_handler,
|
||||
+ call, "Refer-To: %s?Replaces=%s\r\n",
|
||||
+ source_call->peer_uri, source_call->id);
|
||||
+ if (err) {
|
||||
+ warning("call: sipevent_drefer: %m\n", err);
|
||||
+ }
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int call_af(const struct call *call)
|
||||
{
|
||||
return call ? call->af : AF_UNSPEC;
|
@ -1,295 +0,0 @@
|
||||
From 68fd6b29d34380f74ea69b32cf055639ae2b7a35 Mon Sep 17 00:00:00 2001
|
||||
From: mbattista <m0battista@gmail.com>
|
||||
Date: Sat, 24 Apr 2021 09:18:38 +0200
|
||||
Subject: [PATCH] GTK caller history (#1350)
|
||||
|
||||
* caller history
|
||||
|
||||
* other icons
|
||||
|
||||
* rejected and []
|
||||
|
||||
* limit caller history
|
||||
|
||||
* fix ccheck
|
||||
|
||||
* take better icons if available
|
||||
|
||||
* symbolic icons suffix
|
||||
|
||||
* check against theme if icons exists
|
||||
|
||||
* symbolic for status icon
|
||||
|
||||
* dialog-close is not in all icons
|
||||
|
||||
* fixing crash when calling same person multiple times
|
||||
|
||||
* check against null safty
|
||||
|
||||
Co-authored-by: Marcel Battista <marcel.battista@etes.de>
|
||||
---
|
||||
modules/gtk/gtk_mod.c | 135 ++++++++++++++++++++++++++++++++++++++++++
|
||||
modules/gtk/gtk_mod.h | 5 ++
|
||||
2 files changed, 140 insertions(+)
|
||||
|
||||
diff --git a/modules/gtk/gtk_mod.c b/modules/gtk/gtk_mod.c
|
||||
index afbbc3806..55a806620 100644
|
||||
--- a/modules/gtk/gtk_mod.c
|
||||
+++ b/modules/gtk/gtk_mod.c
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
#include <re.h>
|
||||
#include <rem.h>
|
||||
+#include <time.h>
|
||||
#include <baresip.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
@@ -43,11 +44,13 @@ struct gtk_mod {
|
||||
bool run;
|
||||
bool contacts_inited;
|
||||
struct mqueue *mq;
|
||||
+ int call_history_length;
|
||||
GApplication *app;
|
||||
GtkStatusIcon *status_icon;
|
||||
GtkWidget *app_menu;
|
||||
GtkWidget *contacts_menu;
|
||||
GtkWidget *accounts_menu;
|
||||
+ GtkWidget *history_menu;
|
||||
GtkWidget *status_menu;
|
||||
GSList *accounts_menu_group;
|
||||
struct dial_dialog *dial_dialog;
|
||||
@@ -55,6 +58,9 @@ struct gtk_mod {
|
||||
GSList *incoming_call_menus;
|
||||
bool clean_number;
|
||||
struct ua *ua_cur;
|
||||
+ bool icon_call_missed;
|
||||
+ bool icon_call_outgoing;
|
||||
+ bool icon_call_incoming;
|
||||
};
|
||||
|
||||
static struct gtk_mod mod_obj;
|
||||
@@ -150,6 +156,25 @@ static void menu_on_dial_contact(GtkMenuItem *menuItem, gpointer arg)
|
||||
gtk_mod_connect(mod, uri);
|
||||
}
|
||||
|
||||
+static void menu_on_dial_history(GtkMenuItem *menuItem, gpointer arg)
|
||||
+{
|
||||
+ struct gtk_mod *mod = arg;
|
||||
+ const char *label = gtk_menu_item_get_label(menuItem);
|
||||
+ char *label_1;
|
||||
+ char buf[256];
|
||||
+ char *uri;
|
||||
+
|
||||
+ str_ncpy(buf, label, sizeof(buf));
|
||||
+ label_1 = strchr(buf, '[');
|
||||
+ if (!label_1)
|
||||
+ return;
|
||||
+
|
||||
+ label_1[0] = ' ';
|
||||
+
|
||||
+ uri = strtok(label_1, "]");
|
||||
+ gtk_mod_connect(mod, uri);
|
||||
+}
|
||||
+
|
||||
|
||||
static void init_contacts_menu(struct gtk_mod *mod)
|
||||
{
|
||||
@@ -170,6 +195,78 @@ static void init_contacts_menu(struct gtk_mod *mod)
|
||||
}
|
||||
|
||||
|
||||
+static void add_history_menu_item(struct gtk_mod *mod, const char *uri,
|
||||
+ int call_type, const char *info)
|
||||
+{
|
||||
+ GtkWidget *item, *history_item;
|
||||
+ GtkMenuShell *history_menu = GTK_MENU_SHELL(mod->history_menu);
|
||||
+ char buf[256];
|
||||
+ time_t rawtime = time(NULL);
|
||||
+ struct tm *ptm = localtime(&rawtime);
|
||||
+ GList *list;
|
||||
+
|
||||
+ if (mod->call_history_length < 20) {
|
||||
+ mod->call_history_length++;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Remove old call history */
|
||||
+ list = gtk_container_get_children(GTK_CONTAINER(history_menu));
|
||||
+ history_item = GTK_WIDGET(list->data);
|
||||
+ gtk_widget_destroy(history_item);
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ re_snprintf(buf, sizeof buf,
|
||||
+ "%s [%s]\n%04d-%02d-%02d %02d:%02d:%02d",
|
||||
+ info, uri, ptm->tm_year + 1900, ptm->tm_mon + 1,
|
||||
+ ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
|
||||
+
|
||||
+ item = gtk_image_menu_item_new_with_label(buf);
|
||||
+ switch (call_type) {
|
||||
+ case CALL_INCOMING:
|
||||
+ gtk_image_menu_item_set_image(
|
||||
+ GTK_IMAGE_MENU_ITEM(item),
|
||||
+ gtk_image_new_from_icon_name(
|
||||
+ (mod->icon_call_incoming) ?
|
||||
+ "call-incoming-symbolic" : "go-next",
|
||||
+ GTK_ICON_SIZE_MENU));
|
||||
+ break;
|
||||
+ case CALL_OUTGOING:
|
||||
+ gtk_image_menu_item_set_image(
|
||||
+ GTK_IMAGE_MENU_ITEM(item),
|
||||
+ gtk_image_new_from_icon_name(
|
||||
+ (mod->icon_call_outgoing) ?
|
||||
+ "call-outgoing-symbolic"
|
||||
+ : "go-previous",
|
||||
+ GTK_ICON_SIZE_MENU));
|
||||
+ break;
|
||||
+ case CALL_MISSED:
|
||||
+ gtk_image_menu_item_set_image(
|
||||
+ GTK_IMAGE_MENU_ITEM(item),
|
||||
+ gtk_image_new_from_icon_name(
|
||||
+ (mod->icon_call_missed) ?
|
||||
+ "call-missed-symbolic" : "call-stop",
|
||||
+ GTK_ICON_SIZE_MENU));
|
||||
+ break;
|
||||
+ case CALL_REJECTED:
|
||||
+ gtk_image_menu_item_set_image(
|
||||
+ GTK_IMAGE_MENU_ITEM(item),
|
||||
+ gtk_image_new_from_icon_name(
|
||||
+ "window-close", GTK_ICON_SIZE_MENU));
|
||||
+ break;
|
||||
+ default:
|
||||
+ gtk_image_menu_item_set_image(
|
||||
+ GTK_IMAGE_MENU_ITEM(item),
|
||||
+ gtk_image_new_from_icon_name(
|
||||
+ "call-start", GTK_ICON_SIZE_MENU));
|
||||
+ break;
|
||||
+ }
|
||||
+ gtk_menu_shell_append(history_menu, item);
|
||||
+ g_signal_connect(G_OBJECT(item), "activate",
|
||||
+ G_CALLBACK(menu_on_dial_history), mod);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void menu_on_account_toggled(GtkCheckMenuItem *menu_item,
|
||||
struct gtk_mod *mod)
|
||||
{
|
||||
@@ -207,6 +304,8 @@ static void menu_on_incoming_call_reject(GtkMenuItem *menuItem,
|
||||
struct gtk_mod *mod)
|
||||
{
|
||||
struct call *call = g_object_get_data(G_OBJECT(menuItem), "call");
|
||||
+ add_history_menu_item(mod,call_peeruri(call), CALL_REJECTED,
|
||||
+ call_peername(call));
|
||||
denotify_incoming_call(mod, call);
|
||||
mqueue_push(mod->mq, MQ_HANGUP, call);
|
||||
}
|
||||
@@ -448,6 +547,8 @@ static void reject_activated(GSimpleAction *action, GVariant *parameter,
|
||||
|
||||
if (call) {
|
||||
denotify_incoming_call(mod, call);
|
||||
+ add_history_menu_item(mod,call_peeruri(call), CALL_REJECTED,
|
||||
+ call_peername(call));
|
||||
mqueue_push(mod->mq, MQ_HANGUP, call);
|
||||
}
|
||||
}
|
||||
@@ -530,6 +631,18 @@ static void ua_event_handler(struct ua *ua,
|
||||
if (win)
|
||||
call_window_closed(win, prm);
|
||||
denotify_incoming_call(mod, call);
|
||||
+ if (!call_is_outgoing(call)
|
||||
+ && call_state(call) != CALL_STATE_TERMINATED
|
||||
+ && call_state(call) != CALL_STATE_ESTABLISHED) {
|
||||
+ add_history_menu_item(mod,
|
||||
+ call_peeruri(call),
|
||||
+ CALL_MISSED, call_peername(call));
|
||||
+
|
||||
+ gtk_status_icon_set_from_icon_name(
|
||||
+ mod->status_icon,
|
||||
+ (mod->icon_call_missed) ?
|
||||
+ "call-missed-symbolic" : "call-stop");
|
||||
+ }
|
||||
break;
|
||||
|
||||
case UA_EVENT_CALL_RINGING:
|
||||
@@ -637,6 +750,7 @@ static gboolean status_icon_on_button_press(GtkStatusIcon *status_icon,
|
||||
{
|
||||
popup_menu(mod, gtk_status_icon_position_menu, status_icon,
|
||||
event->button, event->time);
|
||||
+ gtk_status_icon_set_from_icon_name(status_icon, "call-start");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -719,6 +833,7 @@ static void mqueue_handler(int id, void *data, void *arg)
|
||||
case MQ_CONNECT:
|
||||
uri = data;
|
||||
err = ua_connect(ua, &call, NULL, uri, VIDMODE_ON);
|
||||
+ add_history_menu_item(mod, uri, CALL_OUTGOING, "");
|
||||
if (err) {
|
||||
gdk_threads_enter();
|
||||
warning_dialog("Call failed",
|
||||
@@ -748,6 +863,8 @@ static void mqueue_handler(int id, void *data, void *arg)
|
||||
case MQ_ANSWER:
|
||||
call = data;
|
||||
err = ua_answer(ua, call, VIDMODE_ON);
|
||||
+ add_history_menu_item(mod, call_peeruri(call),
|
||||
+ CALL_INCOMING, call_peername(call));
|
||||
if (err) {
|
||||
gdk_threads_enter();
|
||||
warning_dialog("Call failed",
|
||||
@@ -782,6 +899,8 @@ static void *gtk_thread(void *arg)
|
||||
GtkWidget *item;
|
||||
GError *err = NULL;
|
||||
struct le *le;
|
||||
+ GtkIconTheme *theme;
|
||||
+
|
||||
|
||||
gdk_threads_init();
|
||||
gtk_init(0, NULL);
|
||||
@@ -814,6 +933,7 @@ static void *gtk_thread(void *arg)
|
||||
mod->dial_dialog = NULL;
|
||||
mod->call_windows = NULL;
|
||||
mod->incoming_call_menus = NULL;
|
||||
+ mod->call_history_length = 0;
|
||||
|
||||
/* App menu */
|
||||
mod->app_menu = gtk_menu_new();
|
||||
@@ -872,8 +992,23 @@ static void *gtk_thread(void *arg)
|
||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(item),
|
||||
mod->contacts_menu);
|
||||
|
||||
+ /* Caller history */
|
||||
+ mod->history_menu = gtk_menu_new();
|
||||
+ item = gtk_menu_item_new_with_mnemonic("Call _history");
|
||||
+ gtk_menu_shell_append(app_menu, item);
|
||||
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(item),
|
||||
+ mod->history_menu);
|
||||
+
|
||||
gtk_menu_shell_append(app_menu, gtk_separator_menu_item_new());
|
||||
|
||||
+ theme = gtk_icon_theme_get_default();
|
||||
+ mod->icon_call_incoming = gtk_icon_theme_has_icon(theme,
|
||||
+ "call-incoming-symbolic");
|
||||
+ mod->icon_call_outgoing = gtk_icon_theme_has_icon(theme,
|
||||
+ "call-outgoing-symbolic");
|
||||
+ mod->icon_call_missed = gtk_icon_theme_has_icon(theme,
|
||||
+ "call-missed-symbolic");
|
||||
+
|
||||
/* About */
|
||||
item = gtk_menu_item_new_with_mnemonic("A_bout");
|
||||
g_signal_connect(G_OBJECT(item), "activate",
|
||||
diff --git a/modules/gtk/gtk_mod.h b/modules/gtk/gtk_mod.h
|
||||
index 50f6a9a98..2f3bfb4f4 100644
|
||||
--- a/modules/gtk/gtk_mod.h
|
||||
+++ b/modules/gtk/gtk_mod.h
|
||||
@@ -4,6 +4,11 @@
|
||||
* Copyright (C) 2015 Charles E. Lehner
|
||||
*/
|
||||
|
||||
+#define CALL_INCOMING 0
|
||||
+#define CALL_OUTGOING 1
|
||||
+#define CALL_MISSED 2
|
||||
+#define CALL_REJECTED 3
|
||||
+
|
||||
struct gtk_mod;
|
||||
struct call_window;
|
||||
struct dial_dialog;
|
@ -1,133 +0,0 @@
|
||||
From b0669e837daefeaff482a04d6dc15df1c6ebc0f0 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Scheck <robert-scheck@users.noreply.github.com>
|
||||
Date: Sat, 24 Apr 2021 09:22:26 +0200
|
||||
Subject: [PATCH] Convert FRITZ!Box XML phone book into Baresip contacts
|
||||
(#1382)
|
||||
|
||||
---
|
||||
.github/workflows/tools.yml | 14 ++++++
|
||||
tools/fritzbox2baresip | 94 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 108 insertions(+)
|
||||
create mode 100644 .github/workflows/tools.yml
|
||||
create mode 100755 tools/fritzbox2baresip
|
||||
|
||||
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
|
||||
new file mode 100644
|
||||
index 000000000..6cc62d606
|
||||
--- /dev/null
|
||||
+++ b/.github/workflows/tools.yml
|
||||
@@ -0,0 +1,14 @@
|
||||
+name: Tools
|
||||
+
|
||||
+on: [push, pull_request]
|
||||
+
|
||||
+jobs:
|
||||
+ build:
|
||||
+ runs-on: ubuntu-latest
|
||||
+
|
||||
+ steps:
|
||||
+ - uses: actions/checkout@v2
|
||||
+ - name: pylint
|
||||
+ uses: cclauss/GitHub-Action-for-pylint@0.7.0
|
||||
+ with:
|
||||
+ args: "pylint tools/fritzbox2baresip"
|
||||
diff --git a/tools/fritzbox2baresip b/tools/fritzbox2baresip
|
||||
new file mode 100755
|
||||
index 000000000..cba91630f
|
||||
--- /dev/null
|
||||
+++ b/tools/fritzbox2baresip
|
||||
@@ -0,0 +1,94 @@
|
||||
+#!/usr/bin/python3
|
||||
+#
|
||||
+# Copyright (c) 2021, Robert Scheck <robert@fedoraproject.org>
|
||||
+#
|
||||
+# All rights reserved.
|
||||
+#
|
||||
+# Redistribution and use in source and binary forms, with or without
|
||||
+# modification, are permitted provided that the following conditions
|
||||
+# are met:
|
||||
+#
|
||||
+# 1. Redistributions of source code must retain the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer.
|
||||
+# 2. Redistributions in binary form must reproduce the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer in the
|
||||
+# documentation and/or other materials provided with the distribution.
|
||||
+# 3. Neither the name of the copyright holder nor the names of its
|
||||
+# contributors may be used to endorse or promote products derived
|
||||
+# from this software without specific prior written permission.
|
||||
+#
|
||||
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+#
|
||||
+
|
||||
+"""Convert FRITZ!Box XML phone book into Baresip contacts"""
|
||||
+
|
||||
+import sys
|
||||
+import xml.etree.ElementTree
|
||||
+
|
||||
+def fail(msg):
|
||||
+ """Print failure message to STDERR and end with non-zero exit code"""
|
||||
+ print(msg, file=sys.stderr)
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+def usage():
|
||||
+ """Handle mandatory and optional command line arguments"""
|
||||
+ if len(sys.argv) not in range(2, 5):
|
||||
+ fail(f"Usage: {sys.argv[0]} <FRITZ!Box XML> [<Baresip contacts>] "
|
||||
+ "[<FRITZ!Box IP>]")
|
||||
+
|
||||
+ return sys.argv[1], \
|
||||
+ sys.argv[2] if len(sys.argv) >= 3 else None, \
|
||||
+ f"@{sys.argv[3]}" if len(sys.argv) == 4 else "@fritz.box"
|
||||
+
|
||||
+def convert(entries, src, host="@fritz.box"):
|
||||
+ """Convert FRITZ!Box XML phone book into Baresip contacts"""
|
||||
+ try:
|
||||
+ types = {'home': '\N{house building}',
|
||||
+ 'work': '\N{briefcase}',
|
||||
+ 'mobile': '\N{mobile phone}'}
|
||||
+ tree = xml.etree.ElementTree.parse(src)
|
||||
+ for contact in tree.iter('contact'):
|
||||
+ realname = contact.findtext("./person/realName")
|
||||
+ for ntype in [*types]:
|
||||
+ number = contact.findtext("./telephony/number"
|
||||
+ f"[@type='{ntype}']")
|
||||
+ if number is not None:
|
||||
+ entries.append(f"{types[ntype]} {realname} <sip:{number}"
|
||||
+ f"{'' if '@' in number else host}>")
|
||||
+ except FileNotFoundError:
|
||||
+ fail(f"Error: File '{src}' does not exist or can not be read!")
|
||||
+ except xml.etree.ElementTree.ParseError:
|
||||
+ fail(f"Error: File '{src}' is no FRITZ!Box XML phone book or damaged!")
|
||||
+
|
||||
+def write(entries, src=None, dst=None):
|
||||
+ """Write Baresip contacts to file or STDOUT"""
|
||||
+ try:
|
||||
+ dst = None if dst == '-' else dst
|
||||
+ sys.stdout.close = lambda: None
|
||||
+ with (open(dst, 'w') if dst else sys.stdout) as contacts:
|
||||
+ contacts.write("# SIP contacts\n")
|
||||
+ contacts.write("# Source: "
|
||||
+ f"{'(unknown)' if src is None else src }\n")
|
||||
+ contacts.write('\n'.join(entries) + '\n')
|
||||
+ except PermissionError:
|
||||
+ fail(f"Error: File '{dst}' can not be created or written to!")
|
||||
+
|
||||
+def main():
|
||||
+ """Handle command line arguments, convert phone book and write result"""
|
||||
+ entries = []
|
||||
+ src, dst, host = usage()
|
||||
+ convert(entries, src, host)
|
||||
+ write(entries, src, dst)
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ main()
|
@ -1,446 +0,0 @@
|
||||
From 01804dcfaf77e298a3f7bdc3d4cfe0882bf681cd Mon Sep 17 00:00:00 2001
|
||||
From: "Alfred E. Heggestad" <alfred.heggestad@gmail.com>
|
||||
Date: Sat, 24 Apr 2021 11:41:22 +0200
|
||||
Subject: [PATCH] cairo: remove deprecated module
|
||||
|
||||
the avformat module can be used for video test source:
|
||||
|
||||
video_source avformat,lavfi,testsrc2
|
||||
---
|
||||
README.md | 2 -
|
||||
docs/examples/config | 1 -
|
||||
mk/modules.mk | 1 -
|
||||
modules/cairo/cairo.c | 347 ----------------------------------------
|
||||
modules/cairo/module.mk | 12 --
|
||||
src/config.c | 1 -
|
||||
6 files changed, 364 deletions(-)
|
||||
delete mode 100644 modules/cairo/cairo.c
|
||||
delete mode 100644 modules/cairo/module.mk
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index 1ad82c9bd..d87a76564 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -110,7 +110,6 @@ Distributed under BSD license
|
||||
* Video-drivers:
|
||||
- iOS avcapture video-source
|
||||
- FFmpeg/libav libavformat/avdevice input
|
||||
- - Cairo video-source test module
|
||||
- Direct Show video-source
|
||||
- MacOSX AVCapture video-source
|
||||
- RST media player
|
||||
@@ -229,7 +228,6 @@ avcapture Video source using iOS AVFoundation video capture
|
||||
avcodec Video codec using FFmpeg/libav libavcodec
|
||||
avformat Video source using FFmpeg/libav libavformat
|
||||
b2bua Back-to-Back User-Agent (B2BUA) module
|
||||
-cairo Cairo video source
|
||||
codec2 Codec2 low bit rate speech codec
|
||||
cons UDP/TCP console UI driver
|
||||
contact Contacts module
|
||||
diff --git a/docs/examples/config b/docs/examples/config
|
||||
index e0921b0fb..5e7a29b9a 100644
|
||||
--- a/docs/examples/config
|
||||
+++ b/docs/examples/config
|
||||
@@ -122,7 +122,6 @@ module alsa.so
|
||||
#module v4l2.so
|
||||
#module v4l2_codec.so
|
||||
#module x11grab.so
|
||||
-#module cairo.so
|
||||
#module vidbridge.so
|
||||
|
||||
# Video display modules
|
||||
diff --git a/mk/modules.mk b/mk/modules.mk
|
||||
index ce7fd1313..d4e53a337 100644
|
||||
--- a/mk/modules.mk
|
||||
+++ b/mk/modules.mk
|
||||
@@ -333,7 +333,6 @@ ifneq ($(USE_AVFILTER),)
|
||||
MODULES += avfilter
|
||||
endif
|
||||
ifneq ($(USE_CAIRO),)
|
||||
-MODULES += cairo
|
||||
ifneq ($(USE_MPG123),)
|
||||
MODULES += rst
|
||||
endif
|
||||
diff --git a/modules/cairo/cairo.c b/modules/cairo/cairo.c
|
||||
deleted file mode 100644
|
||||
index 85cef8031..000000000
|
||||
--- a/modules/cairo/cairo.c
|
||||
+++ /dev/null
|
||||
@@ -1,347 +0,0 @@
|
||||
-/**
|
||||
- * @file cairo.c Cairo module
|
||||
- *
|
||||
- * Copyright (C) 2010 Alfred E. Heggestad
|
||||
- */
|
||||
-#define _DEFAULT_SOURCE 1
|
||||
-#define _BSD_SOURCE 1
|
||||
-#include <unistd.h>
|
||||
-#include <pthread.h>
|
||||
-#include <math.h>
|
||||
-#include <re.h>
|
||||
-#include <rem.h>
|
||||
-#include <baresip.h>
|
||||
-#include <cairo/cairo.h>
|
||||
-
|
||||
-
|
||||
-#if !defined (M_PI)
|
||||
-#define M_PI 3.14159265358979323846264338327
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- * @defgroup cairo cairo
|
||||
- *
|
||||
- * Cairo video-source module is a video generator for testing
|
||||
- * and demo purposes.
|
||||
- *
|
||||
- * Note: This module is very experimental!
|
||||
- *
|
||||
- * Use Cairo library to draw graphics into a frame buffer
|
||||
- */
|
||||
-
|
||||
-
|
||||
-enum {
|
||||
- FONT_SIZE = 18
|
||||
-};
|
||||
-
|
||||
-struct vidsrc_st {
|
||||
- struct vidsrc_prm prm;
|
||||
- struct vidsz size;
|
||||
- cairo_surface_t *surface;
|
||||
- cairo_t *cr;
|
||||
- cairo_surface_t *surface_logo;
|
||||
- cairo_t *cr_logo;
|
||||
- double logo_width;
|
||||
- double logo_height;
|
||||
- double step;
|
||||
- bool run;
|
||||
- pthread_t thread;
|
||||
- vidsrc_frame_h *frameh;
|
||||
- void *arg;
|
||||
-};
|
||||
-
|
||||
-
|
||||
-static struct vidsrc *vidsrc;
|
||||
-
|
||||
-
|
||||
-static void destructor(void *arg)
|
||||
-{
|
||||
- struct vidsrc_st *st = arg;
|
||||
-
|
||||
- if (st->run) {
|
||||
- st->run = false;
|
||||
- pthread_join(st->thread, NULL);
|
||||
- }
|
||||
-
|
||||
- if (st->cr)
|
||||
- cairo_destroy(st->cr);
|
||||
- if (st->surface)
|
||||
- cairo_surface_destroy(st->surface);
|
||||
-
|
||||
- if (st->cr_logo)
|
||||
- cairo_destroy(st->cr_logo);
|
||||
- if (st->surface_logo)
|
||||
- cairo_surface_destroy(st->surface_logo);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void draw_background(cairo_t *cr, double color_step,
|
||||
- int width, int height)
|
||||
-{
|
||||
- cairo_pattern_t *pat;
|
||||
- double grey, r, g, b;
|
||||
-
|
||||
- grey = 0.1 + fabs(sin(3 * color_step));
|
||||
- r = grey;
|
||||
- g = grey;
|
||||
- b = grey;
|
||||
-
|
||||
- pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, height);
|
||||
- cairo_pattern_add_color_stop_rgba (pat, 1, r, g, b, 1);
|
||||
- cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, 1);
|
||||
- cairo_rectangle (cr, 0, 0, width, height);
|
||||
- cairo_set_source (cr, pat);
|
||||
- cairo_fill (cr);
|
||||
- cairo_pattern_destroy (pat);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void draw_text(struct vidsrc_st *st, int x, int y,
|
||||
- const char *fmt, ...)
|
||||
-{
|
||||
- char buf[4096] = "";
|
||||
- va_list ap;
|
||||
-
|
||||
- va_start(ap, fmt);
|
||||
- (void)re_vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
- va_end(ap);
|
||||
-
|
||||
- cairo_set_source_rgb(st->cr, 1.0, 1.0, 1.0); /* white */
|
||||
-
|
||||
- cairo_set_font_size(st->cr, FONT_SIZE);
|
||||
- cairo_move_to(st->cr, x, y);
|
||||
- cairo_show_text(st->cr, buf);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void draw_logo(struct vidsrc_st *st)
|
||||
-{
|
||||
- double x, y;
|
||||
-
|
||||
- x = (st->size.w - st->logo_width) * (sin(10 * st->step) + 1)/2;
|
||||
- y = (st->size.h - st->logo_height)* (1 - fabs(sin(30 * st->step)));
|
||||
-
|
||||
- cairo_set_source_surface(st->cr, st->surface_logo, x, y);
|
||||
- cairo_paint(st->cr);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void process(struct vidsrc_st *st, uint64_t timestamp)
|
||||
-{
|
||||
- struct vidframe f;
|
||||
- unsigned xoffs = 2, yoffs = 24;
|
||||
-
|
||||
- draw_background(st->cr, st->step, st->size.w, st->size.h);
|
||||
-
|
||||
- draw_text(st, xoffs, yoffs + FONT_SIZE, "%H", fmt_gmtime, NULL);
|
||||
-
|
||||
- draw_text(st, xoffs, yoffs + FONT_SIZE*2, "%u x %u @ %.2f fps",
|
||||
- st->size.w, st->size.h, st->prm.fps);
|
||||
-
|
||||
- draw_text(st, xoffs, yoffs + FONT_SIZE*3, "Time: %.3f sec",
|
||||
- timestamp / (double)VIDEO_TIMEBASE);
|
||||
-
|
||||
- draw_logo(st);
|
||||
-
|
||||
- st->step += 0.02 / st->prm.fps;
|
||||
-
|
||||
- vidframe_init_buf(&f, VID_FMT_RGB32, &st->size,
|
||||
- cairo_image_surface_get_data(st->surface));
|
||||
-
|
||||
- st->frameh(&f, timestamp, st->arg);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void *read_thread(void *arg)
|
||||
-{
|
||||
- struct vidsrc_st *st = arg;
|
||||
- uint64_t ts = 0, ts_start = 0;
|
||||
-
|
||||
- while (st->run) {
|
||||
-
|
||||
- uint64_t now;
|
||||
- uint64_t timestamp;
|
||||
-
|
||||
- sys_msleep(2);
|
||||
-
|
||||
- now = tmr_jiffies();
|
||||
- if (!ts) {
|
||||
- ts = ts_start = now;
|
||||
- }
|
||||
-
|
||||
- if (ts > now)
|
||||
- continue;
|
||||
-
|
||||
- timestamp = (ts - ts_start) * VIDEO_TIMEBASE / 1000;
|
||||
-
|
||||
- process(st, timestamp);
|
||||
-
|
||||
- ts += 1000/st->prm.fps;
|
||||
- }
|
||||
-
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int load_logo(struct vidsrc_st *st, const char *filename)
|
||||
-{
|
||||
- cairo_surface_t *logo;
|
||||
- double lw;
|
||||
- double scale;
|
||||
- int err = 0;
|
||||
-
|
||||
- logo = cairo_image_surface_create_from_png(filename);
|
||||
- if (!logo) {
|
||||
- warning("cairo: failed to load PNG logo\n");
|
||||
- err = ENOENT;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if (!cairo_image_surface_get_width(logo) ||
|
||||
- !cairo_image_surface_get_height(logo)) {
|
||||
- warning("cairo: invalid logo (%s)\n", filename);
|
||||
- err = ENOENT;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- st->logo_width = st->size.w / 2;
|
||||
- lw = cairo_image_surface_get_width(logo);
|
||||
- scale = (double)st->logo_width / (double)lw;
|
||||
-
|
||||
- st->logo_height = cairo_image_surface_get_height(logo) * scale;
|
||||
-
|
||||
- /* create a scaled-down logo with same aspect ratio */
|
||||
-
|
||||
- st->surface_logo = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
|
||||
- st->logo_width,
|
||||
- st->logo_height);
|
||||
- if (!st->surface_logo) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- st->cr_logo = cairo_create(st->surface_logo);
|
||||
- if (!st->cr_logo) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- cairo_scale(st->cr_logo, scale, scale);
|
||||
-
|
||||
- cairo_set_source_surface(st->cr_logo, logo, 0, 0);
|
||||
- cairo_paint(st->cr_logo);
|
||||
-
|
||||
- info("cairo: scaling logo '%s' from %d x %d to %.1f x %.1f\n",
|
||||
- filename,
|
||||
- cairo_image_surface_get_width(logo),
|
||||
- cairo_image_surface_get_height(logo),
|
||||
- st->logo_width,
|
||||
- st->logo_height);
|
||||
-
|
||||
- out:
|
||||
- if (logo)
|
||||
- cairo_surface_destroy(logo);
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int alloc(struct vidsrc_st **stp, const struct vidsrc *vs,
|
||||
- struct media_ctx **ctx, struct vidsrc_prm *prm,
|
||||
- const struct vidsz *size, const char *fmt,
|
||||
- const char *dev, vidsrc_frame_h *frameh,
|
||||
- vidsrc_error_h *errorh, void *arg)
|
||||
-{
|
||||
- struct config *cfg;
|
||||
- struct vidsrc_st *st;
|
||||
- char logo[256];
|
||||
- int err = 0;
|
||||
-
|
||||
- (void)ctx;
|
||||
- (void)fmt;
|
||||
- (void)dev;
|
||||
- (void)errorh;
|
||||
- (void)vs;
|
||||
-
|
||||
- if (!stp || !prm || !size || !frameh)
|
||||
- return EINVAL;
|
||||
-
|
||||
- cfg = conf_config();
|
||||
- if (!cfg)
|
||||
- return EINVAL;
|
||||
-
|
||||
- st = mem_zalloc(sizeof(*st), destructor);
|
||||
- if (!st)
|
||||
- return ENOMEM;
|
||||
-
|
||||
- st->frameh = frameh;
|
||||
- st->arg = arg;
|
||||
- st->prm = *prm;
|
||||
- st->size = *size;
|
||||
-
|
||||
- st->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
|
||||
- size->w, size->h);
|
||||
- if (!st->surface) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- st->cr = cairo_create(st->surface);
|
||||
- if (!st->cr) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- cairo_select_font_face(st->cr, "Sans",
|
||||
- CAIRO_FONT_SLANT_NORMAL,
|
||||
- CAIRO_FONT_WEIGHT_BOLD);
|
||||
-
|
||||
- info("cairo: surface with resolution %d x %d\n",
|
||||
- cairo_image_surface_get_width(st->surface),
|
||||
- cairo_image_surface_get_height(st->surface));
|
||||
-
|
||||
- st->step = rand_u16() / 1000.0;
|
||||
-
|
||||
- re_snprintf(logo, sizeof(logo), "%s/logo.png", cfg->audio.audio_path);
|
||||
-
|
||||
- err = load_logo(st, logo);
|
||||
- if (err)
|
||||
- goto out;
|
||||
-
|
||||
- st->run = true;
|
||||
- err = pthread_create(&st->thread, NULL, read_thread, st);
|
||||
- if (err) {
|
||||
- st->run = false;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- out:
|
||||
- if (err)
|
||||
- mem_deref(st);
|
||||
- else
|
||||
- *stp = st;
|
||||
-
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int module_init(void)
|
||||
-{
|
||||
- return vidsrc_register(&vidsrc, baresip_vidsrcl(),
|
||||
- "cairo", alloc, NULL);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int module_close(void)
|
||||
-{
|
||||
- vidsrc = mem_deref(vidsrc);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-EXPORT_SYM const struct mod_export DECL_EXPORTS(cairo) = {
|
||||
- "cairo",
|
||||
- "vidsrc",
|
||||
- module_init,
|
||||
- module_close
|
||||
-};
|
||||
diff --git a/modules/cairo/module.mk b/modules/cairo/module.mk
|
||||
deleted file mode 100644
|
||||
index 01e3dc7cc..000000000
|
||||
--- a/modules/cairo/module.mk
|
||||
+++ /dev/null
|
||||
@@ -1,12 +0,0 @@
|
||||
-#
|
||||
-# module.mk
|
||||
-#
|
||||
-# Copyright (C) 2010 Alfred E. Heggestad
|
||||
-#
|
||||
-
|
||||
-MOD := cairo
|
||||
-$(MOD)_SRCS += cairo.c
|
||||
-$(MOD)_LFLAGS += $(shell pkg-config --libs cairo)
|
||||
-$(MOD)_CFLAGS += $(shell pkg-config --cflags cairo)
|
||||
-
|
||||
-include mk/mod.mk
|
||||
diff --git a/src/config.c b/src/config.c
|
||||
index f12dc5a31..483d374c1 100644
|
||||
--- a/src/config.c
|
||||
+++ b/src/config.c
|
||||
@@ -911,7 +911,6 @@ int config_write_template(const char *file, const struct config *cfg)
|
||||
(void)re_fprintf(f, "#module\t\t\t" "v4l2_codec" MOD_EXT "\n");
|
||||
#endif
|
||||
(void)re_fprintf(f, "#module\t\t\t" "x11grab" MOD_EXT "\n");
|
||||
- (void)re_fprintf(f, "#module\t\t\t" "cairo" MOD_EXT "\n");
|
||||
(void)re_fprintf(f, "#module\t\t\t" "vidbridge" MOD_EXT "\n");
|
||||
|
||||
(void)re_fprintf(f, "\n# Video display modules\n");
|
@ -1,492 +0,0 @@
|
||||
From 0a1dc2492856a22a4551b02dc5a866322a7d514d Mon Sep 17 00:00:00 2001
|
||||
From: "Alfred E. Heggestad" <alfred.heggestad@gmail.com>
|
||||
Date: Sat, 24 Apr 2021 13:23:12 +0200
|
||||
Subject: [PATCH] oss: remove deprecated module
|
||||
|
||||
FreeBSD now supports ALSA and Portaudio which can be used instead.
|
||||
---
|
||||
README.md | 2 -
|
||||
mk/modules.mk | 7 -
|
||||
modules/oss/module.mk | 18 --
|
||||
modules/oss/oss.c | 372 ------------------------------------------
|
||||
src/config.c | 4 +-
|
||||
5 files changed, 2 insertions(+), 401 deletions(-)
|
||||
delete mode 100644 modules/oss/module.mk
|
||||
delete mode 100644 modules/oss/oss.c
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index d87a76564..f4afe0a8d 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -88,7 +88,6 @@ Distributed under BSD license
|
||||
- Gstreamer playbin input audio-driver
|
||||
- JACK Audio Connection Kit audio-driver
|
||||
- MacOSX/iOS coreaudio/audiounit audio-driver
|
||||
- - Open Sound System (OSS) audio-driver
|
||||
- Portaudio audio-driver
|
||||
- Windows winwave audio-driver
|
||||
|
||||
@@ -265,7 +264,6 @@ natpmp NAT Port Mapping Protocol (NAT-PMP) module
|
||||
omx OpenMAX IL video display module
|
||||
opensles OpenSLES audio driver
|
||||
opus OPUS Interactive audio codec
|
||||
-oss Open Sound System (OSS) audio driver
|
||||
pcp Port Control Protocol (PCP) module
|
||||
plc Packet Loss Concealment (PLC) using spandsp
|
||||
portaudio Portaudio driver
|
||||
diff --git a/mk/modules.mk b/mk/modules.mk
|
||||
index d4e53a337..6143edd90 100644
|
||||
--- a/mk/modules.mk
|
||||
+++ b/mk/modules.mk
|
||||
@@ -38,7 +38,6 @@
|
||||
# USE_OMX_BELLAGIO libomxil-bellagio xvideosink driver
|
||||
# USE_OPUS Opus audio codec
|
||||
# USE_OPUS_MS Opus multistream audio codec
|
||||
-# USE_OSS OSS audio driver
|
||||
# USE_PLC Packet Loss Concealment
|
||||
# USE_PORTAUDIO Portaudio audio driver
|
||||
# USE_PULSE Pulseaudio audio driver
|
||||
@@ -144,9 +143,6 @@ USE_OPUS := $(shell [ -f $(SYSROOT)/include/opus/opus.h ] || \
|
||||
USE_OPUS_MS := $(shell [ -f $(SYSROOT)/include/opus/opus_multistream.h ] || \
|
||||
[ -f $(SYSROOT_ALT)/include/opus/opus_multistream.h ] || \
|
||||
[ -f $(SYSROOT)/local/include/opus/opus_multistream.h ] && echo "yes")
|
||||
-USE_OSS := $(shell [ -f $(SYSROOT)/include/soundcard.h ] || \
|
||||
- [ -f $(SYSROOT)/include/linux/soundcard.h ] || \
|
||||
- [ -f $(SYSROOT)/include/sys/soundcard.h ] && echo "yes")
|
||||
USE_PLC := $(shell [ -f $(SYSROOT)/include/spandsp/plc.h ] || \
|
||||
[ -f $(SYSROOT_ALT)/include/spandsp/plc.h ] || \
|
||||
[ -f $(SYSROOT_LOCAL)/include/spandsp/plc.h ] && echo "yes")
|
||||
@@ -408,9 +404,6 @@ endif
|
||||
ifneq ($(USE_OPUS),)
|
||||
MODULES += opus
|
||||
endif
|
||||
-ifneq ($(USE_OSS),)
|
||||
-MODULES += oss
|
||||
-endif
|
||||
ifneq ($(USE_PLC),)
|
||||
MODULES += plc
|
||||
endif
|
||||
diff --git a/modules/oss/module.mk b/modules/oss/module.mk
|
||||
deleted file mode 100644
|
||||
index 109d34d63..000000000
|
||||
--- a/modules/oss/module.mk
|
||||
+++ /dev/null
|
||||
@@ -1,18 +0,0 @@
|
||||
-#
|
||||
-# module.mk
|
||||
-#
|
||||
-# Copyright (C) 2010 Alfred E. Heggestad
|
||||
-#
|
||||
-
|
||||
-MOD := oss
|
||||
-$(MOD)_SRCS += oss.c
|
||||
-$(MOD)_LFLAGS +=
|
||||
-
|
||||
-ifeq ($(OS), openbsd)
|
||||
-$(MOD)_LFLAGS += -lossaudio
|
||||
-endif
|
||||
-ifeq ($(OS), netbsd)
|
||||
-$(MOD)_LFLAGS += -lossaudio
|
||||
-endif
|
||||
-
|
||||
-include mk/mod.mk
|
||||
diff --git a/modules/oss/oss.c b/modules/oss/oss.c
|
||||
deleted file mode 100644
|
||||
index 507b8af98..000000000
|
||||
--- a/modules/oss/oss.c
|
||||
+++ /dev/null
|
||||
@@ -1,372 +0,0 @@
|
||||
-/**
|
||||
- * @file oss.c Open Sound System (OSS) driver
|
||||
- *
|
||||
- * Copyright (C) 2010 Alfred E. Heggestad
|
||||
- */
|
||||
-#include <re.h>
|
||||
-#include <rem.h>
|
||||
-#include <baresip.h>
|
||||
-#include <string.h>
|
||||
-#include <unistd.h>
|
||||
-#include <pthread.h>
|
||||
-#include <fcntl.h>
|
||||
-#include <sys/ioctl.h>
|
||||
-#if defined(NETBSD) || defined(OPENBSD)
|
||||
-#include <soundcard.h>
|
||||
-#elif defined (LINUX)
|
||||
-#include <linux/soundcard.h>
|
||||
-#else
|
||||
-#include <sys/soundcard.h>
|
||||
-#endif
|
||||
-#ifdef SOLARIS
|
||||
-#include <sys/filio.h>
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- * @defgroup oss oss
|
||||
- *
|
||||
- * Open Sound System (OSS) audio driver module
|
||||
- *
|
||||
- *
|
||||
- * References:
|
||||
- *
|
||||
- * http://www.4front-tech.com/linux.html
|
||||
- */
|
||||
-
|
||||
-
|
||||
-struct ausrc_st {
|
||||
- pthread_t thread;
|
||||
- bool run;
|
||||
- int fd;
|
||||
- struct ausrc_prm prm;
|
||||
- int16_t *sampv;
|
||||
- size_t sampc;
|
||||
- ausrc_read_h *rh;
|
||||
- ausrc_error_h *errh;
|
||||
- void *arg;
|
||||
-};
|
||||
-
|
||||
-struct auplay_st {
|
||||
- pthread_t thread;
|
||||
- bool run;
|
||||
- int fd;
|
||||
- int16_t *sampv;
|
||||
- size_t sampc;
|
||||
- auplay_write_h *wh;
|
||||
- void *arg;
|
||||
-};
|
||||
-
|
||||
-
|
||||
-static struct ausrc *ausrc;
|
||||
-static struct auplay *auplay;
|
||||
-static char oss_dev[64] = "/dev/dsp";
|
||||
-
|
||||
-
|
||||
-/*
|
||||
- * Automatically calculate the fragment size depending on sampling rate
|
||||
- * and number of channels. More entries can be added to the table below.
|
||||
- *
|
||||
- * NOTE. Powermac 8200 and linux 2.4.18 gives:
|
||||
- * SNDCTL_DSP_SETFRAGMENT: Invalid argument
|
||||
- */
|
||||
-static int set_fragment(int fd, uint32_t sampc)
|
||||
-{
|
||||
- static const struct {
|
||||
- uint16_t max;
|
||||
- uint16_t size;
|
||||
- } fragv[] = {
|
||||
- {10, 7}, /* 10 x 2^7 = 1280 = 4 x 320 */
|
||||
- {15, 7}, /* 15 x 2^7 = 1920 = 6 x 320 */
|
||||
- {20, 7}, /* 20 x 2^7 = 2560 = 8 x 320 */
|
||||
- {25, 7}, /* 25 x 2^7 = 3200 = 10 x 320 */
|
||||
- {15, 8}, /* 15 x 2^8 = 3840 = 12 x 320 */
|
||||
- {20, 8}, /* 20 x 2^8 = 5120 = 16 x 320 */
|
||||
- {25, 8} /* 25 x 2^8 = 6400 = 20 x 320 */
|
||||
- };
|
||||
- size_t i;
|
||||
- const uint32_t buf_size = 2 * sampc;
|
||||
-
|
||||
- for (i=0; i<ARRAY_SIZE(fragv); i++) {
|
||||
- const uint16_t frag_max = fragv[i].max;
|
||||
- const uint16_t frag_size = fragv[i].size;
|
||||
- const uint32_t fragment_size = frag_max * (1<<frag_size);
|
||||
-
|
||||
- if (0 == (fragment_size%buf_size)) {
|
||||
- int fragment = (frag_max<<16) | frag_size;
|
||||
-
|
||||
- if (0 == ioctl(fd, SNDCTL_DSP_SETFRAGMENT,
|
||||
- &fragment)) {
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return ENODEV;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int oss_reset(int fd, uint32_t srate, uint8_t ch, int sampc,
|
||||
- int nonblock)
|
||||
-{
|
||||
- int format = AFMT_S16_NE; /* native endian */
|
||||
- int speed = srate;
|
||||
- int channels = ch;
|
||||
- int blocksize = 0;
|
||||
- int err;
|
||||
-
|
||||
- err = set_fragment(fd, sampc);
|
||||
- if (err)
|
||||
- return err;
|
||||
-
|
||||
- if (0 != ioctl(fd, FIONBIO, &nonblock))
|
||||
- return errno;
|
||||
- if (0 != ioctl(fd, SNDCTL_DSP_SETFMT, &format))
|
||||
- return errno;
|
||||
- if (0 != ioctl(fd, SNDCTL_DSP_CHANNELS, &channels))
|
||||
- return errno;
|
||||
- if (2 == channels) {
|
||||
- int stereo = 1;
|
||||
- if (0 != ioctl(fd, SNDCTL_DSP_STEREO, &stereo))
|
||||
- return errno;
|
||||
- }
|
||||
- if (0 != ioctl(fd, SNDCTL_DSP_SPEED, &speed))
|
||||
- return errno;
|
||||
-
|
||||
- (void)ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &blocksize);
|
||||
-
|
||||
- info("oss: init: %d Hz %d ch, blocksize=%d\n",
|
||||
- speed, channels, blocksize);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void auplay_destructor(void *arg)
|
||||
-{
|
||||
- struct auplay_st *st = arg;
|
||||
-
|
||||
- if (st->run) {
|
||||
- st->run = false;
|
||||
- pthread_join(st->thread, NULL);
|
||||
- }
|
||||
-
|
||||
- if (-1 != st->fd) {
|
||||
- (void)close(st->fd);
|
||||
- }
|
||||
-
|
||||
- mem_deref(st->sampv);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void ausrc_destructor(void *arg)
|
||||
-{
|
||||
- struct ausrc_st *st = arg;
|
||||
-
|
||||
- if (st->run) {
|
||||
- st->run = false;
|
||||
- pthread_join(st->thread, NULL);
|
||||
- }
|
||||
-
|
||||
- if (-1 != st->fd) {
|
||||
- (void)close(st->fd);
|
||||
- }
|
||||
-
|
||||
- mem_deref(st->sampv);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void *record_thread(void *arg)
|
||||
-{
|
||||
- struct ausrc_st *st = arg;
|
||||
- struct auframe af;
|
||||
- uint64_t sampc = 0;
|
||||
- int n;
|
||||
-
|
||||
- while (st->run) {
|
||||
-
|
||||
- n = (int)read(st->fd, st->sampv, st->sampc*2);
|
||||
- if (n <= 0)
|
||||
- continue;
|
||||
-
|
||||
- af.fmt = AUFMT_S16LE;
|
||||
- af.sampv = st->sampv;
|
||||
- af.sampc = n/2;
|
||||
- af.timestamp = sampc * AUDIO_TIMEBASE / st->prm.srate;
|
||||
-
|
||||
- sampc += n/2;
|
||||
-
|
||||
- st->rh(&af, st->arg);
|
||||
- }
|
||||
-
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void *play_thread(void *arg)
|
||||
-{
|
||||
- struct auplay_st *st = arg;
|
||||
- struct auframe af;
|
||||
- int n;
|
||||
-
|
||||
- auframe_init(&af, AUFMT_S16LE, st->sampv, st->sampc);
|
||||
-
|
||||
- while (st->run) {
|
||||
-
|
||||
- st->wh(&af, st->arg);
|
||||
-
|
||||
- n = (int)write(st->fd, st->sampv, st->sampc*2);
|
||||
- if (n < 0) {
|
||||
- warning("oss: write: %m\n", errno);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int src_alloc(struct ausrc_st **stp, const struct ausrc *as,
|
||||
- struct media_ctx **ctx,
|
||||
- struct ausrc_prm *prm, const char *device,
|
||||
- ausrc_read_h *rh, ausrc_error_h *errh, void *arg)
|
||||
-{
|
||||
- struct ausrc_st *st;
|
||||
- int err;
|
||||
-
|
||||
- (void)ctx;
|
||||
- (void)errh;
|
||||
-
|
||||
- if (!stp || !as || !prm || prm->fmt != AUFMT_S16LE || !rh)
|
||||
- return EINVAL;
|
||||
-
|
||||
- st = mem_zalloc(sizeof(*st), ausrc_destructor);
|
||||
- if (!st)
|
||||
- return ENOMEM;
|
||||
-
|
||||
- st->fd = -1;
|
||||
- st->rh = rh;
|
||||
- st->errh = errh;
|
||||
- st->arg = arg;
|
||||
-
|
||||
- if (!device)
|
||||
- device = oss_dev;
|
||||
-
|
||||
- st->prm = *prm;
|
||||
- st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
|
||||
-
|
||||
- st->sampv = mem_alloc(2 * st->sampc, NULL);
|
||||
- if (!st->sampv) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- st->fd = open(device, O_RDONLY);
|
||||
- if (st->fd < 0) {
|
||||
- err = errno;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- err = oss_reset(st->fd, prm->srate, prm->ch, (int)st->sampc, 0);
|
||||
- if (err)
|
||||
- goto out;
|
||||
-
|
||||
- st->run = true;
|
||||
- err = pthread_create(&st->thread, NULL, record_thread, st);
|
||||
- if (err) {
|
||||
- st->run = false;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- out:
|
||||
- if (err)
|
||||
- mem_deref(st);
|
||||
- else
|
||||
- *stp = st;
|
||||
-
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int play_alloc(struct auplay_st **stp, const struct auplay *ap,
|
||||
- struct auplay_prm *prm, const char *device,
|
||||
- auplay_write_h *wh, void *arg)
|
||||
-{
|
||||
- struct auplay_st *st;
|
||||
- int err;
|
||||
-
|
||||
- if (!stp || !ap || !prm || prm->fmt != AUFMT_S16LE || !wh)
|
||||
- return EINVAL;
|
||||
-
|
||||
- st = mem_zalloc(sizeof(*st), auplay_destructor);
|
||||
- if (!st)
|
||||
- return ENOMEM;
|
||||
-
|
||||
- st->fd = -1;
|
||||
- st->wh = wh;
|
||||
- st->arg = arg;
|
||||
-
|
||||
- if (!device)
|
||||
- device = oss_dev;
|
||||
-
|
||||
- st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
|
||||
-
|
||||
- st->sampv = mem_alloc(st->sampc * 2, NULL);
|
||||
- if (!st->sampv) {
|
||||
- err = ENOMEM;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- st->fd = open(device, O_WRONLY);
|
||||
- if (st->fd < 0) {
|
||||
- err = errno;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- err = oss_reset(st->fd, prm->srate, prm->ch, (int)st->sampc, 0);
|
||||
- if (err)
|
||||
- goto out;
|
||||
-
|
||||
- st->run = true;
|
||||
- err = pthread_create(&st->thread, NULL, play_thread, st);
|
||||
- if (err) {
|
||||
- st->run = false;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- out:
|
||||
- if (err)
|
||||
- mem_deref(st);
|
||||
- else
|
||||
- *stp = st;
|
||||
-
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int module_init(void)
|
||||
-{
|
||||
- int err;
|
||||
-
|
||||
- err = ausrc_register(&ausrc, baresip_ausrcl(), "oss", src_alloc);
|
||||
- err |= auplay_register(&auplay, baresip_auplayl(), "oss", play_alloc);
|
||||
-
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int module_close(void)
|
||||
-{
|
||||
- ausrc = mem_deref(ausrc);
|
||||
- auplay = mem_deref(auplay);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-EXPORT_SYM const struct mod_export DECL_EXPORTS(oss) = {
|
||||
- "oss",
|
||||
- "audio",
|
||||
- module_init,
|
||||
- module_close,
|
||||
-};
|
||||
diff --git a/src/config.c b/src/config.c
|
||||
index 6a2e53c06..bf1d99db6 100644
|
||||
--- a/src/config.c
|
||||
+++ b/src/config.c
|
||||
@@ -542,7 +542,7 @@ static const char *default_audio_device(void)
|
||||
return "coreaudio,default";
|
||||
#endif
|
||||
#elif defined (FREEBSD)
|
||||
- return "oss,/dev/dsp";
|
||||
+ return "alsa,default";
|
||||
#elif defined (OPENBSD)
|
||||
return "sndio,default";
|
||||
#elif defined (WIN32)
|
||||
@@ -865,7 +865,7 @@ int config_write_template(const char *file, const struct config *cfg)
|
||||
(void)re_fprintf(f, "#module\t\t\t" "audiounit" MOD_EXT "\n");
|
||||
#endif
|
||||
#elif defined (FREEBSD)
|
||||
- (void)re_fprintf(f, "module\t\t\t" "oss" MOD_EXT "\n");
|
||||
+ (void)re_fprintf(f, "module\t\t\t" "alsa" MOD_EXT "\n");
|
||||
#elif defined (OPENBSD)
|
||||
(void)re_fprintf(f, "module\t\t\t" "sndio" MOD_EXT "\n");
|
||||
#elif defined (WIN32)
|
140
baresip.spec
140
baresip.spec
@ -1,7 +1,7 @@
|
||||
Summary: Modular SIP user-agent with audio and video support
|
||||
Name: baresip
|
||||
Version: 1.1.0
|
||||
Release: 5%{?dist}
|
||||
Version: 2.0.0
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
URL: https://github.com/baresip/baresip
|
||||
Source0: https://github.com/baresip/baresip/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
@ -11,19 +11,16 @@ Source11: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/1e1d6921
|
||||
Source12: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING#/COPYING.adwaita-icon-theme
|
||||
Source13: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_CCBYSA3#/COPYING_CCBYSA3.adwaita-icon-theme
|
||||
Source14: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_LGPL#/COPYING_LGPL.adwaita-icon-theme
|
||||
Patch0: https://github.com/baresip/baresip/commit/68fd6b29d34380f74ea69b32cf055639ae2b7a35.patch#/baresip-1.1.0-call-history.patch
|
||||
Patch1: https://github.com/baresip/baresip/commit/b0669e837daefeaff482a04d6dc15df1c6ebc0f0.patch#/baresip-1.1.0-fritzbox2baresip.patch
|
||||
Patch2: https://github.com/baresip/baresip/commit/01804dcfaf77e298a3f7bdc3d4cfe0882bf681cd.patch#/baresip-1.1.0-module-cairo.patch
|
||||
Patch3: https://github.com/baresip/baresip/commit/0a1dc2492856a22a4551b02dc5a866322a7d514d.patch#/baresip-1.1.0-module-oss.patch
|
||||
Patch4: https://github.com/baresip/baresip/commit/6b54370a48287662daae5721782978662095a9e4.patch#/baresip-1.1.0-attended-transfer.patch
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libre-devel >= 2.0.0
|
||||
BuildRequires: libre-devel >= 2.1.0
|
||||
BuildRequires: librem-devel >= 1.0.0
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
BuildRequires: openssl-devel >= 1.1.0
|
||||
%else
|
||||
BuildRequires: openssl11-devel
|
||||
# Atomic support in libre >= 2.1.0
|
||||
BuildRequires: devtoolset-8-toolchain
|
||||
%endif
|
||||
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} > 7)
|
||||
Recommends: %{name}-pulse%{?_isa} = %{version}-%{release}
|
||||
@ -31,18 +28,22 @@ Recommends: %{name}-pulse%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-pulse%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
Obsoletes: %{name}-cairo < 1.1.0-1
|
||||
Obsoletes: %{name}-rst < 2.0.0-1
|
||||
Obsoletes: %{name}-speex_pp < 2.0.0-1
|
||||
Obsoletes: %{name}-x11grab < 2.0.0-1
|
||||
|
||||
%description
|
||||
A modular SIP user-agent with support for audio and video, and many IETF
|
||||
standards such as SIP, RTP, STUN, TURN, and ICE for both, IPv4 and IPv6.
|
||||
standards such as SIP, SDP, RTP/RTCP and STUN/TURN/ICE for both, IPv4 and
|
||||
IPv6.
|
||||
|
||||
Additional modules provide support for audio codecs like G.711, G.722,
|
||||
G.726, GSM, L16, MPA, and Opus, audio drivers like ALSA, GStreamer, JACK
|
||||
Audio Connection Kit, Portaudio, and PulseAudio, video codecs like VP8 or
|
||||
VP9, video sources like Video4Linux and X11 grabber, video outputs like
|
||||
SDL2 or X11, NAT traversal via STUN, TURN, ICE, NATBD, and NAT-PMP, media
|
||||
encryption via SRTP or DTLS-SRTP, management features like embedded web-
|
||||
server with HTTP interface, command-line console and interface, and MQTT.
|
||||
Additional modules provide support for audio codecs like Codec2, G.711,
|
||||
G.722, G.726, GSM, L16, MPA and Opus, audio drivers like ALSA, GStreamer,
|
||||
JACK Audio Connection Kit, Portaudio, and PulseAudio, video codecs like
|
||||
AV1, VP8 or VP9, video sources like Video4Linux, video outputs like SDL2
|
||||
or X11, NAT traversal via STUN, TURN, ICE, and NAT-PMP, media encryption
|
||||
via TLS, SRTP or DTLS-SRTP, management features like embedded web-server
|
||||
with HTTP interface, command-line console and interface, and MQTT.
|
||||
|
||||
%if 0%{?fedora}
|
||||
%package aac
|
||||
@ -67,6 +68,17 @@ Baresip is a modular SIP user-agent with audio and video support.
|
||||
This module provides the Advanced Linux Sound Architecture (ALSA) audio
|
||||
driver.
|
||||
|
||||
%package av1
|
||||
Summary: AV1 video codec module for baresip
|
||||
BuildRequires: libaom-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description av1
|
||||
Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module provides the AV1 video codec, an open, royalty-free video
|
||||
coding format developed as a successor to the VP9 video codec.
|
||||
|
||||
%package codec2
|
||||
Summary: Codec 2 audio codec module for baresip
|
||||
BuildRequires: codec2-devel
|
||||
@ -265,18 +277,6 @@ Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module provides the PulseAudio audio driver.
|
||||
|
||||
%package rst
|
||||
Summary: Radio streamer audio/video source driver for baresip
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(libmpg123)
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description rst
|
||||
Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module uses mpg123 to play streaming media (MP3) and provide them as
|
||||
an internal audio/video source.
|
||||
|
||||
%package sdl
|
||||
Summary: SDL2 video output driver for baresip
|
||||
BuildRequires: SDL2-devel
|
||||
@ -310,20 +310,6 @@ Baresip is a modular SIP user-agent with audio and video support.
|
||||
This module provides an audio dumper to write WAV audio sample files
|
||||
using libsndfile.
|
||||
|
||||
%package speex_pp
|
||||
Summary: Audio pre-processor module using libspeexdsp for baresip
|
||||
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} > 7)
|
||||
BuildRequires: speexdsp-devel
|
||||
%else
|
||||
BuildRequires: speex-devel
|
||||
%endif
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description speex_pp
|
||||
Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module provides an audio pre-processor using libspeexdsp.
|
||||
|
||||
%package tools
|
||||
Summary: Collection of tools and helper scripts for baresip
|
||||
BuildRequires: python3-devel
|
||||
@ -357,15 +343,14 @@ This module provides the VP9 video codec, which is compatible with the
|
||||
WebRTC standard.
|
||||
|
||||
%package v4l2
|
||||
Summary: Video4Linux video source and codec modules for baresip
|
||||
Summary: Video4Linux video source driver for baresip
|
||||
BuildRequires: libv4l-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description v4l2
|
||||
Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
These modules provide the Video4Linux video source and codec, where
|
||||
latter is for devices that support compressed formats such as H.264.
|
||||
This module provides the Video4Linux video source driver.
|
||||
|
||||
%package x11
|
||||
Summary: X11 video output driver for baresip
|
||||
@ -378,28 +363,16 @@ Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module provides the X11 video output driver.
|
||||
|
||||
%package x11grab
|
||||
Summary: X11 grabber video source driver for baresip
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXext-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description x11grab
|
||||
Baresip is a modular SIP user-agent with audio and video support.
|
||||
|
||||
This module provides the X11 grabber video source driver.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .call-history
|
||||
%patch1 -p1 -b .fritzbox2baresip
|
||||
%patch2 -p1 -b .module-cairo
|
||||
%patch3 -p1 -b .module-oss
|
||||
%patch4 -p1 -b .attended-transfer
|
||||
# https://github.com/baresip/baresip/issues/1770
|
||||
sed -e '/^\$(MOD)\.html/d' -i modules/ctrl_dbus/module.mk
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
sed -e 's|\(openssl\)|openssl11/\1|g' -i mk/modules.mk
|
||||
. /opt/rh/devtoolset-8/enable
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $(pkg-config --cflags-only-I openssl11)"
|
||||
RPM_LD_FLAGS="$RPM_LD_FLAGS $(pkg-config --libs-only-L openssl11)"
|
||||
%endif
|
||||
|
||||
%make_build \
|
||||
@ -435,7 +408,16 @@ gtk-encode-symbolic-svg %{SOURCE11} 16x16 -o $RPM_BUILD_ROOT%{_datadir}/icons/Ad
|
||||
install -p -m 0755 tools/fritzbox2%{name} $RPM_BUILD_ROOT%{_bindir}/fritzbox2%{name}
|
||||
|
||||
%check
|
||||
make test
|
||||
%if 0%{?rhel} == 7
|
||||
. /opt/rh/devtoolset-8/enable
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $(pkg-config --cflags-only-I openssl11)"
|
||||
RPM_LD_FLAGS="$RPM_LD_FLAGS $(pkg-config --libs-only-L openssl11)"
|
||||
%endif
|
||||
|
||||
make test \
|
||||
SHELL='sh -x' \
|
||||
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
||||
EXTRA_LFLAGS="$RPM_LD_FLAGS"
|
||||
|
||||
%if 0%{?rhel} == 7
|
||||
%post gtk
|
||||
@ -467,10 +449,10 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%dir %{_libdir}/%{name}/modules/
|
||||
%{_libdir}/%{name}/modules/account.so
|
||||
%{_libdir}/%{name}/modules/aubridge.so
|
||||
%{_libdir}/%{name}/modules/auconv.so
|
||||
%{_libdir}/%{name}/modules/aufile.so
|
||||
%{_libdir}/%{name}/modules/auloop.so
|
||||
%{_libdir}/%{name}/modules/auresamp.so
|
||||
%{_libdir}/%{name}/modules/ausine.so
|
||||
%{_libdir}/%{name}/modules/b2bua.so
|
||||
%{_libdir}/%{name}/modules/cons.so
|
||||
%{_libdir}/%{name}/modules/contact.so
|
||||
%{_libdir}/%{name}/modules/ctrl_tcp.so
|
||||
@ -487,9 +469,11 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%{_libdir}/%{name}/modules/l16.so
|
||||
%{_libdir}/%{name}/modules/menu.so
|
||||
%{_libdir}/%{name}/modules/mixausrc.so
|
||||
%{_libdir}/%{name}/modules/mixminus.so
|
||||
%{_libdir}/%{name}/modules/multicast.so
|
||||
%{_libdir}/%{name}/modules/mwi.so
|
||||
%{_libdir}/%{name}/modules/natpmp.so
|
||||
%{_libdir}/%{name}/modules/netroam.so
|
||||
%{_libdir}/%{name}/modules/presence.so
|
||||
%{_libdir}/%{name}/modules/rtcpsummary.so
|
||||
%{_libdir}/%{name}/modules/selfview.so
|
||||
@ -502,7 +486,6 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%{_libdir}/%{name}/modules/uuid.so
|
||||
%{_libdir}/%{name}/modules/vidbridge.so
|
||||
%{_libdir}/%{name}/modules/vidinfo.so
|
||||
%{_libdir}/%{name}/modules/vidloop.so
|
||||
%{_libdir}/%{name}/modules/vumeter.so
|
||||
%{_datadir}/%{name}/
|
||||
|
||||
@ -514,6 +497,9 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%files alsa
|
||||
%{_libdir}/%{name}/modules/alsa.so
|
||||
|
||||
%files av1
|
||||
%{_libdir}/%{name}/modules/av1.so
|
||||
|
||||
%files codec2
|
||||
%{_libdir}/%{name}/modules/codec2.so
|
||||
|
||||
@ -574,9 +560,6 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%files pulse
|
||||
%{_libdir}/%{name}/modules/pulse.so
|
||||
|
||||
%files rst
|
||||
%{_libdir}/%{name}/modules/rst.so
|
||||
|
||||
%files sdl
|
||||
%{_libdir}/%{name}/modules/sdl.so
|
||||
|
||||
@ -586,15 +569,11 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%files sndfile
|
||||
%{_libdir}/%{name}/modules/sndfile.so
|
||||
|
||||
%files speex_pp
|
||||
%{_libdir}/%{name}/modules/speex_pp.so
|
||||
|
||||
%files tools
|
||||
%{_bindir}/fritzbox2%{name}
|
||||
|
||||
%files v4l2
|
||||
%{_libdir}/%{name}/modules/v4l2.so
|
||||
%{_libdir}/%{name}/modules/v4l2_codec.so
|
||||
|
||||
%files vp8
|
||||
%{_libdir}/%{name}/modules/vp8.so
|
||||
@ -605,10 +584,19 @@ gtk-update-icon-cache --force %{_datadir}/icons/Adwaita &>/dev/null || :
|
||||
%files x11
|
||||
%{_libdir}/%{name}/modules/x11.so
|
||||
|
||||
%files x11grab
|
||||
%{_libdir}/%{name}/modules/x11grab.so
|
||||
|
||||
%changelog
|
||||
* Sun Mar 13 2022 Robert Scheck <robert@fedoraproject.org> 2.0.0-1
|
||||
- Upgrade to 2.0.0 (#2063451)
|
||||
|
||||
* Thu Jan 27 2022 Tom Callaway <spot@fedoraproject.org> - 1.1.0-8
|
||||
- rebuild for libvpx
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Sun Dec 05 2021 Richard Shaw <hobbes1069@gmail.com> - 1.1.0-6
|
||||
- Rebuild for codec2 1.0.1.
|
||||
|
||||
* Wed Sep 29 2021 Robert Scheck <robert@fedoraproject.org> 1.1.0-5
|
||||
- Added upstream feature patch for GTK+ attended transfers
|
||||
|
||||
|
2
sources
2
sources
@ -1,4 +1,4 @@
|
||||
SHA512 (baresip-1.1.0.tar.gz) = 82616ddfb344c4a48f742a92e9fcdc1fdd3b281950fadee0f3c3c6401d6f31e2232e9a64e5aa0bd8fc54dec02ad4c4573ff6c5a71c0929d89f83e136d35f2a3a
|
||||
SHA512 (baresip-2.0.0.tar.gz) = 6a02b423189a1a5bc267acd5a8162919b30cc2a88acd4fa571b12e2bf8c40abd7757e32742b1824957731bce79680abfa9078271de1865d7a90fd84094e398a3
|
||||
SHA512 (call-incoming-symbolic.svg) = 49b6422efff9986dd4a18b34df4ab185b01b46c44ab5b8c1d45ab1ca25694cb42e73428b0a69e5fe2eb61c4e7a7aba9c0df82b5e0290f45950f3942be63bf987
|
||||
SHA512 (call-outgoing-symbolic.svg) = 142cf668d977e3a709d3c13e01d86fdd09e501affd1756df3000de84581c55b3b5082758b32a73ae0e47f45233cc7e55609f3e54effbba01666ca97d5a55fdaa
|
||||
SHA512 (COPYING.adwaita-icon-theme) = e8963bab4d94d9fbcfc930b95164afff9502e4e53209104f4836fcd6dab2c2e9f105c9f9a17b43bc9502903c9c7b2e0880dacf2339cbe110a19654f13742e20a
|
||||
|
Loading…
x
Reference in New Issue
Block a user