Results 1 to 2 of 2

Thread: How to get duration value from windows media services 9

  1. #1
    Join Date
    Oct 2010
    Posts
    1

    How to get duration value from windows media services 9

    I'm using windows media services 9 to provide streaming service and would like to make sure users can only play within specified interval to prevent abuse. The media server reads and from asx file and the player can start and end at the correct offset. I can get the start offset at AuthorizePlayEvent using

    IWMSContext.GetQwordValue(WMSDefines.WMS_PRESENT_START_TIME,WMSDefines.WMS_PRESENT_START_TIME_ID, out dec, 0);


    But I'm having problem getting the duration or end offset. I know windows media server writes log that contains c-starttime and x-duration. But the x-duration here doesn't seem to be what I want. I like to detect the <duration> that gets passed from asx file at either AuthorizeOpenEvent or AuthorizePlayEvent. If the starttime and duration are not valid, I would like to fail the authentication and stop playing. Is this possible?

    Thanks!

  2. #2
    Join Date
    Dec 2007
    Posts
    1,736

    Re: How to get duration value from windows media services 9

    I am not sure if WMS_PRESENT_DURATION_LO is meant to be a "updateable" value or not. If setting that context value does not work, one other idea is that there is a WMS_USER_ID in User context which I believe is unique for each client that is connected.

    As long as you can map this to some data structure that maintains when the client was connected, you can check periodically (say during heartbeat) and see if any client has gotten past the time it is supposed to play and if it has, simply disconnect it. There might be other/better ways to do this, but this was the first thing that came to my mind. HOpe this helps.

Similar Threads

  1. Windows Media Services
    By xavier1693 in forum Tips & Tweaks
    Replies: 1
    Last Post: 30-04-2011, 12:09 PM
  2. Media Services Are Not Available for Torch 9800
    By The-Apollo in forum Portable Devices
    Replies: 6
    Last Post: 09-10-2010, 05:24 PM
  3. Windows media 9 services and WMP11
    By Aufgedyng in forum Windows Software
    Replies: 3
    Last Post: 30-10-2009, 01:08 PM
  4. Replies: 1
    Last Post: 26-09-2009, 04:46 PM
  5. Microsoft Windows Media Services plug-ins
    By Dil-Ber in forum Media Player
    Replies: 1
    Last Post: 09-01-2009, 01:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,302,203.56338 seconds with 17 queries