1 Reply Latest reply on Jan 31, 2012 7:39 AM by 855587

    Calling setMediaTime on Processor causes EndOfMedia event

      I am trying play an OGG files with JMF (using J-ogg library). I want to give to user an ability to navigate a sound. I have discovered that only thing i can use is setMediaTime method of a processor. But if i call this method (even with 0) processor fire with this events and stop to play:

      12:23:59,721 [JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler] javax.media.RestartingEvent[source=com.sun.media.processor.unknown.Handler@1fd682c,previous=Started,current=Prefetched,target=Started,mediaTime=javax.media.Time@f54e75]
      12:23:59,721 [JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler] javax.media.MediaTimeSetEvent[source=com.sun.media.processor.unknown.Handler@1fd682c,mediaTime=javax.media.Time@f1e6e4]
      12:23:59,724 [JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler] javax.media.StartEvent[source=com.sun.media.processor.unknown.Handler@1fd682c,previous=Prefetched,current=Started,target=Started,mediaTime=javax.media.Time@b8f5f5,timeBaseTime=javax.media.Time@11be5be]
      12:24:01,074 [JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler] javax.media.EndOfMediaEvent[source=com.sun.media.processor.unknown.Handler@1fd682c,previous=Started,current=Prefetched,target=Prefetched,mediaTime=javax.media.Time@1ce3388]

      I have tryed all i can but not succeed. Please, point me what can be a cause of this behaviour.
        • 1. Re: Calling setMediaTime on Processor causes EndOfMedia event
          Found that j-ogg library OggParser class (OGG Demultiplexer) not fully supported setTime() method. I have just replace

          "return Time.TIME_UNKNOWN;"


          "return time;"

          Where "time" is method parameter. This is not fully correct, because this method must return time which really has been set, but this solution works fine for me now. In future i'll try to improve this method.