#NEWLINE# def _create_rtmp_stream( self , video ) : #NEWLINE# #INDENT# ( name , stream_url ) = video #NEWLINE# params = { #NEWLINE# #INDENT# 'rtmp' : stream_url , #NEWLINE# 'pageUrl' : self . url , #NEWLINE# 'swfVfy' : self . _get_swf_url ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# if stream_url . endswith ( '.mp4' ) : #NEWLINE# #INDENT# ( tcurl , playpath ) = rtmpparse ( stream_url ) #NEWLINE# params [ 'rtmp' ] = name #NEWLINE# params [ 'playpath' ] = playpath #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# params [ 'live' ] = True #NEWLINE# #UNINDENT# return ( name , RTMPStream ( self . session , params ) )