| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/papyon/media/ |
Upload File : |
Ñò
O Jc @ sv d d k l Z d d k Td d k Z d d k Z d d k Z e i d ƒ Z d g Z d e i e f d „ ƒ YZ
d S( iÿÿÿÿ( t EventsDispatcher( t *Ns papyon.media.streamt MediaStreamc B s e Z d Z h e i e i d f d 6e i e i d f d 6Z d „ Z e d „ ƒ Z e d „ ƒ Z
e d „ ƒ Z e d „ ƒ Z e d „ ƒ Z
e d „ ƒ Z d
„ Z d „ Z d „ Z d
„ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sü A stream used to transfer media data. It can be an audio or video
stream and may have codecs and transport candidates associated with it.
A stream handler implementing the L{papyon.event.MediaStreamEventInferface}
might need to execute some actions when a stream receives remote codecs
and candidates (e.g. codecs negotiation) or when closed. (e.g. UI
notification). See L{papyon.media.conference.MediaStreamHandler} for a
default implementation using Farsight 2.0.t preparedt readyc C s¨ t i i | ƒ t i | ƒ t i | ƒ | _ | | _ t | _ | | _
| | _ g | _ t | _
d | _ g | _ t | _ g | _ d | _ g | _ g | _ d S( sÉ Initialize the media stream.
@param session: Session that contains this stream
@type session: L{papyon.media.session.MediaSession}
@param name: Stream name
@type name: string
@param direction: Stream direction
@type direction: L{papyon.media.constants.MediaStreamDirection}
@param created: Whether or not the stream has been requested by the client
@type created: boolN( t gobjectt GObjectt __init__R t weakreft reft _sessiont _namet Falset _activet _createdt
_directiont
_local_codecst _local_codecs_preparedt Nonet _local_candidate_idt _local_candidatest _local_candidates_preparedt _remote_codecst _remote_candidate_idt _remote_candidatest relays( t selft sessiont namet directiont created( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR 3 s
c C s
| i ƒ S( s Parent session( R
( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR P s c C s | i S( s Stream name( R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR U s c C s | i S( s- Is the stream created locally (outgoing call)( R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyt created_locallyZ s c C s | i S( sX Direction of the stream
@rtype L{papyon.media.constants.MediaStreamDirection}( R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR _ s c C s | i o | i S( s3 Are the stream local codecs and candidates received( R R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR e s
c C s | i d j o
| i d j S( s Is the candidate pair selectedN( R R R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR k s c C s | i d ƒ d S( s Close the streamt on_stream_closedN( t _dispatch( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyt closeq s c C sb | i | _ | i ƒ \ } } | o | i i | ƒ n | o | d i | _ n | i ƒ d S( så Set remote stream informations (candidates, codecs) from the given
stream description.
@param desc: Remote stream description to process
@type desc: L{papyon.media.message.MediaStreamDescription}i N( t valid_codecsR t get_candidatesR t extendt
foundationR t process( R t desct remote_candidatest local_candidates( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyt process_remote_descriptionu s c C s t | _ | i ƒ d S( sY Function called once the stream handler is ready to handle the
stream signals.N( t TrueR
R' ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyt activateŒ s c C sU | i p d S| i o | i d | i ƒ n | i o | i d | i ƒ n d S( s¿ Emit signals if we need to. (i.e. if we have received the list
of remote codecs or remote candidates. Only do it once the
stream handler is ready (self._active == True).Nt on_remote_codecs_receivedt on_remote_candidates_received( R
R R! R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyR' ’ s
c C s | i S( s: Returns the list of possible local codecs for this stream.( R ( R ( ( s7 /usr/lib/python2.6/site-packages/papyon/media/stream.pyt get_local_codecsŸ s c s4 | i ‰ | i } ˆ o t ‡ f d † | ƒ S| S( s¬ Returns the active local candidates or all the candidates if there
isn't any active one. This list is meant to be sent to the other
call participants.c s
| i ˆ j S( ( R&