xine-lib: xine-lib-1.2.13/src/video_dec/libmpeg2/mpeg2.h Source File

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
29 typedef struct mpeg2dec_s {
30 xine_video_port_t * output;
31 uint32_t frame_format;
32
33 /* this is where we keep the state of the decoder */
34 struct picture_s * picture;
35
36 uint32_t shift;
37 int new_sequence;
38 int is_sequence_needed;
39 int is_wait_for_ip_frames;
40 int frames_to_drop, drop_frame;
41 int in_slice;
42 int seek_mode, is_frame_needed;
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 */
48 uint8_t * chunk_buffer;
49 /* pointer to current position in chunk_buffer */
50 uint8_t * chunk_ptr;
51 /* last start code ? */
52 uint8_t code;
53 uint32_t chunk_size;
54
55 int64_t pts;
56 uint32_t rff_pattern;
57 int force_aspect;
58 int force_pan_scan;
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 */
63 int afd_value_seen;
64 int afd_value_reported;
65
66 xine_stream_t *stream;
67
68 /* a spu decoder for possible closed captions */
69 spu_decoder_t *cc_dec;
70 mpeg2dec_accel_t accel;
71
72} mpeg2dec_t ;
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
86void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,
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
mpeg2_discontinuity
void mpeg2_discontinuity(mpeg2dec_t *mpeg2dec)
Definition decode.c:723
mpeg2dec_t
struct mpeg2dec_s mpeg2dec_t
mpeg2_flush
void mpeg2_flush(mpeg2dec_t *mpeg2dec)
Definition decode.c:789
mpeg2_reset
void mpeg2_reset(mpeg2dec_t *mpeg2dec)
Definition decode.c:741
mpeg2_find_sequence_header
void mpeg2_find_sequence_header(mpeg2dec_t *mpeg2dec, uint8_t *data_start, uint8_t *data_end)
Definition decode.c:871
mpeg2_decode_data
int mpeg2_decode_data(mpeg2dec_t *mpeg2dec, uint8_t *data_start, uint8_t *data_end, uint64_t pts)
Definition decode.c:691
mpeg2_close
void mpeg2_close(mpeg2dec_t *mpeg2dec)
Definition decode.c:811
libmpeg2_accel.h
mpeg2_init
mpeg2dec_t * mpeg2_init(void)
Definition decode.c:411
mpeg2dec_accel_t
Definition libmpeg2_accel.h:32
mpeg2dec_s
Definition mpeg2.h:29
mpeg2dec_s::stream
xine_stream_t * stream
Definition mpeg2.h:66
mpeg2dec_s::drop_frame
int drop_frame
Definition mpeg2.h:40
mpeg2dec_s::new_sequence
int new_sequence
Definition mpeg2.h:37
mpeg2dec_s::code
uint8_t code
Definition mpeg2.h:52
mpeg2dec_s::force_pan_scan
int force_pan_scan
Definition mpeg2.h:58
mpeg2dec_s::chunk_size
uint32_t chunk_size
Definition mpeg2.h:53
mpeg2dec_s::output
xine_video_port_t * output
Definition mpeg2.h:30
mpeg2dec_s::accel
mpeg2dec_accel_t accel
Definition mpeg2.h:70
mpeg2dec_s::afd_value_seen
int afd_value_seen
Definition mpeg2.h:63
mpeg2dec_s::rff_pattern
uint32_t rff_pattern
Definition mpeg2.h:56
mpeg2dec_s::is_sequence_needed
int is_sequence_needed
Definition mpeg2.h:38
mpeg2dec_s::afd_value_reported
int afd_value_reported
Definition mpeg2.h:64
mpeg2dec_s::shift
uint32_t shift
Definition mpeg2.h:36
mpeg2dec_s::is_frame_needed
int is_frame_needed
Definition mpeg2.h:42
mpeg2dec_s::frames_to_drop
int frames_to_drop
Definition mpeg2.h:40
mpeg2dec_s::seek_mode
int seek_mode
Definition mpeg2.h:42
mpeg2dec_s::is_wait_for_ip_frames
int is_wait_for_ip_frames
Definition mpeg2.h:39
mpeg2dec_s::pts
int64_t pts
Definition mpeg2.h:55
mpeg2dec_s::force_aspect
int force_aspect
Definition mpeg2.h:57
mpeg2dec_s::in_slice
int in_slice
Definition mpeg2.h:41
mpeg2dec_s::frame_format
uint32_t frame_format
Definition mpeg2.h:31
mpeg2dec_s::chunk_ptr
uint8_t * chunk_ptr
Definition mpeg2.h:50
mpeg2dec_s::cc_dec
spu_decoder_t * cc_dec
Definition mpeg2.h:69
mpeg2dec_s::chunk_buffer
uint8_t * chunk_buffer
Definition mpeg2.h:48
mpeg2dec_s::picture
struct picture_s * picture
Definition mpeg2.h:34
picture_s
Definition mpeg2_internal.h:68
spu_decoder_s
Definition spu_decoder.h:74
xine_stream_s
Definition xine_internal.h:123
xine_video_port_s
Definition video_out.h:187