diff options
Diffstat (limited to 'src/libmpeg2')
-rw-r--r-- | src/libmpeg2/decode.c | 8 | ||||
-rw-r--r-- | src/libmpeg2/mpeg2.h | 6 | ||||
-rw-r--r-- | src/libmpeg2/xine_decoder.c | 8 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 838dead73..cfe387f33 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -50,8 +50,7 @@ static void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer); -void mpeg2_init (mpeg2dec_t * mpeg2dec, - xine_video_port_t * output) +void mpeg2_init (mpeg2dec_t * mpeg2dec) { static int do_init = 1; uint32_t mm_accel; @@ -76,7 +75,6 @@ void mpeg2_init (mpeg2dec_t * mpeg2dec, mpeg2dec->frames_to_drop = 0; mpeg2dec->drop_frame = 0; mpeg2dec->in_slice = 0; - mpeg2dec->output = output; mpeg2dec->chunk_ptr = mpeg2dec->chunk_buffer; mpeg2dec->code = 0xb4; mpeg2dec->seek_mode = 0; @@ -441,7 +439,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, if (picture->picture_coding_type == B_TYPE) picture->current_frame = - mpeg2dec->output->get_frame (mpeg2dec->output, + mpeg2dec->stream->video_out->get_frame (mpeg2dec->stream->video_out, picture->coded_picture_width, picture->coded_picture_height, picture->aspect_ratio_information, @@ -449,7 +447,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->picture_structure); else { picture->current_frame = - mpeg2dec->output->get_frame (mpeg2dec->output, + mpeg2dec->stream->video_out->get_frame (mpeg2dec->stream->video_out, picture->coded_picture_width, picture->coded_picture_height, picture->aspect_ratio_information, diff --git a/src/libmpeg2/mpeg2.h b/src/libmpeg2/mpeg2.h index bd966baeb..8cb0070b0 100644 --- a/src/libmpeg2/mpeg2.h +++ b/src/libmpeg2/mpeg2.h @@ -22,8 +22,6 @@ /* Structure for the mpeg2dec decoder */ typedef struct mpeg2dec_s { - xine_video_port_t * output; - /* this is where we keep the state of the decoder */ struct picture_s * picture, *picture_base; @@ -46,6 +44,7 @@ typedef struct mpeg2dec_s { int64_t pts; uint32_t rff_pattern; int force_aspect; + xine_stream_t *stream; /* a spu decoder for possible closed captions */ @@ -55,8 +54,7 @@ typedef struct mpeg2dec_s { /* initialize mpegdec with a opaque user pointer */ -void mpeg2_init (mpeg2dec_t * mpeg2dec, - xine_video_port_t * output); +void mpeg2_init (mpeg2dec_t * mpeg2dec); /* destroy everything which was allocated, shutdown the output */ void mpeg2_close (mpeg2dec_t * mpeg2dec); diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index f09cc45c3..7232dd66b 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.46 2002/12/22 15:03:04 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.47 2002/12/26 21:53:42 miguelfreitas Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -50,7 +50,6 @@ typedef struct mpeg2dec_decoder_s { mpeg2dec_t mpeg2; mpeg2_class_t *class; xine_stream_t *stream; - xine_video_port_t *video_out; } mpeg2dec_decoder_t; static void mpeg2dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { @@ -116,7 +115,7 @@ static void mpeg2dec_dispose (video_decoder_t *this_gen) { mpeg2_close (&this->mpeg2); - this->video_out->close(this->video_out, this->stream); + this->stream->video_out->close(this->stream->video_out, this->stream); free (this); } @@ -136,9 +135,8 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre this->class = (mpeg2_class_t *) class_gen; this->mpeg2.stream = stream; - mpeg2_init (&this->mpeg2, stream->video_out); + mpeg2_init (&this->mpeg2); stream->video_out->open(stream->video_out, stream); - this->video_out = stream->video_out; this->mpeg2.force_aspect = 0; return &this->video_decoder; |