diff options
| author | cvs2svn <admin@example.com> | 2008-05-22 10:44:24 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2008-05-22 10:44:24 +0000 |
| commit | 457e5f37318f7b9b3bded4880ef13777f7dada8c (patch) | |
| tree | 613c32d6f571c9467099c0ef81f7e9a3820ed4f0 /tools/mpeg.c | |
| parent | 7b7d9b3594834e32e5cdc3e1866a8c8cf4e2cd0d (diff) | |
| download | xineliboutput-457e5f37318f7b9b3bded4880ef13777f7dada8c.tar.gz xineliboutput-457e5f37318f7b9b3bded4880ef13777f7dada8c.tar.bz2 | |
This commit was manufactured by cvs2svn to create branch 'unlabeled-1.4.2'.
Diffstat (limited to 'tools/mpeg.c')
| -rw-r--r-- | tools/mpeg.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/tools/mpeg.c b/tools/mpeg.c deleted file mode 100644 index 35e95da3..00000000 --- a/tools/mpeg.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * mpeg.c: - * - * See the main source file 'xineliboutput.c' for copyright information and - * how to reach the author. - * - * $Id: mpeg.c,v 1.1 2008-02-04 22:42:13 phintuka Exp $ - * - */ - -#include "mpeg.h" - - -const char * const picture_type_str[] = { - "(none)", - "I-Frame", - "B-Frame", - "P-Frame" -}; - - -int mpeg2_get_picture_type(const uint8_t *buf, int len) -{ - int i; - for (i = 0; i < len-5; i++) { - if (buf[i] == 0 && buf[i + 1] == 0 && buf[i + 2] == 1) { - switch (buf[i + 3]) { - case SC_PICTURE: - return (buf[i + 5] >> 3) & 0x07; - } - } - } - return NO_PICTURE; -} - -int mpeg2_get_video_size(const uint8_t *buf, int len, video_size_t *size) -{ - int i; - for (i = 0; i < len-6; i++) { - if (buf[i] == 0 && buf[i + 1] == 0 && buf[i + 2] == 1) { - if (buf[i + 3] == SC_SEQUENCE) { - int d = (buf[i+4] << 16) | (buf[i+5] << 8) | buf[i+6]; - size->width = (d >> 12); - size->height = (d & 0xfff); - return 1; - } - } - } - return 0; -} - |
