Hi all, As I am progressing quite well on the C# implementation, I run into some issues. One of the issues I face has to do with the FLVReader class. I decided to implement caching for the keyframe tags and here is where the problem starts:
When someone requests an FLV, the file is analyzed. This takes a lot of resources, so I don't want this for every request to the same stream. Therefore I use the cache to store the keyframe maps. However, when 2 connections request the same file at the same time, the cache is not yet populated with the keyframe data, so both threads start analyzing the file... Now, what I would want is to have 1 analyzer and the other ones waiting for the first to finish and then get the data from cache (provided it is in there) How could I accomplish this at best in Java? Idea: One thing that crossed my mind is a locked list of 'in the works' analyzers - a kind of pre-cache, implemented in the FLVReader class that gets notified when the first analyzer finishes. Any thought anyone? /Rob _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
