annotate TOOLS/dump_mp4.c @ 34715:f60f2e0e4526

Synced with help_mp-en.h rev. 34785
author jrash
date Fri, 09 Mar 2012 11:52:57 +0000
parents b573c7c7173b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30416
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
1 /*
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
2 * This program is free software; you can redistribute it and/or modify
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
3 * it under the terms of the GNU General Public License as published by
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
4 * the Free Software Foundation; either version 2 of the License, or
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
5 * (at your option) any later version.
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
6 *
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
7 * This program is distributed in the hope that it will be useful,
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
10 * GNU General Public License for more details.
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
11 *
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
12 * You should have received a copy of the GNU General Public License along
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
13 * with this program; if not, write to the Free Software Foundation, Inc.,
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
14 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
15 */
b573c7c7173b Add standard license header to C tools missing them.
diego
parents: 23662
diff changeset
16
23657
d7ae37864b03 Fix implicit declaration of function warnings.
diego
parents: 9067
diff changeset
17 #include <stdio.h>
d7ae37864b03 Fix implicit declaration of function warnings.
diego
parents: 9067
diff changeset
18
23662
5c5fb6af79d1 Mark main() function as a function that takes no parameters.
diego
parents: 23659
diff changeset
19 int main(void){
9067
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
20 int c;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
21 unsigned int head=-1;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
22 int pos=-3;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
23
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
24 while((c=getchar())>=0){
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
25 head<<=8;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
26 if(head==0x100){
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
27 int startcode=head|c;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
28 printf("%08X 1%02X ",pos,c);
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
29 if (startcode<=0x11F) printf("Video Object Start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
30 else if(startcode<=0x12F) printf("Video Object Layer Start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
31 else if(startcode<=0x13F) printf("Reserved");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
32 else if(startcode<=0x15F) printf("FGS bp start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
33 else if(startcode<=0x1AF) printf("Reserved");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
34 else if(startcode==0x1B0) printf("Visual Object Seq Start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
35 else if(startcode==0x1B1) printf("Visual Object Seq End");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
36 else if(startcode==0x1B2) printf("User Data");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
37 else if(startcode==0x1B3) printf("Group of VOP start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
38 else if(startcode==0x1B4) printf("Video Session Error");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
39 else if(startcode==0x1B5) printf("Visual Object Start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
40 else if(startcode==0x1B6) printf("Video Object Plane start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
41 else if(startcode==0x1B7) printf("slice start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
42 else if(startcode==0x1B8) printf("extension start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
43 else if(startcode==0x1B9) printf("fgs start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
44 else if(startcode==0x1BA) printf("FBA Object start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
45 else if(startcode==0x1BB) printf("FBA Object Plane start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
46 else if(startcode==0x1BC) printf("Mesh Object start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
47 else if(startcode==0x1BD) printf("Mesh Object Plane start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
48 else if(startcode==0x1BE) printf("Still Textutre Object start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
49 else if(startcode==0x1BF) printf("Textutre Spatial Layer start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
50 else if(startcode==0x1C0) printf("Textutre SNR Layer start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
51 else if(startcode==0x1C1) printf("Textutre Tile start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
52 else if(startcode==0x1C2) printf("Textutre Shape Layer start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
53 else if(startcode==0x1C3) printf("stuffing start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
54 else if(startcode<=0x1C5) printf("reserved");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
55 else if(startcode<=0x1FF) printf("System start");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
56 printf("\n");
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
57 }
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
58 head|=c;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
59 ++pos;
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
60 }
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
61
23659
f15f95c2671a Fix "control reaches end of non-void function" warnings.
diego
parents: 23657
diff changeset
62 return 0;
9067
106a6f116776 dump mpeg4-es startcodes
arpi
parents:
diff changeset
63 }