summaryrefslogtreecommitdiff
path: root/community/gmerlin/cdio-api-fixes.patch
blob: 14c934b16504009cd19a3d7aa3e27f3fc06c82b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
diff -upr gmerlin-1.2.0.orig/plugins/cdaudio/cdparanoia.c gmerlin-1.2.0/plugins/cdaudio/cdparanoia.c
--- gmerlin-1.2.0.orig/plugins/cdaudio/cdparanoia.c	2013-01-10 21:16:27.000000000 +0200
+++ gmerlin-1.2.0/plugins/cdaudio/cdparanoia.c	2013-01-10 21:25:59.000000000 +0200
@@ -28,8 +28,8 @@
 
 #include "cdaudio.h"
 #define DO_NOT_WANT_PARANOIA_COMPATIBILITY
-#include <cdio/cdda.h>
-#include <cdio/paranoia.h>
+#include <cdio/paranoia/cdda.h>
+#include <cdio/paranoia/paranoia.h>
 
 /*
  *  Ripping support
diff -upr gmerlin-1.2.0.orig/plugins/cdaudio/cdtext.c gmerlin-1.2.0/plugins/cdaudio/cdtext.c
--- gmerlin-1.2.0.orig/plugins/cdaudio/cdtext.c	2013-01-10 21:16:27.000000000 +0200
+++ gmerlin-1.2.0/plugins/cdaudio/cdtext.c	2013-01-10 21:25:27.000000000 +0200
@@ -34,7 +34,7 @@
 #include "cdaudio.h"
 
 #define GET_FIELD(dst, key) \
-  field = cdtext_get_const(key, cdtext);
+  field = cdtext_get_const(cdtext, key, i+1);
 
 #define GET_FIELD_DEFAULT(dst,key)                                      \
   field = cdtext_get_const(key, cdtext);                                \
@@ -64,30 +64,26 @@ int bg_cdaudio_get_metadata_cdtext(CdIo_
 
   /* Get information for the whole disc */
   
-  cdtext = cdio_get_cdtext (cdio, 0);
+  cdtext = cdio_get_cdtext (cdio);
 
   if(!cdtext)
     return 0;
   
-  artist  = cdtext_get_const(CDTEXT_PERFORMER, cdtext);
-  author  = cdtext_get_const(CDTEXT_COMPOSER, cdtext); /* Composer overwrites songwriter */
+  artist  = cdtext_get_const(cdtext, CDTEXT_FIELD_PERFORMER, 0);
+  author  = cdtext_get_const(cdtext, CDTEXT_FIELD_COMPOSER, 0); /* Composer overwrites songwriter */
 
   if(!author)
-    author  = cdtext_get_const(CDTEXT_SONGWRITER, cdtext);
+    author  = cdtext_get_const(cdtext, CDTEXT_FIELD_SONGWRITER, 0);
   
-  album  = cdtext_get_const(CDTEXT_TITLE, cdtext);
-  genre  = cdtext_get_const(CDTEXT_GENRE, cdtext);
-  comment  = cdtext_get_const(CDTEXT_MESSAGE, cdtext);
+  album  = cdtext_get_const(cdtext, CDTEXT_FIELD_TITLE, 0);
+  genre  = cdtext_get_const(cdtext, CDTEXT_FIELD_GENRE, 0);
+  comment  = cdtext_get_const(cdtext, CDTEXT_FIELD_MESSAGE, 0);
   
   for(i = 0; i < idx->num_tracks; i++)
     {
     if(idx->tracks[i].is_audio)
       {
-      cdtext = cdio_get_cdtext (cdio, i+1);
-      if(!cdtext)
-        return 0;
-      
-      GET_FIELD(title, CDTEXT_TITLE);
+      GET_FIELD(title, CDTEXT_FIELD_TITLE);
       
       if(!title)
         return 0;
@@ -95,7 +91,7 @@ int bg_cdaudio_get_metadata_cdtext(CdIo_
       gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                         GAVL_META_TITLE, title);
 
-      if((field = cdtext_get_const(CDTEXT_PERFORMER, cdtext)))
+      if((field = cdtext_get_const(cdtext, CDTEXT_FIELD_PERFORMER, i+1)))
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_ARTIST, field);
       else
@@ -103,10 +99,10 @@ int bg_cdaudio_get_metadata_cdtext(CdIo_
                           GAVL_META_ARTIST, artist);
 
 
-      if((field = cdtext_get_const(CDTEXT_COMPOSER, cdtext)))
+      if((field = cdtext_get_const(cdtext, CDTEXT_FIELD_COMPOSER, i+1)))
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_AUTHOR, field);
-      else if((field = cdtext_get_const(CDTEXT_SONGWRITER, cdtext)))
+      else if((field = cdtext_get_const(cdtext, CDTEXT_FIELD_SONGWRITER, i+1)))
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_AUTHOR, field);
       else if(author)
@@ -114,14 +110,14 @@ int bg_cdaudio_get_metadata_cdtext(CdIo_
                           GAVL_META_AUTHOR, author);
 
 
-      if((field = cdtext_get_const(CDTEXT_GENRE, cdtext)))
+      if((field = cdtext_get_const(cdtext, CDTEXT_FIELD_GENRE, i+1)))
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_GENRE, field);
       else
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_GENRE, genre);
 
-      if((field = cdtext_get_const(CDTEXT_MESSAGE, cdtext)))
+      if((field = cdtext_get_const(cdtext, CDTEXT_FIELD_MESSAGE, i+1)))
         gavl_metadata_set(&info[idx->tracks[i].index].metadata,
                           GAVL_META_COMMENT, field);
       else