forked from mirrors/nixpkgs
mediastreamer-2.7.2; drop my patches. TODO: forward-port plugins.patch
svn path=/nixpkgs/trunk/; revision=27375
This commit is contained in:
parent
8c12f7f6e9
commit
d299591964
|
@ -1,23 +1,21 @@
|
|||
{ stdenv, fetchurl, autoconf, automake, libtool
|
||||
, pkgconfig, alsaLib, ffmpeg, speex, ortp }:
|
||||
{ stdenv, fetchurl, pkgconfig, alsaLib, ffmpeg, speex, ortp, pulseaudio, xorg,
|
||||
libv4l, libtheora }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mediastreamer2-2.2.0-cvs20080207";
|
||||
name = "mediastreamer-2.7.2";
|
||||
|
||||
# This url is not related to mediastreamer. fetchcvs doesn't work on my laptop,
|
||||
# so I've created cvs snapshot and put it to my server.
|
||||
src = fetchurl {
|
||||
url = "http://www.loegria.net/misc/" + name + ".tar.bz2";
|
||||
sha256 = "1nmvyqh4x3nsw4qbj754jwagj9ia183kvp8valdr7m44my0sw5p1";
|
||||
url = "mirror://savannah/linphone/mediastreamer/${name}.tar.gz";
|
||||
sha256 = "1w5j5shzd5f7q3l2gm4cl82f3vnrdzp78lcyjbjb416c4vzw2nr2";
|
||||
};
|
||||
|
||||
buildInputs = [automake libtool autoconf pkgconfig];
|
||||
# TODO: make it load plugins from *_PLUGIN_PATH
|
||||
buildNativeInputs = [pkgconfig];
|
||||
|
||||
propagatedBuildInputs = [alsaLib ffmpeg speex ortp];
|
||||
propagatedBuildInputs = [alsaLib ffmpeg speex ortp pulseaudio xorg.libX11
|
||||
xorg.libXv xorg.libXext libv4l libtheora];
|
||||
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
patches = [ ./h264.patch ./plugins.patch ];
|
||||
#patches = [ ./h264.patch ./plugins.patch ];
|
||||
|
||||
configureFlags = "--enable-external-ortp";
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/tests/mediastream.c b/tests/mediastream.c
|
||||
index 12e1605..cdc8cd1 100644
|
||||
--- a/tests/mediastream.c
|
||||
+++ b/tests/mediastream.c
|
||||
@@ -144,7 +144,6 @@ int main(int argc, char * argv[])
|
||||
rtp_profile_set_payload(&av_profile,97,&payload_type_theora);
|
||||
rtp_profile_set_payload(&av_profile,99,&payload_type_mp4v);
|
||||
rtp_profile_set_payload(&av_profile,100,&payload_type_x_snow);
|
||||
- rtp_profile_set_payload(&av_profile,102,&payload_type_h264);
|
||||
#endif
|
||||
if (argc<4) {
|
||||
printf(usage);
|
|
@ -1,49 +0,0 @@
|
|||
diff --git a/src/mscommon.c b/src/mscommon.c
|
||||
index 1a12b2f..2399444 100644
|
||||
--- a/src/mscommon.c
|
||||
+++ b/src/mscommon.c
|
||||
@@ -428,6 +428,7 @@ static MSSndCardDesc * ms_snd_card_descs[]={
|
||||
void ms_init(){
|
||||
int i;
|
||||
MSSndCardManager *cm;
|
||||
+ char *ms_plugin_path;
|
||||
|
||||
#ifdef __APPLE__
|
||||
NSApplicationLoad();
|
||||
@@ -451,7 +452,35 @@ void ms_init(){
|
||||
}
|
||||
|
||||
ms_message("Loading plugins");
|
||||
- ms_load_plugins(PACKAGE_PLUGINS_DIR);
|
||||
+ ms_plugin_path = getenv("MS_PLUGIN_PATH");
|
||||
+ do
|
||||
+ {
|
||||
+ if (!ms_plugin_path)
|
||||
+ {
|
||||
+ ms_load_plugins(PACKAGE_PLUGINS_DIR);
|
||||
+ break;
|
||||
+ }
|
||||
+ char *dup_plugins_path = strdup (ms_plugin_path);
|
||||
+ char *cur_plugins_dir = dup_plugins_path;
|
||||
+ if (!dup_plugins_path)
|
||||
+ {
|
||||
+ ms_message("Failed to duplicate plugins path, not loading plugins");
|
||||
+ break;
|
||||
+ }
|
||||
+ while (1)
|
||||
+ {
|
||||
+ char *next_delimiter = strchr(cur_plugins_dir, ":");
|
||||
+ if (next_delimiter)
|
||||
+ next_delimiter[0] = '\0';
|
||||
+ ms_load_plugins(cur_plugins_dir);
|
||||
+ if (!next_delimiter)
|
||||
+ break;
|
||||
+ cur_plugins_dir = next_delimiter + 1;
|
||||
+ }
|
||||
+ free(dup_plugins_path);
|
||||
+ }
|
||||
+ while (0);
|
||||
+
|
||||
ms_message("ms_init() done");
|
||||
}
|
||||
|
Loading…
Reference in a new issue