asfdemux: add support for MS-WMSP (application/x-mms-framed)
awyoung@hispeed.ch
Submitted byLink to original bug (#652946)
Description
Created attachment 190207
Core patch
Add support for MS-WMSP (Windows Media HTTP Streaming Protocol: http://msdn.microsoft.com/en-us/library/cc251059%28v=PROT.10%29.aspx) framed ASF. This protocol wraps the ASF packets in an additional framing protocol (application/x-mms-framed). In addition to removing this wrapping, the ASF demuxer needs to be aware of the frame boundaries provided by this protocol, so it seems appropriate to enhance the existing asfdemux plugin rather than supply a new one.
The attached patch includes the core of the technical changes and hardcodes the use of application/x-mms-framed instead of video/x-ms-asf, so clearly it is not yet complete. I guess what is needed is a declaration of the additional application/x-mms-framed capability for the sink pad and code to detect if the incoming data stream is in fact application/x-mms-framed and set the (new) framed flag in the demux structure when that is the case. I am unsure how to do that.
The patch only does anything useful with type H (header) type D (data) packet types (see http://msdn.microsoft.com/en-us/library/cc251224%28v=PROT.10%29.aspx). It might make make sense to detect two consecutive E (end-of-stream) packets as these are sometimes used to signal end of stream without disconnecting the input stream. Otherwise, the existing logic deals sufficiently with consecutive streams, without explicit handling of the E, C and M packets.
Patch 190207, "Core patch":
asfdemux.patch