[FFmpeg-cvslog] Reimplement stream probe try #2
Michael Niedermayer
michaelni at gmx.at
Tue Apr 5 00:48:58 CEST 2011
On Mon, Apr 04, 2011 at 02:44:44PM -0700, Baptiste Coudurier wrote:
> Hi,
>
> On 04/04/2011 12:53 PM, Michael Niedermayer wrote:
> > On Mon, Apr 04, 2011 at 11:06:23AM -0700, Baptiste Coudurier wrote:
> >> On 4/3/11 9:20 AM, Michael Niedermayer wrote:
> >>> [...]
> >>>
> >>> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> >>> index 803acb3..71e8d73 100644
> >>> --- a/libavformat/mpegts.c
> >>> +++ b/libavformat/mpegts.c
> >>> @@ -704,10 +704,10 @@ static int mpegts_push_data(MpegTSFilter *filter,
> >>> code != 0x1ff && code != 0x1f2 && /* program_stream_directory, DSMCC_stream */
> >>> code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
> >>> pes->state = MPEGTS_PESHEADER;
> >>> - if (pes->st->codec->codec_id == CODEC_ID_NONE) {
> >>> + if (!pes->st->request_probe) {
> >>> av_dlog(pes->stream, "pid=%x stream_type=%x probing\n",
> >>> pes->pid, pes->stream_type);
> >>> - pes->st->codec->codec_id = CODEC_ID_PROBE;
> >>> + pes->st->request_probe= 1;
> >>> }
> >>
> >> Humm, the check against CODEC_ID_NONE must not be changed, why was it ?
> >
> > Its a bit complicated
> > The problems where mainly due to end detection
> > there are 3+ thresholds that can lead to stream probe abortion
> > the per stream packet buffer size, the per context bytes in the buffer
> > the end of the file as well as the end of the stream and possibly
> > more
> > Now probing before the end used a threshold to ignore uncertain
> > detections and only at the end the best independant of its score should
> > be choosen but this failed in at least some end scenarios.
> >
> > so now codec_id is always set to the best codec found but we continue
> > probing until the thresholds hit or we have a good enough match.
> > The advantage is no matter how or where we end codec_id is set to
> > the best match, this though means it cant be set to CODEC_ID_PROBE.
> > which leads then to the need of request_probe
>
> I'm not talking about that.
> probing must be activated only is codec_id == CODEC_ID_NONE, you removed
> that.
oops, that was a mistake, i just put it back
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110405/783e1c00/attachment.asc>
More information about the ffmpeg-cvslog
mailing list