xine-lib 1.2.13-20230125hg15249
ff_mpeg_parser.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2001-2018 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr)
21 * based on libmpeg2 decoder.
22 */
23#ifndef HAVE_MPEG_PARSER_H
24#define HAVE_MPEG_PARSER_H
25/*
26#define DEBUG_MPEG_PARSER
27*/
28#include <stdint.h>
29#include <stddef.h>
30
56
57/* parser initialization */
58void mpeg_parser_init (mpeg_parser_t *parser, size_t padding_size);
59
60/* parser disposal */
62
63/* read a frame
64 * return a pointer to the first byte of the next frame
65 * or NULL if more bytes are needed
66 * *flush is set to 1 if the decoder must be flushed (needed for still menus)
67 */
69 uint8_t *current, uint8_t *end,
70 int *flush);
71
72/* reset the parser */
73void mpeg_parser_reset (mpeg_parser_t *parser);
74
75#endif /* HAVE_MPEG_PARSER_H */
struct mpeg_parser_s mpeg_parser_t
uint8_t * mpeg_parser_decode_data(mpeg_parser_t *parser, uint8_t *current, uint8_t *end, int *flush)
Definition ff_mpeg_parser.c:307
void mpeg_parser_init(mpeg_parser_t *parser, size_t padding_size)
Definition ff_mpeg_parser.c:69
void mpeg_parser_reset(mpeg_parser_t *parser)
Definition ff_mpeg_parser.c:82
void mpeg_parser_dispose(mpeg_parser_t *parser)
Definition ff_mpeg_parser.c:75
Definition ff_mpeg_parser.h:31
uint8_t * chunk_ptr
Definition ff_mpeg_parser.h:33
uint8_t * chunk_start
Definition ff_mpeg_parser.h:34
uint8_t code
Definition ff_mpeg_parser.h:37
uint32_t shift
Definition ff_mpeg_parser.h:35
uint8_t is_sequence_needed
Definition ff_mpeg_parser.h:40
double frame_aspect_ratio
Definition ff_mpeg_parser.h:53
int aspect_ratio_info
Definition ff_mpeg_parser.h:47
uint16_t width
Definition ff_mpeg_parser.h:50
uint8_t has_sequence
Definition ff_mpeg_parser.h:42
int frame_duration
Definition ff_mpeg_parser.h:52
uint16_t height
Definition ff_mpeg_parser.h:51
uint8_t * chunk_buffer
Definition ff_mpeg_parser.h:32
uint8_t is_mpeg1
Definition ff_mpeg_parser.h:41
int buffer_size
Definition ff_mpeg_parser.h:36
uint8_t picture_coding_type
Definition ff_mpeg_parser.h:38
uint8_t rate_code
Definition ff_mpeg_parser.h:45
uint8_t in_slice
Definition ff_mpeg_parser.h:43