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.
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.
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
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..
You can get length directly in a module:
And the logs report x-file-size, x-file-length and sc-stream-bytes in the "stop" EventCode:StreamUtils.getStreamLength(IMediaStream);
Richard
Thank you, Richard!
However I need to get _all_ these values programmatically..
is there any chance to do this?
You can use IOPerformanceCounter.getMessagesOutBytes(). I think you will need the IMediaStreamActionNotify2 interface onStop event handler, where you can do:
RichardCode:Long outbytes = stream.getMediaIOPerformance().getMessagesOutBytes();