On Thu, Apr 17, 2008 at 01:15:09AM +0800, zhentan feng wrote: [...] > > > 3, Don't decode the SPS by TS muxer and get the information by add a new > > > struct in AVCodecContext, such as MpegTSH264Desc. > > > When decode the H264 stream, we can write useful information into > > > MpegTSH264Desc and will be later fecthed by the upper level.But we still > > > decode the AVC stream to check the AUD nal units, if the pkt->data > > donnot > > > have the AUD, we should insert AUD nal units to the AVC stream before > > muxing > > > into PES packet. > > > > > > Any ideas about the methods? > > > > > > 1. duplicates code > > I do not understand what you suggest in 3. > > > I mean 3 as two patrs : > 1)Since AVCodecContext priv_data could not be used to pass parameters from > avcodec to avformat, I think it would be feasible to pass these using other > field of AVCodecContext, like opaque, or add additional field to pass that. > That would avoid the redundant work to decode h.264 packet in muxer again > and keep the code in the h264.c decoder clean.
The problem is that a muxer can be used without a decoder or encoder. For example if you have a raw .h264 file or h264 in .mp4 and then want to store this in mpeg-ts. In such a case there would be mp4 demuxer --> h264_mp4toannexb bitstream filter --> mpegts muxer or mpeg ps demuxer --> h264 parser --> mpegts muxer > > 2)This is about AUD nal unit problems. > It is necessary to confirm the AVC stream data wrapped in AVPacket have AUD > nal units. If not,we should decode the AVC stream again and insert AUD nal > uints into the stream. So, this may cause some changes to H264.c or just > decode the stream by TS muxer in the upper level and this may cause some > small duplicate code. This sounds like it could be implemented in a bitstream filter. Similar to h264_mp4toannexb_bsf.c (but in a seperate file and filter of course) -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: Digital signature
_______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
