forked from mirrors/nixpkgs
Mediastreamer: compilable
svn path=/nixpkgs/branches/stdenv-updates/; revision=10569
This commit is contained in:
parent
4df190c703
commit
a4512a4a49
|
@ -1,7 +1,7 @@
|
|||
args: with args;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mediastreamer-" + version;
|
||||
name = "mediastreamer2-" + version;
|
||||
|
||||
# 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.
|
||||
|
@ -10,7 +10,13 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1nmvyqh4x3nsw4qbj754jwagj9ia183kvp8valdr7m44my0sw5p1";
|
||||
};
|
||||
|
||||
buildInputs = [automake];
|
||||
buildInputs = [automake libtool autoconf pkgconfig];
|
||||
|
||||
propagatedBuildInputs = [alsaLib ffmpeg speex ortp];
|
||||
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
patches = [ ./h264.patch ./plugins.patch ];
|
||||
|
||||
configureFlags = "--enable-external-ortp --enable-shared --disable-static";
|
||||
}
|
||||
|
|
12
pkgs/development/libraries/mediastreamer/h264.patch
Normal file
12
pkgs/development/libraries/mediastreamer/h264.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
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);
|
49
pkgs/development/libraries/mediastreamer/plugins.patch
Normal file
49
pkgs/development/libraries/mediastreamer/plugins.patch
Normal file
|
@ -0,0 +1,49 @@
|
|||
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");
|
||||
}
|
||||
|
|
@ -2415,7 +2415,9 @@ rec {
|
|||
#failed to build
|
||||
mediastreamerFun = lib.sumArgs (selectVersion
|
||||
../development/libraries/mediastreamer "2.2.0-cvs20080207") {
|
||||
inherit fetchurl stdenv automake;
|
||||
inherit fetchurl stdenv automake libtool autoconf alsaLib pkgconfig speex
|
||||
ortp;
|
||||
ffmpeg = ffmpeg_svn;
|
||||
};
|
||||
|
||||
mediastreamer = mediastreamerFun null;
|
||||
|
|
Loading…
Reference in a new issue