403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/papyon/media/session.pyc
Ñò
O Jc@sjddklZddkTddkZddkZeidƒZdgZdeiefd„ƒYZ	dS(iÿÿÿÿ(tEventsDispatcher(t*Nspapyon.media.sessiontMediaSessioncBsâeZdZheieidfd6eieidfd6Zd„Zed„ƒZ	ed„ƒZ
ed„ƒZed„ƒZed„ƒZ
d	„Zed
„Zd„Zd„Zd
„Zed„Zd„Zd„ZRS(slA media session represents a conference which may include multiple
       streams (audio, video). A session handler might have to be implemented
       on the client side to react to the adding/removing of streams (e.g. UI
       notification). See L{papyon.media.conference.MediaSessionHandler} for a
       default implementation using Farsight 2.0.

       The 'prepared' and 'ready' signals are meant to be handled by the media
       call. For example, we might need to send a session message to the other
       participants once the session is prepared (i.e. we discovered all local
       candidates and codecs).tpreparedtreadycCsEtii|ƒti|ƒ||_g|_t|_h|_dS(s!Initialize the session

           @param type: Session type
           @type type: L{papyon.media.constants.MediaSessionType}
           @param msg_class: The session message class to use (e.g SDPMessage)
           @type msg_class: subclass of L{papyon.media.message.MediaSessionMessage}N(	tgobjecttGObjectt__init__Rt_typet_streamstFalset_processing_messaget_signals(tselfttype((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyR4s
			cCs|idƒdj	S(sJWhether this session contain a video stream or not
           @rtype: booltvideoN(t
get_streamtNone(R
((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyt	has_videoDscCs|iS(sMList of streams
           @rtype: list of L{papyon.media.stream.MediaStream}(R	(R
((s8/usr/lib/python2.6/site-packages/papyon/media/session.pytstreamsJscCs6|iotSx |iD]}|iptSqWtS(s0Are all streams prepared
           @rtype: bool(RR
R	RtTrue(R
tstream((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyRPs


	cCs6|iotSx |iD]}|iptSqWtS(s-Are all streams ready
           @rtype: bool(RR
R	RR(R
R((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyR[s


	cCs|iS(sISession type
           @rtype L{papyon.media.constants.MediaSessionType}(R(R
((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyRfscCs&x|iD]}|i|ƒqWdS(s,Close the session and all contained streams.N(R	t
remove_stream(R
R((s8/usr/lib/python2.6/site-packages/papyon/media/session.pytcloselscCs:tid|ƒt||||ƒ}|id|ƒ|S(sþCreate a new media stream with the given name and direction.
           The created stream need to be added to the session using add_stream.

           @param name: Name of the stream (e.g. audio, video...)
           @type name: string
           @param direction: Direction of the stream
           @type direction: L{papyon.media.constants.MediaStreamDirection}
           @param created_locally: Created locally (outgoing call)
           @type created_locally: boolean

           @returns the new streamsCreate stream %ston_stream_created(tloggertdebugtMediaStreamt	_dispatch(R
tnamet	directiontcreated_locallyR((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyt
create_streamrs
cCsn|id|iƒ}|id|iƒ}|ii|ƒ||g|i|i<|id|ƒ|iƒ|S(sÂAdd a stream to the session and signal it that we are ready to
           handle its signals.

           @param stream: Stream to add
           @type stream: L{papyon.media.stream.MediaStream}RRton_stream_added(	tconnectton_stream_preparedton_stream_readyR	tappendRRRtactivate(R
Rtsptsr((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyt
add_stream„s
cs3t‡fd†|iƒ}|pdS|dSdS(slFind a stream by its name.

           @param name: Name of the stream to find
           @type name: stringcs
|iˆjS((R(tx(R(s8/usr/lib/python2.6/site-packages/papyon/media/session.pyt<lambda>™siN(tfilterR	R(R
Rtmatching((Rs8/usr/lib/python2.6/site-packages/papyon/media/session.pyR“scCsf|i}x"|i|D]}|i|ƒqW|i|=|iƒ|ii|ƒ|id|ƒdS(s–Close a stream and remove it from the session.

           @param stream: Stream to remove
           @type stream: L{papyon.media.stream.MediaStream}ton_stream_removedN(RRt
disconnectRR	tremoveR(R
RRt
handler_id((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyRŸs	

cCsø|iptdƒ‚nt|_x„|iD]y}|i|iƒ}|djoG|o)|i|i|iƒ}|i	|ƒq™td|iƒ‚n|i
|ƒq-Wt|_|o:|io|i
dƒn|io|i
dƒqôndS(sÓParse the received session message and create media streams
           accordingly. The created streams are added but we only emit the
           'prepared' and 'ready' signals once all the descriptions are
           processed. 

           @param msg: Session message received from a peer
           @type msg: L{papyon.media.message.MediaSessionMessage}
           @param initial: Whether or not this is the first message received
           @type initial: booleans0Session message does not contain any informations&Invalid stream "%s" in session messageRRN(tdescriptionst
ValueErrorRRRRRR RR)tprocess_remote_descriptionR
RtemitR(R
tmsgtinitialtdescR((s8/usr/lib/python2.6/site-packages/papyon/media/session.pytprocess_remote_message­s$
	

	

cCs,|iotidƒ|idƒndS(NsAll media streams are preparedR(RRRR5(R
R((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyR#Ïs

cCs,|iotidƒ|idƒndS(NsAll media streams are readyR(RRRR5(R
R((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyR$Ôs

(((t__name__t
__module__t__doc__RtSIGNAL_RUN_FIRSTt	TYPE_NONEt__gsignals__RtpropertyRRRRRRR
R R)RRR9R#R$(((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyRs,


					"	(
tpapyon.eventRtpapyon.media.streamRtloggingt	getLoggerRt__all__RR(((s8/usr/lib/python2.6/site-packages/papyon/media/session.pyt<module>s
	

Youez - 2016 - github.com/yon3zu
LinuXploit