[arch-commits] Commit in gajim/trunk (PKGBUILD gajim-port-to-farstream.patch)
Eric Bélanger
eric at archlinux.org
Sat May 12 07:12:04 UTC 2012
Date: Saturday, May 12, 2012 @ 03:12:03
Author: eric
Revision: 158840
upgpkg: gajim 0.15-3
Fix video/voice support (close FS#29845), Add python2-docutils optdepends, Clean up depends and optdepends
Added:
gajim/trunk/gajim-port-to-farstream.patch
Modified:
gajim/trunk/PKGBUILD
-------------------------------+
PKGBUILD | 21 +-
gajim-port-to-farstream.patch | 364 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 376 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-05-12 06:18:28 UTC (rev 158839)
+++ PKGBUILD 2012-05-12 07:12:03 UTC (rev 158840)
@@ -3,29 +3,32 @@
pkgname=gajim
pkgver=0.15
-pkgrel=2
+pkgrel=3
pkgdesc="A full featured and easy to use Jabber client"
arch=('any')
url="http://www.gajim.org/"
license=('GPL3')
-depends=('pygtk' 'python2' 'python2-pyopenssl' 'hicolor-icon-theme' 'dnsutils' 'python2-pyasn1')
+depends=('pygtk' 'python2-pyopenssl' 'hicolor-icon-theme' 'dnsutils' 'python2-pyasn1')
makedepends=('gettext' 'intltool')
optdepends=('dbus-python: dbus support'
- 'farsight2: video/voice support'
- 'gstreamer0.10-good: video/voice support'
- 'gstreamer0.10-bad: video/voice support'
- 'gtkspell: spelling support'
+ 'farstream: for video/voice support'
+ 'gstreamer0.10-bad: for video/voice support'
+ 'gtkspell: for spelling support'
'libxss: for idle module'
'notification-daemon: for desktop notification'
'python-gnomekeyring: for GnomeKeyring support'
- 'pycrypto: support for E2E encryption')
+ 'pycrypto: support for E2E encryption'
+ 'python2-docutils: for RST generator support')
options=('!libtool')
install=gajim.install
-source=(http://www.gajim.org/downloads/${pkgver}/gajim-${pkgver}.tar.bz2)
-sha1sums=('68934aa40090d21b2937df551373e454f5aa6bb6')
+source=(http://www.gajim.org/downloads/${pkgver}/gajim-${pkgver}.tar.bz2 \
+ gajim-port-to-farstream.patch)
+sha1sums=('68934aa40090d21b2937df551373e454f5aa6bb6'
+ '50fbda69e481d6d2b239adfe4c50ac4415b2e93d')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 -i ../gajim-port-to-farstream.patch
PYTHON=python2 ./configure --prefix=/usr --enable-site-packages
make
}
Added: gajim-port-to-farstream.patch
===================================================================
--- gajim-port-to-farstream.patch (rev 0)
+++ gajim-port-to-farstream.patch 2012-05-12 07:12:03 UTC (rev 158840)
@@ -0,0 +1,364 @@
+Index: src/chat_control.py
+===================================================================
+--- src/chat_control.py (revision 13730)
++++ src/chat_control.py (revision 13731)
+@@ -1650,13 +1650,13 @@
+ self.msg_textview.grab_focus()
+
+- # change tooltip text for audio and video buttons if python-farsight is
++ # change tooltip text for audio and video buttons if python-farstream is
+ # not installed
+- if not gajim.HAVE_FARSIGHT:
++ if not gajim.HAVE_FARSTREAM:
+ tooltip_text = self._audio_button.get_tooltip_text()
+ self._audio_button.set_tooltip_text(
+- '%s\n%s' % (tooltip_text, _('Requires python-farsight.')))
++ '%s\n%s' % (tooltip_text, _('Requires python-farstream.')))
+ tooltip_text = self._video_button.get_tooltip_text()
+ self._video_button.set_tooltip_text(
+- '%s\n%s' % (tooltip_text, _('Requires python-farsight.')))
++ '%s\n%s' % (tooltip_text, _('Requires python-farstream.')))
+
+ gajim.ged.register_event_handler('pep-received', ged.GUI1,
+@@ -1706,5 +1706,5 @@
+ # Jingle detection
+ if self.contact.supports(NS_JINGLE_ICE_UDP) and \
+- gajim.HAVE_FARSIGHT and self.contact.resource:
++ gajim.HAVE_FARSTREAM and self.contact.resource:
+ self.audio_available = self.contact.supports(NS_JINGLE_RTP_AUDIO)
+ self.video_available = self.contact.supports(NS_JINGLE_RTP_VIDEO)
+Index: src/common/gajim.py
+===================================================================
+--- src/common/gajim.py (revision 13591)
++++ src/common/gajim.py (revision 13731)
+@@ -170,19 +170,19 @@
+ HAVE_LATEX = False
+
+-HAVE_FARSIGHT = True
+-try:
+- farsight = __import__('farsight')
++HAVE_FARSTREAM = True
++try:
++ farstream = __import__('farstream')
+ import gst
+ import glib
+ try:
+ conference = gst.element_factory_make('fsrtpconference')
+- session = conference.new_session(farsight.MEDIA_TYPE_AUDIO)
++ session = conference.new_session(farstream.MEDIA_TYPE_AUDIO)
+ del session
+ del conference
+ except glib.GError:
+- HAVE_FARSIGHT = False
+-
+-except ImportError:
+- HAVE_FARSIGHT = False
++ HAVE_FARSTREAM = False
++
++except ImportError:
++ HAVE_FARSTREAM = False
+
+ HAVE_UPNP_IGD = True
+Index: src/common/helpers.py
+===================================================================
+--- src/common/helpers.py (revision 13602)
++++ src/common/helpers.py (revision 13731)
+@@ -1331,5 +1331,5 @@
+ if gajim.config.get_per('accounts', a, 'answer_receipts'):
+ gajim.gajim_optional_features[a].append(xmpp.NS_RECEIPTS)
+- if gajim.HAVE_FARSIGHT:
++ if gajim.HAVE_FARSTREAM:
+ gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE)
+ gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE_RTP)
+Index: src/common/jingle.py
+===================================================================
+--- src/common/jingle.py (revision 13372)
++++ src/common/jingle.py (revision 13731)
+@@ -36,5 +36,5 @@
+
+ from jingle_session import JingleSession, JingleStates
+-if gajim.HAVE_FARSIGHT:
++if gajim.HAVE_FARSTREAM:
+ from jingle_rtp import JingleAudio, JingleVideo
+
+Index: src/common/jingle_rtp.py
+===================================================================
+--- src/common/jingle_rtp.py (revision 13408)
++++ src/common/jingle_rtp.py (revision 13731)
+@@ -22,5 +22,5 @@
+
+ import xmpp
+-import farsight, gst
++import farstream, gst
+ from glib import GError
+
+@@ -43,6 +43,6 @@
+ self.media = media
+ self._dtmf_running = False
+- self.farsight_media = {'audio': farsight.MEDIA_TYPE_AUDIO,
+- 'video': farsight.MEDIA_TYPE_VIDEO}[media]
++ self.farstream_media = {'audio': farstream.MEDIA_TYPE_AUDIO,
++ 'video': farstream.MEDIA_TYPE_VIDEO}[media]
+
+ self.pipeline = None
+@@ -60,5 +60,5 @@
+ self.callbacks['session-terminate-sent'] += [self.__stop]
+
+- def setup_stream(self):
++ def setup_stream(self, on_src_pad_added):
+ # pipeline and bus
+ self.pipeline = gst.Pipeline()
+@@ -69,11 +69,10 @@
+ # conference
+ self.conference = gst.element_factory_make('fsrtpconference')
+- self.conference.set_property('sdes-cname', self.session.ourjid)
+ self.pipeline.add(self.conference)
+ self.funnel = None
+
+- self.p2psession = self.conference.new_session(self.farsight_media)
+-
+- participant = self.conference.new_participant(self.session.peerjid)
++ self.p2psession = self.conference.new_session(self.farstream_media)
++
++ participant = self.conference.new_participant()
+ # FIXME: Consider a workaround, here...
+ # pidgin and telepathy-gabble don't follow the XEP, and it won't work
+@@ -94,5 +93,7 @@
+
+ self.p2pstream = self.p2psession.new_stream(participant,
+- farsight.DIRECTION_RECV, 'nice', params)
++ farstream.DIRECTION_RECV)
++ self.p2pstream.connect('src-pad-added', on_src_pad_added)
++ self.p2pstream.set_transmitter('nice', params)
+
+ def is_ready(self):
+@@ -118,5 +119,5 @@
+ # Instead, it should be etablished after session-accept!
+ if self.sent:
+- self.p2pstream.set_remote_candidates(candidates)
++ self.p2pstream.add_remote_candidates(candidates)
+
+ def batch_dtmf(self, events):
+@@ -141,13 +142,12 @@
+ def _start_dtmf(self, event):
+ if event in ('*', '#'):
+- event = {'*': farsight.DTMF_EVENT_STAR,
+- '#': farsight.DTMF_EVENT_POUND}[event]
++ event = {'*': farstream.DTMF_EVENT_STAR,
++ '#': farstream.DTMF_EVENT_POUND}[event]
+ else:
+ event = int(event)
+- self.p2psession.start_telephony_event(event, 2,
+- farsight.DTMF_METHOD_RTP_RFC4733)
++ self.p2psession.start_telephony_event(event, 2)
+
+ def _stop_dtmf(self):
+- self.p2psession.stop_telephony_event(farsight.DTMF_METHOD_RTP_RFC4733)
++ self.p2psession.stop_telephony_event()
+
+ def _fill_content(self, content):
+@@ -171,16 +171,16 @@
+ name = message.structure.get_name()
+ log.debug('gst element message: %s: %s' % (name, message))
+- if name == 'farsight-new-active-candidate-pair':
++ if name == 'farstream-new-active-candidate-pair':
+ pass
+- elif name == 'farsight-recv-codecs-changed':
++ elif name == 'farstream-recv-codecs-changed':
+ pass
+- elif name == 'farsight-codecs-changed':
+- if self.sent and self.p2psession.get_property('codecs-ready'):
++ elif name == 'farstream-codecs-changed':
++ if self.sent and self.p2psession.get_property('codecs'):
+ self.send_description_info()
+- elif name == 'farsight-local-candidates-prepared':
++ elif name == 'farstream-local-candidates-prepared':
+ self.candidates_ready = True
+ if self.is_ready():
+ self.session.on_session_state_changed(self)
+- elif name == 'farsight-new-local-candidate':
++ elif name == 'farstream-new-local-candidate':
+ candidate = message.structure['candidate']
+ self.transport.candidates.append(candidate)
+@@ -188,15 +188,14 @@
+ # FIXME: Is this case even possible?
+ self.send_candidate(candidate)
+- elif name == 'farsight-component-state-changed':
++ elif name == 'farstream-component-state-changed':
+ state = message.structure['state']
+- if state == farsight.STREAM_STATE_FAILED:
++ if state == farstream.STREAM_STATE_FAILED:
+ reason = xmpp.Node('reason')
+ reason.setTag('failed-transport')
+ self.session.remove_content(self.creator, self.name, reason)
+- elif name == 'farsight-error':
+- log.error('Farsight error #%d!\nMessage: %s\nDebug: %s' % (
++ elif name == 'farstream-error':
++ log.error('Farstream error #%d!\nMessage: %s' % (
+ message.structure['error-no'],
+- message.structure['error-msg'],
+- message.structure['debug-msg']))
++ message.structure['error-msg']))
+ elif message.type == gst.MESSAGE_ERROR:
+ # TODO: Fix it to fallback to videotestsrc anytime an error occur,
+@@ -237,8 +236,8 @@
+ if self.accepted:
+ if self.transport.remote_candidates:
+- self.p2pstream.set_remote_candidates(self.transport.remote_candidates)
++ self.p2pstream.add_remote_candidates(self.transport.remote_candidates)
+ self.transport.remote_candidates = []
+- # TODO: farsight.DIRECTION_BOTH only if senders='both'
+- self.p2pstream.set_property('direction', farsight.DIRECTION_BOTH)
++ # TODO: farstream.DIRECTION_BOTH only if senders='both'
++ self.p2pstream.set_property('direction', farstream.DIRECTION_BOTH)
+ JingleContent.on_negotiated(self)
+
+@@ -253,6 +252,6 @@
+ # ignore invalid payload-types
+ continue
+- c = farsight.Codec(int(codec['id']), codec['name'],
+- self.farsight_media, int(codec['clockrate']))
++ c = farstream.Codec(int(codec['id']), codec['name'],
++ self.farstream_media, int(codec['clockrate']))
+ if 'channels' in codec:
+ c.channels = int(codec['channels'])
+@@ -319,5 +318,5 @@
+
+ def setup_stream(self):
+- JingleRTPContent.setup_stream(self)
++ JingleRTPContent.setup_stream(self, self._on_src_pad_added)
+
+ # Configure SPEEX
+@@ -327,8 +326,8 @@
+ # account only the first codec
+
+- codecs = [farsight.Codec(farsight.CODEC_ID_ANY, 'SPEEX',
+- farsight.MEDIA_TYPE_AUDIO, 16000),
+- farsight.Codec(farsight.CODEC_ID_ANY, 'SPEEX',
+- farsight.MEDIA_TYPE_AUDIO, 8000)]
++ codecs = [farstream.Codec(farstream.CODEC_ID_ANY, 'SPEEX',
++ farstream.MEDIA_TYPE_AUDIO, 16000),
++ farstream.Codec(farstream.CODEC_ID_ANY, 'SPEEX',
++ farstream.MEDIA_TYPE_AUDIO, 8000)]
+ self.p2psession.set_codec_preferences(codecs)
+
+@@ -349,7 +348,6 @@
+ self.src_bin.get_pad('src').link(self.p2psession.get_property(
+ 'sink-pad'))
+- self.p2pstream.connect('src-pad-added', self._on_src_pad_added)
+-
+- # The following is needed for farsight to process ICE requests:
++
++ # The following is needed for farstream to process ICE requests:
+ self.pipeline.set_state(gst.STATE_PLAYING)
+
+@@ -364,5 +362,5 @@
+ # sometimes, one window won't show up,
+ # sometimes it'll freeze...
+- JingleRTPContent.setup_stream(self)
++ JingleRTPContent.setup_stream(self, self._on_src_pad_added)
+
+ # the local parts
+@@ -396,7 +394,6 @@
+ self.src_bin.get_pad('src').link(self.p2psession.get_property(
+ 'sink-pad'))
+- self.p2pstream.connect('src-pad-added', self._on_src_pad_added)
+-
+- # The following is needed for farsight to process ICE requests:
++
++ # The following is needed for farstream to process ICE requests:
+ self.pipeline.set_state(gst.STATE_PLAYING)
+
+Index: src/common/jingle_transport.py
+===================================================================
+--- src/common/jingle_transport.py (revision 13522)
++++ src/common/jingle_transport.py (revision 13731)
+@@ -74,5 +74,5 @@
+
+ try:
+- import farsight
++ import farstream
+ except Exception:
+ pass
+@@ -83,9 +83,9 @@
+
+ def make_candidate(self, candidate):
+- types = {farsight.CANDIDATE_TYPE_HOST: 'host',
+- farsight.CANDIDATE_TYPE_SRFLX: 'srflx',
+- farsight.CANDIDATE_TYPE_PRFLX: 'prflx',
+- farsight.CANDIDATE_TYPE_RELAY: 'relay',
+- farsight.CANDIDATE_TYPE_MULTICAST: 'multicast'}
++ types = {farstream.CANDIDATE_TYPE_HOST: 'host',
++ farstream.CANDIDATE_TYPE_SRFLX: 'srflx',
++ farstream.CANDIDATE_TYPE_PRFLX: 'prflx',
++ farstream.CANDIDATE_TYPE_RELAY: 'relay',
++ farstream.CANDIDATE_TYPE_MULTICAST: 'multicast'}
+ attrs = {
+ 'component': candidate.component_id,
+@@ -99,5 +99,5 @@
+ if candidate.type in types:
+ attrs['type'] = types[candidate.type]
+- if candidate.proto == farsight.NETWORK_PROTOCOL_UDP:
++ if candidate.proto == farstream.NETWORK_PROTOCOL_UDP:
+ attrs['protocol'] = 'udp'
+ else:
+@@ -118,17 +118,17 @@
+ candidates = []
+ for candidate in transport.iterTags('candidate'):
+- cand = farsight.Candidate()
++ cand = farstream.Candidate()
+ cand.component_id = int(candidate['component'])
+ cand.ip = str(candidate['ip'])
+ cand.port = int(candidate['port'])
+ cand.foundation = str(candidate['foundation'])
+- #cand.type = farsight.CANDIDATE_TYPE_LOCAL
++ #cand.type = farstream.CANDIDATE_TYPE_LOCAL
+ cand.priority = int(candidate['priority'])
+
+ if candidate['protocol'] == 'udp':
+- cand.proto = farsight.NETWORK_PROTOCOL_UDP
++ cand.proto = farstream.NETWORK_PROTOCOL_UDP
+ else:
+ # we actually don't handle properly different tcp options in jingle
+- cand.proto = farsight.NETWORK_PROTOCOL_TCP
++ cand.proto = farstream.NETWORK_PROTOCOL_TCP
+
+ cand.username = str(transport['ufrag'])
+@@ -136,9 +136,9 @@
+
+ #FIXME: huh?
+- types = {'host': farsight.CANDIDATE_TYPE_HOST,
+- 'srflx': farsight.CANDIDATE_TYPE_SRFLX,
+- 'prflx': farsight.CANDIDATE_TYPE_PRFLX,
+- 'relay': farsight.CANDIDATE_TYPE_RELAY,
+- 'multicast': farsight.CANDIDATE_TYPE_MULTICAST}
++ types = {'host': farstream.CANDIDATE_TYPE_HOST,
++ 'srflx': farstream.CANDIDATE_TYPE_SRFLX,
++ 'prflx': farstream.CANDIDATE_TYPE_PRFLX,
++ 'relay': farstream.CANDIDATE_TYPE_RELAY,
++ 'multicast': farstream.CANDIDATE_TYPE_MULTICAST}
+ if 'type' in candidate and candidate['type'] in types:
+ cand.type = types[candidate['type']]
+Index: src/features_window.py
+===================================================================
+--- src/features_window.py (revision 13595)
++++ src/features_window.py (revision 13731)
+@@ -104,7 +104,7 @@
+ _('Requires python-docutils.'),
+ _('Requires python-docutils.')),
+- _('Audio / Video'): (self.farsight_available,
++ _('Audio / Video'): (self.farstream_available,
+ _('Ability to start audio and video chat.'),
+- _('Requires python-farsight and gstreamer-plugins-bad.'),
++ _('Requires python-farstream and gstreamer-plugins-bad.'),
+ _('Feature not available under Windows.')),
+ _('UPnP-IGD'): (self.gupnp_igd_available,
+@@ -259,6 +259,6 @@
+ return True
+
+- def farsight_available(self):
+- return gajim.HAVE_FARSIGHT
++ def farstream_available(self):
++ return gajim.HAVE_FARSTREAM
+
+ def gupnp_igd_available(self):
More information about the arch-commits
mailing list