[FFmpeg-devel] [Ffmpeg-devel] [PATCH] Support raw mpegts streams from dvr

Michael Niedermayer michaelni
Wed Jun 6 22:24:46 CEST 2007


Hi

On Wed, Jun 06, 2007 at 05:04:36PM -0000, Wolfram Gloger wrote:
> Hi,
> 
> > From: Michael Niedermayer <michaelni at gmx.at>
> > what needs to be done, first is to change the demuxer so it does keep track
> > of the pcr_pid per program, then the stream used for seeking has to be mapp=
> > ed
> > to the correct pcr_pid
> 
> I just keep the pcr_pid per av_stream, that seems more simple.

ok


> 
> > and if that is unknown (-1 or whatever) then the code
> > should just use any packet to get the pcr hoping that this is not a multi
> > program stream
> 
> I did that and it seems to work for my single-program, PMT-less
> streams.
> 
> Regards,
> Wolfram

> --- ../trunk/libavformat/mpegts.c	2007-06-05 18:11:59.000000000 +0200
> +++ libavformat/mpegts.c	2007-06-06 19:00:02.000000000 +0200
> @@ -36,7 +36,7 @@
>  typedef struct PESContext PESContext;
>  
>  static PESContext* add_pes_stream(MpegTSContext *ts, int pid, int stream_type);
> -static AVStream* new_pes_av_stream(PESContext *pes, uint32_t code);
> +static AVStream* new_pes_av_stream(PESContext *pes, uint32_t code, int pcrpid);
>  
>  enum MpegTSFilterType {
>      MPEGTS_PES,
> @@ -95,6 +95,7 @@
>      int64_t cur_pcr;    /**< used to estimate the exact PCR  */
>      int pcr_incr;       /**< used to estimate the exact PCR  */
>      int pcr_pid;        /**< used to estimate the exact PCR  */
> +    int st_pcr_pid[MAX_STREAMS]; /**< PCR pid for each stream*/

maybe this should rather be added to PESContext?
PESContext is just AVStream.priv_data so its at least as easy to access
and it somehow seems more logic to put it there

except that iam fine with the patch if mans has no objections/comments?

also i think we can remove MpegTSContext.pcr_pid after the patch, ill do that

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070606/6a4552e6/attachment.pgp>



More information about the ffmpeg-devel mailing list