[rtmpdump] [PATCH] AMF Object Callback

Howard Chu hyc at highlandsun.com
Thu Jul 28 05:17:37 CEST 2011


Chris Larsen wrote:
> Hello, the attached patch is a re-submit of one I posted earlier. It adds an
> AMF callback method that lets the client application work directly with
> received AMF objects to parse them for information like LLNW or Akamai
> authentication instead of having to build custom stuff like that directly into
> rtmpdump. Please let me know if the patch is bad or you find something wrong
> with it. Thanks.

Making a global callback like this is terrible. How are apps supposed to 
manage this? What if one library adds a callback and then another library or 
app tries to add a different callback? What if different threads talking to 
different servers want to each use their own callbacks?

Static global variables that might get manipulated from multiple threads are 
absolutely forbidden. Changing the global library state like this is 
forbidden. Doing either of these things invites all kinds of crashes and other 
mysterious problems.

A patch that extends the RTMP structure might be acceptable. The AMF_Dump 
function is primarily a debug function, you should not abuse it this way.

The feature presented here is totally unusable.


More information about the rtmpdump mailing list