Results 1 to 6 of 6

Thread: get stream destroy reason on StreamDestroy handler

  1. #1

    Default get stream destroy reason on StreamDestroy handler

    Hi!

    Is it possible to know what the reason caused stream to stop in StreamDestroy handler?
    For example, file was not found (local, or mediacache).
    or some internal server error.

    Thank you.

  2. #2
    Join Date
    Dec 2007
    Posts
    25,641

    Default

    Not explicitly, but there is a ton of data in the stream object and there is a lot you might be able to infer from it. Try putting a break point in the onStreamDestroy event and exploring the stream object.

    Richard

  3. #3

    Default

    Ehm.. and what about getting file size/length?
    I tried to put a break point, however long exploring of all objects didn't give me anything..

  4. #4
    Join Date
    Dec 2007
    Posts
    25,641

    Default

    You can get length directly in a module:

    Code:
    StreamUtils.getStreamLength(IMediaStream);
    And the logs report x-file-size, x-file-length and sc-stream-bytes in the "stop" Event

    Richard

  5. #5

    Default

    Thank you, Richard!
    However I need to get _all_ these values programmatically..
    is there any chance to do this?

  6. #6
    Join Date
    Dec 2007
    Posts
    25,641

    Default

    You can use IOPerformanceCounter.getMessagesOutBytes(). I think you will need the IMediaStreamActionNotify2 interface onStop event handler, where you can do:

    Code:
    Long outbytes = stream.getMediaIOPerformance().getMessagesOutBytes();
    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •