xine-lib 1.2.13-20230125hg15249
mpeg2.h
Go to the documentation of this file.
1/*
2 * mpeg2.h
3 * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
4 *
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
6 *
7 * mpeg2dec is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * mpeg2dec is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21
22/* Structure for the mpeg2dec decoder */
23
24#ifndef MPEG2_H
25#define MPEG2_H
26
27#include "libmpeg2_accel.h"
28
29typedef struct mpeg2dec_s {
32
33 /* this is where we keep the state of the decoder */
35
43
44 /* the maximum chunk size is determined by vbv_buffer_size */
45 /* which is 224K for MP@ML streams. */
46 /* (we make no pretenses of decoding anything more than that) */
47 /* allocated in init - gcc has problems allocating such big structures */
49 /* pointer to current position in chunk_buffer */
51 /* last start code ? */
54
59
60 /* AFD data can be found after a sequence, group or picture start code */
61 /* and will be stored in afd_value_seen. Later it will be transfered to */
62 /* a stream property and stored into afd_value_reported to detect changes */
65
67
68 /* a spu decoder for possible closed captions */
71
73
74
75/* initialize mpegdec with a opaque user pointer */
76void mpeg2_init (mpeg2dec_t * mpeg2dec,
77 xine_video_port_t * output);
78
79/* destroy everything which was allocated, shutdown the output */
80void mpeg2_close (mpeg2dec_t * mpeg2dec);
81
82int mpeg2_decode_data (mpeg2dec_t * mpeg2dec,
83 uint8_t * data_start, uint8_t * data_end,
84 uint64_t pts);
85
87 uint8_t * data_start, uint8_t * data_end);
88
89void mpeg2_flush (mpeg2dec_t * mpeg2dec);
90void mpeg2_reset (mpeg2dec_t * mpeg2dec);
91void mpeg2_discontinuity (mpeg2dec_t * mpeg2dec);
92
93/* Not needed, it is defined as static in decode.c, and no-one else called it
94 * currently
95 */
96/* void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer); */
97
98#endif
void mpeg2_discontinuity(mpeg2dec_t *mpeg2dec)
Definition decode.c:723
struct mpeg2dec_s mpeg2dec_t
void mpeg2_flush(mpeg2dec_t *mpeg2dec)
Definition decode.c:789
void mpeg2_reset(mpeg2dec_t *mpeg2dec)
Definition decode.c:741
void mpeg2_find_sequence_header(mpeg2dec_t *mpeg2dec, uint8_t *data_start, uint8_t *data_end)
Definition decode.c:871
int mpeg2_decode_data(mpeg2dec_t *mpeg2dec, uint8_t *data_start, uint8_t *data_end, uint64_t pts)
Definition decode.c:691
void mpeg2_close(mpeg2dec_t *mpeg2dec)
Definition decode.c:811
mpeg2dec_t * mpeg2_init(void)
Definition decode.c:411
Definition libmpeg2_accel.h:32
Definition mpeg2.h:29
xine_stream_t * stream
Definition mpeg2.h:66
int drop_frame
Definition mpeg2.h:40
int new_sequence
Definition mpeg2.h:37
uint8_t code
Definition mpeg2.h:52
int force_pan_scan
Definition mpeg2.h:58
uint32_t chunk_size
Definition mpeg2.h:53
xine_video_port_t * output
Definition mpeg2.h:30
mpeg2dec_accel_t accel
Definition mpeg2.h:70
int afd_value_seen
Definition mpeg2.h:63
uint32_t rff_pattern
Definition mpeg2.h:56
int is_sequence_needed
Definition mpeg2.h:38
int afd_value_reported
Definition mpeg2.h:64
uint32_t shift
Definition mpeg2.h:36
int is_frame_needed
Definition mpeg2.h:42
int frames_to_drop
Definition mpeg2.h:40
int seek_mode
Definition mpeg2.h:42
int is_wait_for_ip_frames
Definition mpeg2.h:39
int64_t pts
Definition mpeg2.h:55
int force_aspect
Definition mpeg2.h:57
int in_slice
Definition mpeg2.h:41
uint32_t frame_format
Definition mpeg2.h:31
uint8_t * chunk_ptr
Definition mpeg2.h:50
spu_decoder_t * cc_dec
Definition mpeg2.h:69
uint8_t * chunk_buffer
Definition mpeg2.h:48
struct picture_s * picture
Definition mpeg2.h:34
Definition mpeg2_internal.h:68
Definition spu_decoder.h:74
Definition xine_internal.h:123
Definition video_out.h:187