Mercurial > mplayer.hg
annotate libmpcodecs/mpeg_packetizer.h @ 19137:d9656bb2ae0e
new vo driver for ivtv cards tv-out through internal h/w mpeg decoder
author | ben |
---|---|
date | Wed, 19 Jul 2006 22:02:09 +0000 |
parents | 87f9eebbf712 |
children |
rev | line source |
---|---|
19136
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
1 /* |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
2 * Copyright (C) 2006 Benjamin Zores |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
3 * Set of helper routines for building MPEG 1/2 PS/PES packets. |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
4 * |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
5 * Based on various code bororwed from vo_mpegpes/vo_dxr2 : |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
6 * (C) 2000 Ralph Metzler <ralph@convergence.de> |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
7 * Marcus Metzler <marcus@convergence.de> |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
8 * Gerard Lantau |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
9 * |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
13 * (at your option) any later version. |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
14 * |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
19 * |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software Foundation, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
23 */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
24 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
25 #ifndef _MPEG_PACKETIZER_H_ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
26 #define _MPEG_PACKETIZER_H_ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
27 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
28 /* Send MPEG 1 PES packet */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
29 int send_mpeg1_pes_packet (unsigned char *data, int len, int id, uint64_t pts, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
30 int my_write (unsigned char *data, int len)); |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
31 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
32 /* Send MPEG 1 PS packet */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
33 int send_mpeg1_ps_packet (unsigned char *data, int len, int id, uint64_t pts, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
34 int my_write (unsigned char *data, int len)); |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
35 /* Send MPEG 2 PES packet */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
36 int send_mpeg2_pes_packet (unsigned char *data, int len, int id, uint64_t pts, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
37 int my_write (unsigned char *data, int len)); |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
38 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
39 /* Send MPEG 2 PS packet */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
40 int send_mpeg2_ps_packet (unsigned char *data, int len, int id, uint64_t pts, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
41 int my_write (unsigned char *data, int len)); |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
42 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
43 /* Send MPEG LPCM packet */ |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
44 int send_mpeg_lpcm_packet (unsigned char *data, int len, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
45 int id, uint64_t pts, int freq_id, |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
46 int my_write (unsigned char *data, int len)); |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
47 |
87f9eebbf712
new mpeg helpers to build and send mpeg 1/2 ps/pes packets (used by some vo drivers)
ben
parents:
diff
changeset
|
48 #endif /* _MPEG_PACKETIZER_H_ */ |