summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_avi.c4
-rw-r--r--src/demuxers/demux_mpeg.c5
-rw-r--r--src/demuxers/demux_mpeg_block.c4
-rw-r--r--src/libac3/parse.c1
-rw-r--r--src/libac3/xine_decoder.c18
-rw-r--r--src/libmpeg2/decode.c69
-rw-r--r--src/video_out/video_out_xv.c26
7 files changed, 85 insertions, 42 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 729a301b8..7b1d87e12 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.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: demux_avi.c,v 1.11 2001/05/30 02:09:24 f1rmb Exp $
+ * $Id: demux_avi.c,v 1.12 2001/05/31 22:54:38 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -803,6 +803,8 @@ static void *demux_avi_loop (void *this_gen) {
xprintf (VERBOSE|DEMUX, "demux_avi: demux loop finished.\n");
pthread_exit(NULL);
+
+ return NULL;
}
static void demux_avi_stop (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index 29cfcee05..24e6666ef 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.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: demux_mpeg.c,v 1.13 2001/05/30 02:09:24 f1rmb Exp $
+ * $Id: demux_mpeg.c,v 1.14 2001/05/31 22:54:39 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -35,6 +35,7 @@
#include <unistd.h>
#include <pthread.h>
#include <string.h>
+#include <unistd.h>
#include "monitor.h"
#include "xine_internal.h"
@@ -501,6 +502,8 @@ static void *demux_mpeg_loop (void *this_gen) {
this->status, w);
pthread_exit(NULL);
+
+ return NULL;
}
static void demux_mpeg_stop (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 25ac692bb..eddded0bb 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.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: demux_mpeg_block.c,v 1.10 2001/05/30 21:48:23 f1rmb Exp $
+ * $Id: demux_mpeg_block.c,v 1.11 2001/05/31 22:54:39 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -343,6 +343,8 @@ static void *demux_mpeg_block_loop (void *this_gen) {
}
pthread_exit(NULL);
+
+ return NULL;
}
static void demux_mpeg_block_stop (demux_plugin_t *this_gen) {
diff --git a/src/libac3/parse.c b/src/libac3/parse.c
index 98b8cb6ac..7feee2bbe 100644
--- a/src/libac3/parse.c
+++ b/src/libac3/parse.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "ac3.h"
#include "ac3_internal.h"
diff --git a/src/libac3/xine_decoder.c b/src/libac3/xine_decoder.c
index 306e62e19..74122c960 100644
--- a/src/libac3/xine_decoder.c
+++ b/src/libac3/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.8 2001/05/31 18:36:41 joachim_koenig Exp $
+ * $Id: xine_decoder.c,v 1.9 2001/05/31 22:54:39 guenter Exp $
*
* stuff needed to turn libac3 into a xine decoder plugin
*/
@@ -28,6 +28,11 @@
#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include "audio_out.h"
#include "ac3.h"
@@ -36,6 +41,8 @@
#define FRAME_SIZE 4096
+/* int ac3file; */
+
typedef struct ac3dec_decoder_s {
audio_decoder_t audio_decoder;
@@ -96,6 +103,9 @@ void ac3dec_init (audio_decoder_t *this_gen, ao_functions_t *audio_out) {
this->max_num_channels = 1;
}
}
+
+ /* ac3file = open ("test.ac3", O_CREAT); */
+
}
void ac3dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
@@ -104,7 +114,7 @@ void ac3dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
uint8_t *current = buf->content;
uint8_t *end = buf->content + buf->size;
- ac3_frame_t *ac3_frame;
+ ac3_frame_t *ac3_frame=NULL;
/* int sampling_rate; */
int output_mode = AO_CAP_MODE_STEREO;
@@ -165,6 +175,8 @@ void ac3dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
/* oki, decode this frame in software*/
+ /* write (ac3file, this->frame_buffer, this->frame_length); */
+
ac3_frame = ac3_decode_frame (this->frame_buffer, this->max_num_channels);
/* determine output mode */
@@ -245,6 +257,8 @@ void ac3dec_close (audio_decoder_t *this_gen) {
if (this->output_open)
this->audio_out->close (this->audio_out);
+
+ /* close (ac3file); */
}
static char *ac3dec_get_id(void) {
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c
index 847227ebb..ed15bbddf 100644
--- a/src/libmpeg2/decode.c
+++ b/src/libmpeg2/decode.c
@@ -75,6 +75,8 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
picture_t * picture;
int is_frame_done;
+ /* printf ("parse_chunk %d\n", code); */
+
/* wait for sequence_header_code */
if (mpeg2dec->is_sequence_needed && (code != 0xb3))
return 0;
@@ -117,40 +119,40 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
exit (1);
}
- /* find out if we want to skip this frame */
- mpeg2dec->drop_frame = 0;
-
- picture->skip_non_intra_dct = (mpeg2dec->frames_to_drop>0) ;
-
+ if (!picture->second_field) {
+ /* find out if we want to skip this frame */
+ mpeg2dec->drop_frame = 0;
+
+ picture->skip_non_intra_dct = (mpeg2dec->frames_to_drop>0) ;
+
+ switch (picture->picture_coding_type) {
+ case B_TYPE:
- switch (picture->picture_coding_type) {
- case B_TYPE:
-
- if (mpeg2dec->frames_to_drop>1) {
- mpeg2dec->drop_frame = 1;
- } else if (picture->forward_reference_frame->bFrameBad
- || picture->backward_reference_frame->bFrameBad) {
- mpeg2dec->drop_frame = 1;
- }
- break;
-
- case P_TYPE:
-
- if (mpeg2dec->frames_to_drop>2) {
- mpeg2dec->drop_frame = 1;
- } else if (picture->backward_reference_frame->bFrameBad) {
- mpeg2dec->drop_frame = 1;
- }
- break;
-
- case I_TYPE:
-
- if (mpeg2dec->frames_to_drop>4) {
- mpeg2dec->drop_frame = 1;
+ if (mpeg2dec->frames_to_drop>1) {
+ mpeg2dec->drop_frame = 1;
+ } else if (picture->forward_reference_frame->bFrameBad
+ || picture->backward_reference_frame->bFrameBad) {
+ mpeg2dec->drop_frame = 1;
+ }
+ break;
+
+ case P_TYPE:
+
+ if (mpeg2dec->frames_to_drop>2) {
+ mpeg2dec->drop_frame = 1;
+ } else if (picture->backward_reference_frame->bFrameBad) {
+ mpeg2dec->drop_frame = 1;
+ }
+ break;
+
+ case I_TYPE:
+
+ if (mpeg2dec->frames_to_drop>4) {
+ mpeg2dec->drop_frame = 1;
+ }
+ break;
}
- break;
}
-
break;
case 0xb3: /* sequence_header_code */
@@ -197,9 +199,9 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
if (!(mpeg2dec->in_slice)) {
mpeg2dec->in_slice = 1;
- if (picture->second_field)
+ if (picture->second_field)
picture->current_frame->field(picture->current_frame,
- picture->picture_structure);
+ picture->picture_structure);
else {
if (picture->picture_coding_type == B_TYPE)
picture->throwaway_frame = picture->current_frame =
@@ -239,6 +241,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
}
}
+ /* printf ("parse_chunk %d completed\n", code); */
return is_frame_done;
}
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 93fd4b42b..912735597 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.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: video_out_xv.c,v 1.28 2001/05/29 15:55:14 f1rmb Exp $
+ * $Id: video_out_xv.c,v 1.29 2001/05/31 22:54:39 guenter Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -136,9 +136,19 @@ static uint32_t xv_get_capabilities (vo_driver_t *this_gen) {
return this->capabilities;
}
-/*
- *
- */
+static void xv_frame_field (vo_frame_t *vo_img, int which_field) {
+ /* not needed for Xv */
+}
+
+static void xv_frame_dispose (vo_frame_t *vo_img) {
+
+ xv_frame_t *frame = (xv_frame_t *) vo_img ;
+
+ /* FIXME: implement */
+
+}
+
+
static vo_frame_t *xv_alloc_frame (vo_driver_t *this_gen) {
xv_frame_t *frame ;
@@ -152,6 +162,14 @@ static vo_frame_t *xv_alloc_frame (vo_driver_t *this_gen) {
pthread_mutex_init (&frame->vo_frame.mutex, NULL);
+ /*
+ * supply required functions
+ */
+
+ frame->vo_frame.copy = NULL;
+ frame->vo_frame.field = xv_frame_field;
+ frame->vo_frame.dispose = xv_frame_dispose;
+
return (vo_frame_t *) frame;
}