24 May '13 - 17:53 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: BASS_WMA_EncodeOpenPublish - how to detect if connection is lost?  (Read 495 times)
fmcoder
Posts: 386


« on: 27 Jun '12 - 17:42 »
Reply with quoteQuote

I'm using BASS_WMA_EncodeOpenPublish to stream data tothe Windows Media Server, this part works fine.
The question is: how to detect if connection was closed so program will perform reconnect? Is there a function like BASS_Encode_SetNotify exist for WMA encoders I don't know about?
Logged
fmcoder
Posts: 386


« Reply #1 on: 30 Jun '12 - 17:19 »
Reply with quoteQuote

It seems like I found a solution (sort of)
If calling to BASS_WMA_EncodeWrite fails, the program decides that connection is dead. Not sure if it's a correct solution, but it's better than nothing.
Logged
Ian @ un4seen
Administrator
Posts: 15275


« Reply #2 on: 2 Jul '12 - 14:45 »
Reply with quoteQuote

There isn't currently a BASSWMA equaivalent of BASSenc's BASS_Encode_SetNotify function (there is a BASS_WMA_EncodeSetNotify but that's just for client connection notifications), but you can indeed use the BASS_WMA_EncodeWrite return value to detect problems. If that fails, you could try reinitializing the WMA encoder, eg. calling BASS_WMA_EncodeOpenPublish again.
Logged
fmcoder
Posts: 386


« Reply #3 on: 3 Jul '12 - 10:59 »
Reply with quoteQuote

Hmm... the BASS_Encode_SetNotify function is not working with the encoders created via BASS_WMA_EncodeOpenPublish Smiley The error code is 37, which is "The encoder was not created with BASS_WMA_EncodeOpenNetwork".

I wanted to use it to count listeners, but it didn't work out...
Logged
Ian @ un4seen
Administrator
Posts: 15275


« Reply #4 on: 3 Jul '12 - 17:09 »
Reply with quoteQuote

Yep, unfortunately it isn't possible to know about clients connecting to a publishing point on a Windows Media server. You can only get client notifications on a local server (setup via BASS_WMA_EncodeOpenNetwork/Multi).
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines