• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to close a jmf rtp session when the whole file is sent  RSS feed

ahad agwan
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using jmf to Stream a video file from a one client to another, everything seems to be working fine except for the fact that i dont know how to close the prosessor and the session/datasink on the transmitting clients side when the clientis done streaming, i can close it lets say after 60 seconds of starting but i am not able to figure out how make it stop when the whole file is done streaming. i tried using the datasinklistner while sending the video and the following code

but the endofstream event is never received from the datasource.

the problem is that it works fine if i using a 20 second video and i close the datasink and the processor in 60 seconds, the whole file does get streamed but if i have a file longer than 60 seconds then the file just gets cut at 60 seconds.

i also tried to use a sessionmanager with a sessionlistener and a sendStreamListener and the following code

i ran the whole code and sent files and everything but neither an activestreamevent nor a inactivestreamevent happens but the file is being streamed properly
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!