diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-09 23:37:00 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-09 23:37:00 +0200 |
commit | 42bf12c2d3b2903a127f625dea0d3516a87debfa (patch) | |
tree | 7fe1a2c4a3c250d44b9ff2a8bdf3809104744eb9 /libmpcodecs | |
parent | fa34ea27b94cd870ec56de4ce215bf797054119f (diff) | |
parent | 3c514ea708749679623ae04fc8f7ade87e51aade (diff) | |
download | mpv-42bf12c2d3b2903a127f625dea0d3516a87debfa.tar.bz2 mpv-42bf12c2d3b2903a127f625dea0d3516a87debfa.tar.xz |
Merge svn changes up to r30595
Conflicts:
mplayer.c
vidix/nvidia_vid.c
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_libdv.c | 4 | ||||
-rw-r--r-- | libmpcodecs/ad_mp3lib.c | 1 | ||||
-rw-r--r-- | libmpcodecs/ad_mp3lib.h | 24 | ||||
-rw-r--r-- | libmpcodecs/vd_libdv.c | 1 | ||||
-rw-r--r-- | libmpcodecs/vd_libdv.h | 26 | ||||
-rw-r--r-- | libmpcodecs/vd_theora.c | 27 |
6 files changed, 72 insertions, 11 deletions
diff --git a/libmpcodecs/ad_libdv.c b/libmpcodecs/ad_libdv.c index 384627462d..c4b30a747d 100644 --- a/libmpcodecs/ad_libdv.c +++ b/libmpcodecs/ad_libdv.c @@ -37,6 +37,7 @@ #include "libmpdemux/stheader.h" #include "ad_internal.h" +#include "vd_libdv.h" static const ad_info_t info = { @@ -49,9 +50,6 @@ static const ad_info_t info = LIBAD_EXTERN(libdv) -// defined in vd_libdv.c: -dv_decoder_t* init_global_rawdv_decoder(void); - static int preinit(sh_audio_t *sh_audio) { sh_audio->audio_out_minsize=4*DV_AUDIO_MAX_SAMPLES*2; diff --git a/libmpcodecs/ad_mp3lib.c b/libmpcodecs/ad_mp3lib.c index 5b50557c96..f262757526 100644 --- a/libmpcodecs/ad_mp3lib.c +++ b/libmpcodecs/ad_mp3lib.c @@ -23,6 +23,7 @@ #include "config.h" #include "ad_internal.h" +#include "ad_mp3lib.h" static const ad_info_t info = { diff --git a/libmpcodecs/ad_mp3lib.h b/libmpcodecs/ad_mp3lib.h new file mode 100644 index 0000000000..aeb78b4ed8 --- /dev/null +++ b/libmpcodecs/ad_mp3lib.h @@ -0,0 +1,24 @@ +/* + * 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_AD_MP3LIB_H +#define MPLAYER_AD_MP3LIB_H + +int mplayer_audio_read(char *buf, int size); + +#endif /* MPLAYER_AD_MP3LIB_H */ diff --git a/libmpcodecs/vd_libdv.c b/libmpcodecs/vd_libdv.c index 02d7e2fc54..137fa7bf60 100644 --- a/libmpcodecs/vd_libdv.c +++ b/libmpcodecs/vd_libdv.c @@ -35,6 +35,7 @@ #include "libmpdemux/stheader.h" #include "vd_internal.h" +#include "vd_libdv.h" static const vd_info_t info = { diff --git a/libmpcodecs/vd_libdv.h b/libmpcodecs/vd_libdv.h new file mode 100644 index 0000000000..608d06bf21 --- /dev/null +++ b/libmpcodecs/vd_libdv.h @@ -0,0 +1,26 @@ +/* + * 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 */ diff --git a/libmpcodecs/vd_theora.c b/libmpcodecs/vd_theora.c index 35e3edfab8..b8be6d747b 100644 --- a/libmpcodecs/vd_theora.c +++ b/libmpcodecs/vd_theora.c @@ -41,11 +41,28 @@ LIBVD_EXTERN(theora) #define THEORA_NUM_HEADER_PACKETS 3 +typedef struct theora_struct_st { + theora_state st; + theora_comment cc; + theora_info inf; +} theora_struct_t; + +/** Convert Theora pixelformat to the corresponding IMGFMT_ */ +static uint32_t theora_pixelformat2imgfmt(theora_pixelformat fmt){ + switch(fmt) { + case OC_PF_420: return IMGFMT_YV12; + case OC_PF_422: return IMGFMT_422P; + case OC_PF_444: return IMGFMT_444P; + } + return 0; +} + // to set/get/query special features/parameters static int control(sh_video_t *sh,int cmd,void* arg,...){ + theora_struct_t *context = sh->context; switch(cmd) { case VDCTRL_QUERY_FORMAT: - if (*(int*)arg == IMGFMT_YV12) + if (*(int*)arg == theora_pixelformat2imgfmt(context->inf.pixelformat)) return CONTROL_TRUE; return CONTROL_FALSE; } @@ -53,12 +70,6 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ return CONTROL_UNKNOWN; } -typedef struct theora_struct_st { - theora_state st; - theora_comment cc; - theora_info inf; -} theora_struct_t; - /* * init driver */ @@ -104,7 +115,7 @@ static int init(sh_video_t *sh){ mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n"); - return mpcodecs_config_vo (sh,context->inf.frame_width,context->inf.frame_height,IMGFMT_YV12); + return mpcodecs_config_vo (sh,context->inf.frame_width,context->inf.frame_height,theora_pixelformat2imgfmt(context->inf.pixelformat)); err_out: free(context); |