Advertisement
Guest User

Untitled

a guest
Aug 19th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.05 KB | None | 0 0
  1. Using some of the above code changes, trying to see what is going on with the stop function. ( got it kind of fully working, without removing this earlier, but seems to be unhappy at this point again, might be intermittant )
  2.  
  3. Implemented following debugging statements to give feedback
  4.  
  5. mediacontroller.py
  6. :472
  7. def video_reset(self, controller):
  8. """
  9. Responds to the request to reset a loaded video
  10. """
  11. #log.debug(u'video_reset')
  12. print 'btm: video_reset-start'
  13. print 'btm: video_reset-self.set_controls_visible(controller, False)'
  14. self.set_controls_visible(controller, False)
  15. print 'btm: video_reset-for display in self.curDisplayMediaPlayer.keys():'
  16. for display in self.curDisplayMediaPlayer.keys():
  17. print 'btm: video_reset-if display.controller == controller:'
  18. if display.controller == controller:
  19. print 'btm: video_reset-display.override = {}'
  20. display.override = {}
  21. print 'btm: video_reset-self.curDisplayMediaPlayer[display].reset(display)'
  22. self.curDisplayMediaPlayer[display].reset(display)
  23. print 'btm: video_reset- self.curDisplayMediaPlayer[display].set_visible(display, False)'
  24. self.curDisplayMediaPlayer[display].set_visible(display, False)
  25. print 'btm: video_reset-display.frame.evaluateJavaScript'
  26. display.frame.evaluateJavaScript(u'show_video( \
  27. "setBackBoard", null, null, null,"hidden");')
  28. print 'btm: video_reset-start'
  29. del self.curDisplayMediaPlayer[display]
  30. print 'btm: video_reset-del self.curDisplayMediaPlayer[display]'
  31. print 'btm: video_reset-end'
  32.  
  33.  
  34. vlcplayer.py
  35. :226
  36. def reset(self, display):
  37. print "btm: reset display"
  38. print "btm: stop()" <--- this is last statement where entire app hangs, which means it's in vlc.py stop function below
  39. #display.vlcMediaPlayer.stop()
  40. print "btm: setVisible(False)"
  41. display.vlcWidget.setVisible(False)
  42. print "btm: state = MediaState.Off"
  43. self.state = MediaState.Off
  44. print "btm: done reset display"
  45. pass
  46.  
  47. vlc.py
  48. :2419
  49. def stop(self):
  50. '''Stop (no effect if there is no media).
  51. '''
  52. return libvlc_media_player_stop(self)
  53.  
  54.  
  55. :4326
  56. def libvlc_media_player_stop(p_mi):
  57. '''Stop (no effect if there is no media).
  58. @param p_mi: the Media Player.
  59. '''
  60. f = _Cfunctions.get('libvlc_media_player_stop', None) or \
  61. _Cfunction('libvlc_media_player_stop', ((1,),), None,
  62. None, MediaPlayer)
  63. return f(p_mi)
  64.  
  65.  
  66. Tested with various vlc versions as follows, all on 10.6 mac
  67.  
  68. vlc-2.0.3-32and64bit.dmg
  69. Starting on OS X now
  70. btm vlc_args: --no-video-title-show
  71. btm: video_reset-start
  72. btm: video_reset-self.set_controls_visible(controller, False)
  73. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  74. btm: video_reset-end
  75. btm: video_reset-start
  76. btm: video_reset-self.set_controls_visible(controller, False)
  77. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  78. btm: video_reset-end
  79. btm: video_reset-start
  80. btm: video_reset-self.set_controls_visible(controller, False)
  81. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  82. btm: video_reset-end
  83. btm: video_reset-start
  84. btm: video_reset-self.set_controls_visible(controller, False)
  85. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  86. btm: video_reset-end
  87. btm: video_reset-start
  88. btm: video_reset-self.set_controls_visible(controller, False)
  89. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  90. btm: video_reset-if display.controller == controller:
  91. btm: video_reset-display.override = {}
  92. btm: video_reset-self.curDisplayMediaPlayer[display].reset(display)
  93. btm: reset display
  94. btm: stop()
  95. (app freezes here)
  96.  
  97. vlc-2.0.3-intel64.dmg
  98. File "/Users/brianmeyerdesign/Projects/openlp/mysqlideas/build/pyi.darwin/OpenLP/out00-PYZ.pyz/openlp.core.ui.media.vlc", line 107, in find_lib
  99. File "/Users/brianmeyerdesign/Projects/openlp/mysqlideas/build/pyi.darwin/OpenLP/out00-PYZ.pyz/ctypes", line 365, in __init__
  100. OSError: dlopen(/Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib, 6): no suitable image found. Did find:
  101. /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib: mach-o, but wrong architecture
  102.  
  103. vlc-2.0.3-intel32.dmg
  104. Starting on OS X now
  105. btm vlc_args: --no-video-title-show
  106. btm: video_reset-start
  107. btm: video_reset-self.set_controls_visible(controller, False)
  108. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  109. btm: video_reset-end
  110. btm: video_reset-start
  111. btm: video_reset-self.set_controls_visible(controller, False)
  112. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  113. btm: video_reset-end
  114. btm: video_reset-start
  115. btm: video_reset-self.set_controls_visible(controller, False)
  116. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  117. btm: video_reset-end
  118. btm: video_reset-start
  119. btm: video_reset-self.set_controls_visible(controller, False)
  120. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  121. btm: video_reset-end
  122. TagLib: MP4: No audio tracks
  123. TagLib: MP4: No audio tracks
  124. btm: video_reset-start
  125. btm: video_reset-self.set_controls_visible(controller, False)
  126. btm: video_reset-for display in self.curDisplayMediaPlayer.keys():
  127. btm: video_reset-if display.controller == controller:
  128. btm: video_reset-display.override = {}
  129. btm: video_reset-self.curDisplayMediaPlayer[display].reset(display)
  130. btm: reset display
  131. btm: stop()
  132.  
  133. Now used Spin Control when it dies...
  134. Call graph:
  135. 2461 Thread_1835944 DispatchQueue_1: com.apple.main-thread (serial)
  136. + 2461 vlc_join (in libvlccore.5.dylib) + 23 [0x1a089bd7]
  137. + 2461 pthread_join$UNIX2003 (in libSystem.B.dylib) + 1021 [0x915b5be8]
  138. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  139. 2461 Thread_1835946 DispatchQueue_2: com.apple.libdispatch-manager (serial)
  140. + 2461 start_wqthread (in libSystem.B.dylib) + 30 [0x9156e5c6]
  141. + 2461 _pthread_wqthread (in libSystem.B.dylib) + 390 [0x9156e781]
  142. + 2461 _dispatch_worker_thread2 (in libSystem.B.dylib) + 240 [0x9156ecfe]
  143. + 2461 _dispatch_queue_invoke (in libSystem.B.dylib) + 163 [0x9156ef59]
  144. + 2461 _dispatch_mgr_invoke (in libSystem.B.dylib) + 215 [0x9156fa9c]
  145. + 2461 kevent (in libSystem.B.dylib) + 10 [0x9156f382]
  146. 2461 Thread_1836192
  147. + 2461 thread_start (in libSystem.B.dylib) + 34 [0x915760de]
  148. + 2461 _pthread_start (in libSystem.B.dylib) + 345 [0x91576259]
  149. + 2461 QThreadPrivate::start(void*) (in libQtCore.4.dylib) + 381 [0x1218742b]
  150. + 2461 QThread::exec() (in libQtCore.4.dylib) + 203 [0x1218470d]
  151. + 2461 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in libQtCore.4.dylib) + 494 [0x12279970]
  152. + 2461 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in libQtCore.4.dylib) + 234 [0x122aaf68]
  153. + 2461 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) (in libQtCore.4.dylib) + 1180 [0x122aaaac]
  154. + 2461 QEventDispatcherUNIX::select(int, fd_set*, fd_set*, fd_set*, timeval*) (in libQtCore.4.dylib) + 45 [0x122a9bb1]
  155. + 2461 qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) (in libQtCore.4.dylib) + 440 [0x122a5dc8]
  156. + 2461 select$DARWIN_EXTSN (in libSystem.B.dylib) + 10 [0x91567ac6]
  157. 2461 Thread_1836237: com.apple.CFSocket.private
  158. + 2461 thread_start (in libSystem.B.dylib) + 34 [0x915760de]
  159. + 2461 _pthread_start (in libSystem.B.dylib) + 345 [0x91576259]
  160. + 2461 __CFSocketManager (in CoreFoundation) + 1091 [0x95286c53]
  161. + 2461 select$DARWIN_EXTSN (in libSystem.B.dylib) + 10 [0x91567ac6]
  162. 2461 Thread_1836286
  163. + 2461 vlc_join (in libvlccore.5.dylib) + 23 [0x1a089bd7]
  164. + 2461 pthread_join$UNIX2003 (in libSystem.B.dylib) + 1021 [0x915b5be8]
  165. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  166. 2461 Thread_1836292
  167. + 2461 ff_thread_get_buffer (in libavcodec_plugin.dylib) + 284 [0x24c413fc]
  168. + 2461 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  169. + 2461 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  170. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  171. 2461 Thread_1836293
  172. + 2461 frame_worker_thread (in libavcodec_plugin.dylib) + 160 [0x24c41620]
  173. + 2461 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  174. + 2461 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  175. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  176. 2461 Thread_1836294
  177. + 2461 frame_worker_thread (in libavcodec_plugin.dylib) + 160 [0x24c41620]
  178. + 2461 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  179. + 2461 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  180. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  181. 2461 Thread_1836295
  182. + 2461 vlc_cond_wait (in libvlccore.5.dylib) + 23 [0x1a089e57]
  183. + 2461 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  184. + 2461 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  185. + 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  186. 2461 Thread_1836296
  187. + 2461 vlc_mutex_lock (in libvlccore.5.dylib) + 15 [0x1a089f7f]
  188. + 2461 pthread_mutex_lock (in libSystem.B.dylib) + 490 [0x9154e646]
  189. + 2461 semaphore_wait_signal_trap (in libSystem.B.dylib) + 10 [0x91548b42]
  190. 2461 Thread_1836298
  191. 2461 Open (in libvout_macosx_plugin.dylib) + 587 [0x21bdfaab]
  192. 2461 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] (in Foundation) + 184 [0x98d2b80f]
  193. 2461 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] (in Foundation) + 1111 [0x98d18d35]
  194. 2461 -[NSCondition wait] (in Foundation) + 316 [0x98d2b6b3]
  195. 2461 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  196. 2461 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  197. 2461 __semwait_signal (in libSystem.B.dylib) + 10 [0x91576aa2]
  198.  
  199. Total number in stack (recursive counted multiple, when >=5):
  200. 7 __semwait_signal (in libSystem.B.dylib) + 0 [0x91576a98]
  201. 5 _pthread_cond_wait (in libSystem.B.dylib) + 1191 [0x9157675e]
  202. 5 pthread_cond_wait$UNIX2003 (in libSystem.B.dylib) + 73 [0x915783f8]
  203.  
  204. Sort by top of stack, same collapsed (when >= 5):
  205. __semwait_signal (in libSystem.B.dylib) 17227
  206. select$DARWIN_EXTSN (in libSystem.B.dylib) 4922
  207. kevent (in libSystem.B.dylib) 2461
  208. semaphore_wait_signal_trap (in libSystem.B.dylib) 2461
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement