[Ffmpeg-devel] STREAM_TYPE_PRIVATE_DATA support in mpegts

Andy Parkins andyparkins
Fri May 5 09:43:46 CEST 2006


Hello,

Please find attached a patch to enable arbitrary data stream support in mpegts 
streams.

----------
libavformat/mpegtsenc.c
 * Added CODEC_TYPE_DATA support; fairly simple - dealt with just as
   subtitle packets are - i.e. never buffered, always sent instantly

libavformat/mpegts.c
 * Added CODEC_TYPE_DATA support; but it's done in a roundabout fashion.
   mpegtsenc.c::mpegts_write_pmt() writes all non-video, non-audio
   streams as STREAM_TYPE_PRIVATE_DATA transport PES types.
   mpegts.c::pmt_cb() on the other hand silently dropped any
   STREAM_TYPE_PRIVATE_DATA streams; it doesn't any more, they are now
   treated just like STREAM_TYPE_SUBTITLE_DVB streams. i.e.
   new_pes_av_stream() is called to create a corresponding AVStream
   instance.  However, new_pes_av_stream() would treat
   STREAM_TYPE_PRIVATE_DATA streams as if they were some special MPEG
   stream. Now, STREAM_TYPE_PRIVATE_DATA sets
   codec_type to CODEC_TYPE_DATA and codec_id to CODEC_ID_NONE.
-----------

I'm not sure how acceptable it is to set a codec as explicitly CODEC_ID_NONE; 
but I'm sure you'll all tell me :-)



Andy
-- 
Dr Andy Parkins, M Eng (hons), AMIEE
andyparkins at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-patch-060504.diff
Type: text/x-diff
Size: 1500 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060505/b11cf756/attachment.diff>



More information about the ffmpeg-devel mailing list