Commit a8bca726 authored by Christophe Massiot's avatar Christophe Massiot

New synchro statistics and warnings.

parent 8a38b8fb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_synchro.h : video parser blocks management * vpar_synchro.h : video parser blocks management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_synchro.h,v 1.2 2000/12/26 19:14:47 massiot Exp $ * $Id: vpar_synchro.h,v 1.3 2000/12/27 18:09:02 massiot Exp $
* *
* Author: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -66,7 +66,7 @@ typedef struct video_synchro_s ...@@ -66,7 +66,7 @@ typedef struct video_synchro_s
mtime_t backward_pts, current_pts; mtime_t backward_pts, current_pts;
#ifdef STATS #ifdef STATS
unsigned int i_trashed_pic, i_pic; unsigned int i_trashed_pic, i_not_chosen_pic, i_pic;
#endif #endif
} video_synchro_t; } video_synchro_t;
...@@ -94,3 +94,4 @@ void vpar_SynchroDecode ( struct vpar_thread_s * p_vpar, ...@@ -94,3 +94,4 @@ void vpar_SynchroDecode ( struct vpar_thread_s * p_vpar,
int i_coding_type, int i_structure ); int i_coding_type, int i_structure );
void vpar_SynchroEnd ( struct vpar_thread_s * p_vpar, int i_garbage ); void vpar_SynchroEnd ( struct vpar_thread_s * p_vpar, int i_garbage );
mtime_t vpar_SynchroDate ( struct vpar_thread_s * p_vpar ); mtime_t vpar_SynchroDate ( struct vpar_thread_s * p_vpar );
void vpar_SynchroNewPicture( struct vpar_thread_s * p_vpar, int i_coding_type );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing * vpar_headers.c : headers parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_headers.c,v 1.62 2000/12/22 13:04:45 sam Exp $ * $Id: vpar_headers.c,v 1.63 2000/12/27 18:09:02 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -573,7 +573,7 @@ static void PictureHeader( vpar_thread_t * p_vpar ) ...@@ -573,7 +573,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
} }
#ifdef STATS #ifdef STATS
p_vpar->pc_pictures[p_vpar->picture.i_coding_type]++; p_vpar->pc_pictures[p_vpar->picture.i_coding_type]++;
#endif #endif
if( p_vpar->picture.i_current_structure && if( p_vpar->picture.i_current_structure &&
...@@ -620,6 +620,9 @@ static void PictureHeader( vpar_thread_t * p_vpar ) ...@@ -620,6 +620,9 @@ static void PictureHeader( vpar_thread_t * p_vpar )
} }
else else
{ {
/* Warn synchro we have a new picture (updates pictures index). */
vpar_SynchroNewPicture( p_vpar, p_vpar->picture.i_coding_type );
/* Does synchro say we have enough time to decode it ? */ /* Does synchro say we have enough time to decode it ? */
b_parsable = vpar_SynchroChoose( p_vpar, b_parsable = vpar_SynchroChoose( p_vpar,
p_vpar->picture.i_coding_type, i_structure ); p_vpar->picture.i_coding_type, i_structure );
...@@ -643,12 +646,15 @@ static void PictureHeader( vpar_thread_t * p_vpar ) ...@@ -643,12 +646,15 @@ static void PictureHeader( vpar_thread_t * p_vpar )
{ {
/* The frame is complete. */ /* The frame is complete. */
p_vpar->picture.i_current_structure = i_structure; p_vpar->picture.i_current_structure = i_structure;
vpar_SynchroNewPicture( p_vpar, p_vpar->picture.i_coding_type );
vpar_SynchroTrash( p_vpar, p_vpar->picture.i_coding_type, i_structure ); vpar_SynchroTrash( p_vpar, p_vpar->picture.i_coding_type, i_structure );
} }
} }
else else
{ {
/* Warn Synchro we have trashed a picture. */ /* Warn Synchro we have trashed a picture. */
vpar_SynchroNewPicture( p_vpar, p_vpar->picture.i_coding_type );
vpar_SynchroTrash( p_vpar, p_vpar->picture.i_coding_type, i_structure ); vpar_SynchroTrash( p_vpar, p_vpar->picture.i_coding_type, i_structure );
} }
p_vpar->picture.p_picture = NULL; p_vpar->picture.p_picture = NULL;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment