[FFmpeg-devel] [FFmpeg-soc] [Patch]GSoC 2008 qualification task TS Muxer
Michael Niedermayer
michaelni
Mon Mar 24 20:53:46 CET 2008
On Mon, Mar 24, 2008 at 11:09:12PM +0800, zhentan feng wrote:
> hi all,
> I have read through ISO13818 and the original TS Muxer codes by
> several days, and finally generated a patch attached below.
> I just extracted the common code lines from mpegtsenc.c and mpegenc.c,
> and added these codes to mpegpesenc.c and .h files.
> It may have some errors or unsuitable format although i have reviewed
> many times.
> Thanks anyone who points them out.
>
> Further more, I have 2 questions:
> 1)How can I test my patch is correct?
> I just get 4 files through the link:
> svn://svn.mplayerhq.hu/soc/dvbmuxer.
> I download the ffmpeg source code from
> svn://svn.mplayerhq.hu/ffmpeg/trunk,but I can not find the 4files.
> Is it means that I should copy the 4 files to ffmpeg sourcer code and
> overwrite some files and rebuild the all source codes?
One of the 4 files is a patch which i assume can be applied, possibly to
an old ffmpeg version.
[...]
> Index: mpegenc.c
> ===================================================================
> --- mpegenc.c (revision 2027)
> +++ mpegenc.c (working copy)
[...]
> Index: mpegpes.h
> ===================================================================
> --- mpegpes.h (revision 2027)
> +++ mpegpes.h (working copy)
> @@ -61,7 +61,51 @@
> int64_t vobu_start_pts;
> } PESStream;
>
> +/**
> + * PS stream structure
> + */
> +typedef struct {
> + int packet_size; /* required packet size */
> + int packet_number;
> + int pack_header_freq; /* frequency (in packets^-1) at which we send pack headers */
> + int system_header_freq;
> + int system_header_size;
> + int mux_rate; /* bitrate in units of 50 bytes/s */
> + /* stream info */
> + int audio_bound;
> + int video_bound;
> + int is_mpeg2;
> + int is_vcd;
> + int is_svcd;
> + int is_dvd;
> + int64_t last_scr; /* current system clock */
>
> + double vcd_padding_bitrate; //FIXME floats
> + int64_t vcd_padding_bytes_written;
> +
> +} MpegMuxContext;
> +
> +/**
> + * TS stream structure
> + */
> +typedef struct MpegTSWrite {
> + MpegTSSection pat; /* MPEG2 pat table */
> + MpegTSSection sdt; /* MPEG2 sdt table context */
> + MpegTSService **services;
> + int sdt_packet_count;
> + int sdt_packet_freq;
> + int pat_packet_count;
> + int pat_packet_freq;
> + int nb_services;
> + int onid;
> + int tsid;
> + int packet_number;
> + int64_t last_pcr; /* last programme clock reference */
> + int64_t cur_pcr; /* current programme clock reference */
> + int mux_rate;
> + int packet_size;
> +} MpegTSWrite;
These structs do not belong into the PES code
Also this patch is against soc-svn not ffmpeg-svn. We need one or more
clean patches against ffmpeg-svn which move the common PES code into
seperate files and makes both PS and TS muxers use this common code.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080324/8bae7b7a/attachment.pgp>
More information about the ffmpeg-devel
mailing list