[FFmpeg-soc] Extend TSMuxer to H264 muxing

zhentan feng spyfeng at gmail.com
Tue Apr 15 15:33:34 CEST 2008


Hi

2008/4/14, Baptiste Coudurier <baptiste.coudurier at smartjog.com>:
>
> On Mon, Apr 14, 2008 at 02:40:54PM +0800, zhentan feng wrote:
> > [...]
> >
> > > > +                if(st->codec->codec_id == CODEC_ID_H264){
>
> > > > +                    H264Context * h_st = st->codec->priv_data;
> > >
> > > This is invalid, there is a reason why its called priv_data, and that
> is
> > > that it is private to the codec.
> >
> > I think it is the key point to write descriptors into PMT for AVC
> stream.
> > Can't I get the h264 codec information when init TS out stream?
> > Do you mean the *priv_data* only could be used by libavcodec functions,
> we
> > can't read some information from it by other extern functions?
> > If so, I am a little confused how could I get information when init the
> > descriptor?
> >
>
>
> No you cannot, only libavcodec h264 decoder is allowed to use priv_data,
> TS muxer has to parse PPS/PPS and gather needed infos.


Here is the  new patch names "h264_desc_aud_patch4-15.diff" attached below.

1,Add a new struct MpegTSH264Desc in MpegTSWriteStream to collect
information of AVC stream descriptors.
2,Parser the SPS and VUI to write descriptor into PMT.
3,Check the AUD nal units. if pkt don't have ,then insert AUD nal units into
the AVPacket data.

Thanks for your any advice and best wishes.

-- 
Best wishes~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_desc_aud_patch4-15.diff
Type: application/octet-stream
Size: 12218 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080415/51ec5c46/attachment.obj>


More information about the FFmpeg-soc mailing list