Unreal Media Server Forum Index Unreal Media Server
ATTENTION! THIS FORUM IS READ ONLY AS OF SEPTEMBER 1 2009.

PLEASE POST QUESTIONS TO OUR NEW FORUM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TV Channel Changer

 
Post new topic   Reply to topic    Unreal Media Server Forum Index -> Live applications
View previous topic :: View next topic  
Author Message
sebastien



Joined: 21 Sep 2007
Posts: 4

PostPosted: Thu Dec 13, 2007 11:18 am    Post subject: TV Channel Changer Reply with quote

It's not possible to use the COM object "Unreal.TVChanger" during the streaming with my TV card. So, I write the following script to change the channel in the LiveServer configuration file.

Code:

   function SetChannelInXml(iNumChannel, iCountryCode)

      on error resume next

      dim xmlFilePath
      dim xmlTVNode
      dim xmlNamespace
      
      xmlFilePath = "C:\Program Files\UnrealStreaming\ULiveServer\ULiveMediaGrabber.config"
      xmlNamespace = "umedia:"
      xmlTVNode = "//" & xmlNamespace & "LiveMediaSourceConfig" & "/"   & xmlNamespace & "Source" & "/"   & xmlNamespace & "Video"  & "/"   & xmlNamespace & "TV"
      
      dim xml
      set xml = Server.CreateObject("Microsoft.XMLDOM")
      
      xml.async = False
      xml.resolveExternals = False
      xml.validateOnParse  = False
      
      xml.load (xmlFilePath)
   
      if xml.parseError.errorcode<>0 then
         response.write "XML TV File KO : " & xmlFilePath
      else
   xml.setProperty "SelectionNamespaces", "xmlns:umedia='http://umediaserver.net/LiveMediaConfig'"
         
         
         xml.setProperty "SelectionLanguage", "XPath"
         
         Dim node
         Set node = xml.selectSingleNode(xmlTVNode)
         
         if not node is Nothing Then
            node.setAttribute "Channel", iNumChannel
            
            node.setAttribute "CountryCode", iCountryCode

            xml.save (xmlFilePath)
         else
            response.write "XML TV Node KO : " & xmlTVNode
         end if
      end if

   end function


It's working well but I need to wait about 15 seconds before to restart the streaming because the last source has to be disconnected.
I wanted to use the 'Disconnect' method of the "LiveConn.DynBroadcast" COM object to force the LiveServer to read the file and to relaunch the streaming but the live source never stop the streaming. Is it normal ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Unreal Media Server Forum Index -> Live applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group