[MPlayer-dev-eng] [RFC] towards working shared libav* support, part 2
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Sun Sep 14 03:51:48 CEST 2008
On Sunday, 14 September 2008 at 02:51, Dominik 'Rathann' Mierzejewski wrote:
> Here's the first patch that takes us a step close to working shared
> libav* support. It doesn't break anything and fixes a couple of
> problems when using ./configure --disable-libav*_a.
And here's the second patch. It's depends on the first. It's only
to solicit discussion, not meant to be applied as-is.
Additionally, it needs
svn cp ffmpeg/libavutil/bswap.h mplayer/osdep/bswap.h
svn cp ffmpeg/libavutil/intreadwrite.h mplayer/osdep/intreadwrite.h
(with minor adjustments, skipped for now)
Assuming the above is OK, there's one last major problem:
libmpdemux/mp_taglists.c
This file uses libavformat internals and I don't see any easy way
to solve this cleanly right now. Suggestions/patches welcome.
With the two patches posted in this thread applied, one can
rm -rf lib{av,postproc,swscale}* from MPlayer dir and build
it against shared versions.
Regards,
R.
--
MPlayer http://mplayerhq.hu | Livna http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
--- libmpcodecs/vd_ffmpeg.c (revision 27605)
+++ libmpcodecs/vd_ffmpeg.c (working copy)
@@ -9,7 +9,7 @@
#include "av_opts.h"
#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "mpbswap.h"
#include "vd_internal.h"
Index: libmpcodecs/ad_msadpcm.c
===================================================================
--- libmpcodecs/ad_msadpcm.c (revision 27605)
+++ libmpcodecs/ad_msadpcm.c (working copy)
@@ -13,7 +13,7 @@
#include "config.h"
#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "mpbswap.h"
#include "ad_internal.h"
Index: stream/stream_dvd.c
===================================================================
--- stream/stream_dvd.c (revision 27605)
+++ stream/stream_dvd.c (working copy)
@@ -39,7 +39,7 @@
#include "stream_dvd.h"
#include "stream_dvd_common.h"
#include "libmpdemux/demuxer.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
extern char* dvd_device;
static char* dvd_device_current;
Index: stream/pnm.c
===================================================================
--- stream/pnm.c (revision 27605)
+++ stream/pnm.c (working copy)
@@ -43,7 +43,7 @@
#include <winsock2.h>
#endif
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "stream.h"
#include "libmpdemux/demuxer.h"
Index: stream/realrtsp/real.c
===================================================================
--- stream/realrtsp/real.c (revision 27605)
+++ stream/realrtsp/real.c (working copy)
@@ -37,7 +37,7 @@
#include "sdpplin.h"
#include "xbuffer.h"
#include "libavutil/md5.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "stream/http.h"
#include "mp_msg.h"
Index: stream/realrtsp/rmff.c
===================================================================
--- stream/realrtsp/rmff.c (revision 27605)
+++ stream/realrtsp/rmff.c (working copy)
@@ -29,7 +29,7 @@
#include "rmff.h"
#include "xbuffer.h"
#include "mp_msg.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
/*
#define LOG
Index: stream/vcd_read.h
===================================================================
--- stream/vcd_read.h (revision 27605)
+++ stream/vcd_read.h (working copy)
@@ -7,7 +7,7 @@
#include <sys/ioctl.h>
#include "mp_msg.h"
#include "stream.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
//=================== VideoCD ==========================
#if defined(__linux__) || defined(sun) || defined(__bsdi__)
Index: stream/asf_streaming.c
===================================================================
--- stream/asf_streaming.c (revision 27605)
+++ stream/asf_streaming.c (working copy)
@@ -23,7 +23,7 @@
#include "network.h"
#include "tcp.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "libmpdemux/asfguid.h"
Index: mpbswap.h
===================================================================
--- mpbswap.h (revision 27605)
+++ mpbswap.h (working copy)
@@ -3,7 +3,11 @@
#include <sys/types.h>
#include "config.h"
+#ifdef CONFIG_LIBAVUTIL_A
#include "libavutil/bswap.h"
+#else
+#include "osdep/bswap.h"
+#endif
#ifndef HAVE_SWAB
void swab(const void *from, void *to, ssize_t n);
Index: libdvdread/bswap.h
===================================================================
--- libdvdread/bswap.h (revision 27605)
+++ libdvdread/bswap.h (working copy)
@@ -1,7 +1,7 @@
#ifndef DVDREAD_BSWAP_H
#define DVDREAD_BSWAP_H
-#include "libavutil/bswap.h"
+#include "mpbswap.h"
#ifdef WORDS_BIGENDIAN
#define B2N_16(x)
Index: mplayer.c
===================================================================
--- mplayer.c (revision 27605)
+++ mplayer.c (working copy)
@@ -49,7 +49,7 @@
#include "cfg-mplayer-def.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "subreader.h"
Index: libmpdemux/demux_asf.c
===================================================================
--- libmpdemux/demux_asf.c (revision 27605)
+++ libmpdemux/demux_asf.c (working copy)
@@ -14,7 +14,7 @@
#include "demuxer.h"
#include "libvo/fastmemcpy.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
// defined at asfheader.c:
Index: libmpdemux/demux_ty.c
===================================================================
--- libmpdemux/demux_ty.c (revision 27605)
+++ libmpdemux/demux_ty.c (working copy)
@@ -45,7 +45,7 @@
#include "stheader.h"
#include "sub_cc.h"
#include "libavutil/avstring.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
extern void skip_audio_frame( sh_audio_t *sh_audio );
extern int sub_justify;
Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c (revision 27605)
+++ libmpdemux/demux_mkv.c (working copy)
@@ -40,7 +40,7 @@
#endif
#include "libavutil/lzo.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "libavutil/avstring.h"
static const unsigned char sipr_swaps[38][2]={
Index: libmpdemux/demux_mov.c
===================================================================
--- libmpdemux/demux_mov.c (revision 27605)
+++ libmpdemux/demux_mov.c (working copy)
@@ -41,7 +41,7 @@
#include "stheader.h"
#include "libmpcodecs/img_format.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "libvo/sub.h"
Index: libmpdemux/mp_taglists.c
===================================================================
--- libmpdemux/mp_taglists.c (revision 27605)
+++ libmpdemux/mp_taglists.c (working copy)
@@ -19,7 +19,16 @@
#include "config.h"
#include "libavformat/avformat.h"
+#ifdef CONFIG_LIBAVUTIL_A
#include "libavformat/riff.h"
+#else
+typedef struct AVCodecTag {
+ int id;
+ unsigned int tag;
+} AVCodecTag;
+extern const AVCodecTag codec_bmp_tags[];
+extern const AVCodecTag codec_wav_tags[];
+#endif
static const AVCodecTag mp_wav_tags[] = {
{ CODEC_ID_RA_144, MKTAG('1', '4', '_', '4')},
Index: libmpdemux/demux_audio.c
===================================================================
--- libmpdemux/demux_audio.c (revision 27605)
+++ libmpdemux/demux_audio.c (working copy)
@@ -10,7 +10,7 @@
#include "stheader.h"
#include "genres.h"
#include "mp3_hdr.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include <string.h>
Index: libmpdemux/demux_ogg.c
===================================================================
--- libmpdemux/demux_ogg.c (revision 27605)
+++ libmpdemux/demux_ogg.c (working copy)
@@ -13,7 +13,7 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#define FOURCC_VORBIS mmioFOURCC('v', 'r', 'b', 's')
#define FOURCC_SPEEX mmioFOURCC('s', 'p', 'x', ' ')
Index: libmpdemux/asfheader.c
===================================================================
--- libmpdemux/asfheader.c (revision 27605)
+++ libmpdemux/asfheader.c (working copy)
@@ -7,7 +7,7 @@
#include "config.h"
#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "mp_msg.h"
#include "help_mp.h"
Index: mpcommon.c
===================================================================
--- mpcommon.c (revision 27605)
+++ mpcommon.c (working copy)
@@ -10,7 +10,7 @@
#ifdef CONFIG_TV_TELETEXT
#include "stream/tv.h"
#endif
-#include "libavutil/intreadwrite.h"
+#include "mpintrw.h"
#include "m_option.h"
double sub_last_pts = -303;
Index: mpintrw.h
===================================================================
--- mpintrw.h (revision 0)
+++ mpintrw.h (revision 0)
@@ -0,0 +1,11 @@
+#ifndef MPLAYER_MPINTRW_H
+#define MPLAYER_MPINTRW_H
+
+#include "config.h"
+#ifdef CONFIG_LIBAVUTIL_A
+#include "avutil/intreadwrite.h"
+#else
+#include "osdep/intreadwrite.h"
+#endif
+
+#endif /* MPLAYER_MPINTRW_H */
More information about the MPlayer-dev-eng
mailing list