summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-18 10:23:15 +0200
committerwm4 <wm4@nowhere>2012-08-20 15:36:03 +0200
commit6f7ba66817b5cd3761b802930dc7ba62464e3c6a (patch)
treee923b7d1cbd9888f297e859eb62ef9f160edfb64 /libmpcodecs
parente181547db10c48a92b6c4d891c184b416ebe2add (diff)
downloadmpv-6f7ba66817b5cd3761b802930dc7ba62464e3c6a.tar.bz2
mpv-6f7ba66817b5cd3761b802930dc7ba62464e3c6a.tar.xz
Remove support for libdv
This removes the libdv demuxer and audio/video decoders. FFmpeg has support for it, and it's even preferred over the internal decoders.
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad.c4
-rw-r--r--libmpcodecs/ad_libdv.c126
-rw-r--r--libmpcodecs/vd.c4
-rw-r--r--libmpcodecs/vd_libdv.c102
-rw-r--r--libmpcodecs/vd_libdv.h26
5 files changed, 0 insertions, 262 deletions
diff --git a/libmpcodecs/ad.c b/libmpcodecs/ad.c
index d1e3c91430..0c56f0d546 100644
--- a/libmpcodecs/ad.c
+++ b/libmpcodecs/ad.c
@@ -42,7 +42,6 @@ extern const ad_functions_t mpcodecs_ad_alaw;
extern const ad_functions_t mpcodecs_ad_imaadpcm;
extern const ad_functions_t mpcodecs_ad_faad;
extern const ad_functions_t mpcodecs_ad_libmad;
-extern const ad_functions_t mpcodecs_ad_libdv;
extern const ad_functions_t mpcodecs_ad_spdif;
extern const ad_functions_t mpcodecs_ad_libdca;
@@ -68,9 +67,6 @@ const ad_functions_t * const mpcodecs_ad_drivers[] =
#ifdef CONFIG_LIBMAD
&mpcodecs_ad_libmad,
#endif
-#ifdef CONFIG_LIBDV095
- &mpcodecs_ad_libdv,
-#endif
#ifdef CONFIG_LIBDCA
&mpcodecs_ad_libdca,
#endif
diff --git a/libmpcodecs/ad_libdv.c b/libmpcodecs/ad_libdv.c
deleted file mode 100644
index cbcb46efea..0000000000
--- a/libmpcodecs/ad_libdv.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <math.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include "img_format.h"
-
-#include <libdv/dv.h>
-#include <libdv/dv_types.h>
-
-#include "stream/stream.h"
-#include "libmpdemux/demuxer.h"
-#include "libmpdemux/stheader.h"
-
-#include "ad_internal.h"
-#include "vd_libdv.h"
-
-static const ad_info_t info =
-{
- "Raw DV Audio Decoder",
- "libdv",
- "Alexander Neundorf <neundorf@kde.org>",
- "http://libdv.sf.net",
- ""
-};
-
-LIBAD_EXTERN(libdv)
-
-static int preinit(sh_audio_t *sh_audio)
-{
- sh_audio->audio_out_minsize=4*DV_AUDIO_MAX_SAMPLES*2;
- return 1;
-}
-
-static int16_t *audioBuffers[4]={NULL,NULL,NULL,NULL};
-
-static int init(sh_audio_t *sh)
-{
- int i;
- WAVEFORMATEX *h=sh->wf;
-
- if(!h) return 0;
-
- sh->i_bps=h->nAvgBytesPerSec;
- sh->channels=h->nChannels;
- sh->samplerate=h->nSamplesPerSec;
- sh->samplesize=(h->wBitsPerSample+7)/8;
-
- sh->context=init_global_rawdv_decoder();
-
- for (i=0; i < 4; i++)
- audioBuffers[i] = malloc(2*DV_AUDIO_MAX_SAMPLES);
-
- return 1;
-}
-
-static void uninit(sh_audio_t *sh_audio)
-{
- int i;
- for (i=0; i < 4; i++)
- free(audioBuffers[i]);
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- // TODO!!!
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *audio, unsigned char *buf, int minlen, int maxlen)
-{
- int len=0;
- dv_decoder_t* decoder=audio->context; //global_rawdv_decoder;
- unsigned char* dv_audio_frame=NULL;
- int xx=ds_get_packet(audio->ds,&dv_audio_frame);
- if(xx<=0 || !dv_audio_frame) return 0; // EOF?
-
- dv_parse_header(decoder, dv_audio_frame);
-
- if(xx!=decoder->frame_size)
- mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[AD_LIBDV] Warning! Audio framesize differs! read=%d hdr=%d.\n",
- xx, decoder->frame_size);
-
- if (dv_decode_full_audio(decoder, dv_audio_frame,(int16_t**) audioBuffers))
- {
- /* Interleave the audio into a single buffer */
- int i=0;
- int16_t *bufP=(int16_t*)buf;
-
-// printf("samples=%d/%d chans=%d mem=%d \n",decoder->audio->samples_this_frame,DV_AUDIO_MAX_SAMPLES,
-// decoder->audio->num_channels, decoder->audio->samples_this_frame*decoder->audio->num_channels*2);
-
-// return (44100/30)*4;
-
- for (i=0; i < decoder->audio->samples_this_frame; i++)
- {
- int ch;
- for (ch=0; ch < decoder->audio->num_channels; ch++)
- bufP[len++] = audioBuffers[ch][i];
- }
- }
- return len*2;
-}
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 9594cfba24..1d35566cc3 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -45,7 +45,6 @@ extern const vd_functions_t mpcodecs_vd_mpng;
extern const vd_functions_t mpcodecs_vd_ijpg;
extern const vd_functions_t mpcodecs_vd_mtga;
extern const vd_functions_t mpcodecs_vd_realvid;
-extern const vd_functions_t mpcodecs_vd_libdv;
extern const vd_functions_t mpcodecs_vd_lzo;
extern const vd_functions_t mpcodecs_vd_qtvideo;
@@ -66,9 +65,6 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = {
&mpcodecs_vd_ijpg,
#endif
&mpcodecs_vd_mtga,
-#ifdef CONFIG_LIBDV095
- &mpcodecs_vd_libdv,
-#endif
/* Please do not add any new decoders here. If you want to implement a new
* decoder, add it to libavcodec, except for wrappers around external
* libraries and decoders requiring binary support. */
diff --git a/libmpcodecs/vd_libdv.c b/libmpcodecs/vd_libdv.c
deleted file mode 100644
index 137fa7bf60..0000000000
--- a/libmpcodecs/vd_libdv.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <math.h>
-
-#include "config.h"
-
-#include "img_format.h"
-
-#include <libdv/dv.h>
-#include <libdv/dv_types.h>
-
-#include "stream/stream.h"
-#include "libmpdemux/demuxer.h"
-#include "libmpdemux/stheader.h"
-
-#include "vd_internal.h"
-#include "vd_libdv.h"
-
-static const vd_info_t info =
-{
- "Raw DV Video Decoder",
- "libdv",
- "Alexander Neundorf <neundorf@kde.org>",
- "http://libdv.sf.net",
- "native codec"
-};
-
-LIBVD_EXTERN(libdv)
-
-// to set/get/query special features/parameters
-static int control(sh_video_t *sh,int cmd,void* arg,...){
- return CONTROL_UNKNOWN;
-}
-
-static dv_decoder_t* global_rawdv_decoder=NULL;
-
-dv_decoder_t* init_global_rawdv_decoder(void)
-{
- if(!global_rawdv_decoder){
- global_rawdv_decoder=dv_decoder_new(TRUE,TRUE,FALSE);
- global_rawdv_decoder->quality=DV_QUALITY_BEST;
- global_rawdv_decoder->prev_frame_decoded = 0;
- }
- return global_rawdv_decoder;
-}
-
-// init driver
-static int init(sh_video_t *sh)
-{
- sh->context = (void *)init_global_rawdv_decoder();
- return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
-}
-
-// uninit driver
-static void uninit(sh_video_t *sh){
-}
-
-// decode a frame
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
-{
- mp_image_t* mpi;
- dv_decoder_t *decoder=sh->context;
-
- if(len<=0 || (flags&3)){
-// fprintf(stderr,"decode() (rawdv) SKIPPED\n");
- return NULL; // skipped frame
- }
-
- dv_parse_header(decoder, data);
-
- mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, sh->disp_w, sh->disp_h);
-
- if(!mpi){ // temporary!
- fprintf(stderr,"couldn't allocate image for stderr codec\n");
- return NULL;
- }
-
- dv_decode_full_frame(decoder, data, e_dv_color_yuv, mpi->planes, mpi->stride);
-
- return mpi;
-}
diff --git a/libmpcodecs/vd_libdv.h b/libmpcodecs/vd_libdv.h
deleted file mode 100644
index 608d06bf21..0000000000
--- a/libmpcodecs/vd_libdv.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_VD_LIBDV_H
-#define MPLAYER_VD_LIBDV_H
-
-#include <libdv/dv_types.h>
-
-dv_decoder_t* init_global_rawdv_decoder(void);
-
-#endif /* MPLAYER_VD_LIBDV_H */