1 |
aballier 08/08/06 21:09:56 |
2 |
|
3 |
Added: mlt-0.2.4-sox1410.patch |
4 |
Log: |
5 |
fix building against latest sox |
6 |
(Portage version: 2.2_rc6/cvs/Linux 2.6.26-gentoo x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-libs/mlt/files/mlt-0.2.4-sox1410.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mlt/files/mlt-0.2.4-sox1410.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mlt/files/mlt-0.2.4-sox1410.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: mlt-0.2.4-sox1410.patch |
15 |
=================================================================== |
16 |
Index: mlt-0.2.4/src/modules/sox/filter_sox.c |
17 |
=================================================================== |
18 |
--- mlt-0.2.4.orig/src/modules/sox/filter_sox.c |
19 |
+++ mlt-0.2.4/src/modules/sox/filter_sox.c |
20 |
@@ -38,7 +38,11 @@ |
21 |
# define ST_LIB_VERSION_CODE SOX_LIB_VERSION_CODE |
22 |
# define ST_LIB_VERSION SOX_LIB_VERSION |
23 |
# define ST_SIGNED_WORD_TO_SAMPLE(d,clips) SOX_SIGNED_16BIT_TO_SAMPLE(d,clips) |
24 |
+#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0) |
25 |
# define ST_SSIZE_MIN SOX_SSIZE_MIN |
26 |
+#else |
27 |
+# define ST_SSIZE_MIN (SOX_SIZE_MAX/2) |
28 |
+#endif |
29 |
# define ST_SAMPLE_TO_SIGNED_WORD(d,clips) SOX_SAMPLE_TO_SIGNED_16BIT(d,clips) |
30 |
#else |
31 |
# include <st.h> |
32 |
@@ -91,7 +95,11 @@ static int create_effect( mlt_filter thi |
33 |
// Locate the effect |
34 |
#ifdef SOX14 |
35 |
//fprintf(stderr, "%s: effect %s count %d\n", __FUNCTION__, tokeniser->tokens[0], tokeniser->count ); |
36 |
+#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0) |
37 |
sox_create_effect( eff, sox_find_effect( tokeniser->tokens[0] ) ); |
38 |
+#else |
39 |
+ eff = sox_create_effect( sox_find_effect( tokeniser->tokens[0] ) ); |
40 |
+#endif |
41 |
int opt_count = tokeniser->count - 1; |
42 |
#else |
43 |
int opt_count = st_geteffect_opt( eff, tokeniser->count, tokeniser->tokens ); |
44 |
@@ -108,10 +116,17 @@ static int create_effect( mlt_filter thi |
45 |
#endif |
46 |
{ |
47 |
// Set the sox signal parameters |
48 |
+#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0) |
49 |
eff->ininfo.rate = frequency; |
50 |
eff->outinfo.rate = frequency; |
51 |
eff->ininfo.channels = 1; |
52 |
eff->outinfo.channels = 1; |
53 |
+#else |
54 |
+ eff->in_signal.rate = frequency; |
55 |
+ eff->out_signal.rate = frequency; |
56 |
+ eff->in_signal.channels = 1; |
57 |
+ eff->out_signal.channels = 1; |
58 |
+#endif |
59 |
|
60 |
// Start the effect |
61 |
#ifdef SOX14 |
62 |
@@ -214,8 +229,13 @@ static int filter_get_audio( mlt_frame f |
63 |
eff_t e = mlt_properties_get_data( filter_properties, id, NULL ); |
64 |
|
65 |
// Validate the existing effect state |
66 |
+#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0) |
67 |
if ( e != NULL && ( e->ininfo.rate != *frequency || |
68 |
e->outinfo.rate != *frequency ) ) |
69 |
+#else |
70 |
+ if ( e != NULL && ( e->in_signal.rate != *frequency || |
71 |
+ e->out_signal.rate != *frequency ) ) |
72 |
+#endif |
73 |
e = NULL; |
74 |
|
75 |
// (Re)Create the effect state |