summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mpg.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-04 15:38:46 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-04 15:38:46 +0000
commite419df6f8582898cb8ff592d66dd0bba317268da (patch)
tree200cf5233a3703d86fe1be09ddd7ef560aee6536 /libmpdemux/demux_mpg.c
parent3eea968d2430da35aaadb3cb7db399fe27db2866 (diff)
downloadmpv-e419df6f8582898cb8ff592d66dd0bba317268da.tar.bz2
mpv-e419df6f8582898cb8ff592d66dd0bba317268da.tar.xz
H264-ES demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9825 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_mpg.c')
-rw-r--r--libmpdemux/demux_mpg.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index 6828939d6d..1a240d3d29 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -250,6 +250,14 @@ int num_elementary_packets101=0;
int num_elementary_packets12x=0;
int num_elementary_packets1B6=0;
int num_elementary_packetsPES=0;
+int num_h264_slice=0; //combined slice
+int num_h264_dpa=0; //DPA Slice
+int num_h264_dpb=0; //DPB Slice
+int num_h264_dpc=0; //DPC Slice
+int num_h264_idr=0; //IDR Slice
+int num_h264_sps=0;
+int num_h264_pps=0;
+
int num_mp3audio_packets=0;
int demux_mpg_es_fill_buffer(demuxer_t *demux){
@@ -317,6 +325,15 @@ do{
if(head==0x100) ++num_elementary_packets100; else
if(head==0x101) ++num_elementary_packets101; else
if(head>=0x120 && head<=0x12F) ++num_elementary_packets12x;
+
+ if((head&~0x60) == 0x101) ++num_h264_slice; else
+ if((head&~0x60) == 0x102) ++num_h264_dpa; else
+ if((head&~0x60) == 0x103) ++num_h264_dpb; else
+ if((head&~0x60) == 0x104) ++num_h264_dpc; else
+ if((head&~0x60) == 0x105 && head != 0x105) ++num_h264_idr; else
+ if((head&~0x60) == 0x107 && head != 0x107) ++num_h264_sps; else
+ if((head&~0x60) == 0x108 && head != 0x108) ++num_h264_pps;
+
mp_msg(MSGT_DEMUX,MSGL_DBG3,"Opps... elementary video packet found: %03X\n",head);
} else
if((head>=0x1C0 && head<0x1F0) || head==0x1BD){