mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-05 11:00:48 +02:00
jitsi: Add autorecording support
This commit is contained in:
parent
f84c90d6af
commit
2d69160a50
4 changed files with 128 additions and 1 deletions
|
|
@ -1 +1,3 @@
|
|||
AUX autorecording.patch 4579 BLAKE2B 2ea533ad541e54013b1416124bb6919ae3b2baf21724aaf47296cc13cfe9c8f0c628653c51cc201ab61c9eef89571b07994a8f852f77809b93d265edd20c6a02 SHA512 4b51c4882de7480460eae9f859a766bb73999fdefad1b7cb9a016c92c5a5455d6229193c3087e84aea9ee4fc12012e07766a146c89f9de683487027781231172
|
||||
DIST jitsi-2.11.5633.tar.gz 57295986 BLAKE2B b58964462059cbbf038210b0434534042bf0acdd97f9eb695d4c5a76768fd31cbc2cc14b20f158c461a4dd575cba2bc9ac7afeeef986e7954794259698efc46c SHA512 55b4fe74e3e953900ecfc1a4e230a2577676a63597d2afed02dad2f1a0ac9c2211d5769f425b4cf90ca77473d5d8715dd462de02c41b98857c1fcf4a4bf41503
|
||||
EBUILD jitsi-2.11.5633.ebuild 1529 BLAKE2B c9f59756473d1d9a5e2788af264b65e111dc5803e7c1e598f8a4e05c7bfe4cd28fd8c64f17a9e6777bc9f2c6abb635f37ca03f599af26ad42287e58ef7b1a3e1 SHA512 c9d558c6494abcd7934ea7fe967227f94fc97894d616417ca8981757e330beffa661b952ce8240f31d03615f829ff28a03f3f27438936cf917e378f88ecfc386
|
||||
|
|
|
|||
111
net-im/jitsi/files/autorecording.patch
Normal file
111
net-im/jitsi/files/autorecording.patch
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java b/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
|
||||
index d83b769ae..5544dd13a 100644
|
||||
--- a/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
|
||||
+++ b/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
|
||||
@@ -69,7 +69,7 @@ public class RecordButton
|
||||
/**
|
||||
* Maximum allowed file name length.
|
||||
*/
|
||||
- private static final int MAX_FILENAME_LENGTH = 64;
|
||||
+ private static final int MAX_FILENAME_LENGTH = 255;
|
||||
|
||||
/**
|
||||
* The full filename of the saved call on the file system.
|
||||
@@ -125,6 +125,12 @@ public RecordButton(Call call, boolean selected)
|
||||
if ((saveDir != null) && (saveDir.length() != 0))
|
||||
toolTip += " (" + saveDir + ")";
|
||||
setToolTipText(toolTip);
|
||||
+
|
||||
+ if(configuration.getString(
|
||||
+ "net.java.sip.communicator.impl.neomedia.AUTORECORD", "false").
|
||||
+ equals("true")) {
|
||||
+ this.doClick();
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,12 +250,13 @@ private String getCallPeerName(int maxLength)
|
||||
List<CallPeer> callPeers = call.getConference().getCallPeers();
|
||||
CallPeer callPeer = null;
|
||||
String peerName = "";
|
||||
+
|
||||
if (!callPeers.isEmpty())
|
||||
{
|
||||
callPeer = callPeers.get(0);
|
||||
if (callPeer != null)
|
||||
{
|
||||
- peerName = callPeer.getDisplayName();
|
||||
+ peerName = "" + callPeer.getAddress() + "-" + callPeer.getDisplayName();
|
||||
peerName = peerName.replaceAll("[^\\da-zA-Z\\_\\-@\\.]","");
|
||||
if(peerName.length() > maxLength)
|
||||
{
|
||||
diff --git a/src/net/java/sip/communicator/impl/neomedia/CallRecordingConfigForm.java b/src/net/java/sip/communicator/impl/neomedia/CallRecordingConfigForm.java
|
||||
index bb34246a9..412e94359 100644
|
||||
--- a/src/net/java/sip/communicator/impl/neomedia/CallRecordingConfigForm.java
|
||||
+++ b/src/net/java/sip/communicator/impl/neomedia/CallRecordingConfigForm.java
|
||||
@@ -74,6 +74,7 @@ public class CallRecordingConfigForm
|
||||
private final SipCommFileChooser dirChooser;
|
||||
private JComboBox formatsComboBox;
|
||||
private JCheckBox saveCallsToCheckBox;
|
||||
+ private JCheckBox autoRecordCheckBox;
|
||||
/**
|
||||
* Directory where calls are stored. Default is SC_HOME/calls.
|
||||
*/
|
||||
@@ -109,6 +110,16 @@ public CallRecordingConfigForm()
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
Object source = e.getSource();
|
||||
+ if (source == autoRecordCheckBox) {
|
||||
+ boolean selected = autoRecordCheckBox.isSelected();
|
||||
+
|
||||
+ NeomediaActivator
|
||||
+ .getConfigurationService()
|
||||
+ .setProperty(
|
||||
+ "net.java.sip.communicator.impl.neomedia.AUTORECORD",
|
||||
+ selected);
|
||||
+
|
||||
+ }
|
||||
if (source == saveCallsToCheckBox)
|
||||
{
|
||||
boolean selected = saveCallsToCheckBox.isSelected();
|
||||
@@ -239,6 +250,14 @@ private void initComponents()
|
||||
labelsPanel.add(formatsLabel);
|
||||
labelsPanel.add(saveCallsToCheckBox);
|
||||
|
||||
+ JPanel autoRecordPanel = new TransparentPanel(new GridLayout(1, 1));
|
||||
+
|
||||
+ autoRecordCheckBox
|
||||
+ = new SIPCommCheckBox("Enble Autorecording");
|
||||
+ autoRecordCheckBox.addActionListener(this);
|
||||
+
|
||||
+ autoRecordPanel.add(autoRecordCheckBox);
|
||||
+
|
||||
// saved calls directory panel
|
||||
JPanel callDirPanel = new TransparentPanel(new BorderLayout());
|
||||
|
||||
@@ -266,6 +285,7 @@ private void initComponents()
|
||||
|
||||
mainPanel.add(labelsPanel, BorderLayout.WEST);
|
||||
mainPanel.add(valuesPanel, BorderLayout.CENTER);
|
||||
+ mainPanel.add(autoRecordPanel, BorderLayout.PAGE_END);
|
||||
|
||||
this.add(mainPanel, BorderLayout.NORTH);
|
||||
}
|
||||
@@ -293,6 +313,9 @@ private void loadValues()
|
||||
= NeomediaActivator.getConfigurationService();
|
||||
String format = configuration.getString(Recorder.FORMAT);
|
||||
|
||||
+ boolean autoRecord =
|
||||
+ configuration.getString("net.java.sip.communicator.impl.neomedia.AUTORECORD", "false").equals("true");
|
||||
+
|
||||
formatsComboBox.setSelectedItem(
|
||||
(format == null)
|
||||
? SoundFileUtils.DEFAULT_CALL_RECORDING_FORMAT
|
||||
@@ -304,6 +327,7 @@ private void loadValues()
|
||||
callDirTextField.setEnabled(saveCallsToCheckBox.isSelected());
|
||||
callDirTextField.getDocument().addDocumentListener(this);
|
||||
callDirChooseButton.setEnabled(saveCallsToCheckBox.isSelected());
|
||||
+ autoRecordCheckBox.setSelected(autoRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -16,7 +16,7 @@ SRC_URI="https://github.com/jitsi/jitsi/archive/refs/tags/${MY_PV}.tar.gz -> ${P
|
|||
LICENSE="LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
IUSE="autorecording"
|
||||
|
||||
CDEPEND="
|
||||
sys-apps/dbus
|
||||
|
|
@ -37,7 +37,14 @@ EANT_BUILD_TARGET="rebuild"
|
|||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/autorecording.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use autorecording; then
|
||||
eapply "${FILESDIR}"/autorecording.patch
|
||||
fi
|
||||
cp lib/accounts.properties.template lib/accounts.properties
|
||||
eapply_user
|
||||
}
|
||||
|
|
|
|||
7
net-im/jitsi/metadata.xml
Normal file
7
net-im/jitsi/metadata.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<use>
|
||||
<flag name="autorecording">Add option to automatically record calls</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
Loading…
Reference in a new issue