Mercurial > audlegacy
annotate Plugins/Input/wma/wma.c @ 751:6636d328fa38 trunk
[svn] more progress
author | nenolod |
---|---|
date | Mon, 27 Feb 2006 20:47:59 -0800 |
parents | 82346a6312c2 |
children | e143cbba4819 |
rev | line source |
---|---|
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
1 /* |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
2 * Audacious WMA input plugin |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
3 * (C) 2005 Audacious development team |
137 | 4 * |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
5 * Based on: |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
6 * xmms-wma - WMA player for BMP |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
7 * Copyright (C) 2004,2005 McMCC <mcmcc@mail.ru> |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
8 * bmp-wma - WMA player for BMP |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
9 * Copyright (C) 2004 Roman Bogorodskiy <bogorodskiy@inbox.ru> |
137 | 10 * |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
24 */ | |
244 | 25 #include <stdlib.h> |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
26 #include <math.h> |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
27 #include <stdbool.h> |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
28 #include <stdio.h> |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
29 #include <string.h> |
300
e35b0290f77c
[svn] Squash 3 warnings by compiling as C99 code. Remove round_trick kludge.
chainsaw
parents:
244
diff
changeset
|
30 #include <strings.h> |
553 | 31 #include <glib.h> |
32 #include <glib/gi18n.h> | |
137 | 33 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
34 #include <audacious/plugin.h> |
352 | 35 #include <audacious/output.h> |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
36 #include <libaudacious/util.h> |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
37 #include <libaudacious/titlestring.h> |
137 | 38 |
39 #include "avcodec.h" | |
40 #include "avformat.h" | |
41 | |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
42 #define ABOUT_TXT "Adapted for use in audacious by Tony Vroon (chainsaw@gentoo.org) from\n \ |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
43 the BEEP-WMA plugin which is Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc@mail.ru)\n \ |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
44 and the BMP-WMA plugin which is Copyright (C) 2004 Roman Bogorodskiy <bogorodskiy@inbox.ru>.\n \ |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
45 This plugin based on source code " LIBAVCODEC_IDENT "\nby Fabrice Bellard from \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
46 http://ffmpeg.sourceforge.net.\n\n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
47 This program is free software; you can redistribute it and/or modify \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
48 it under the terms of the GNU General Public License as published by \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
49 the Free Software Foundation; either version 2 of the License, or \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
50 (at your option) any later version. \n\n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
51 This program is distributed in the hope that it will be useful, \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
52 but WITHOUT ANY WARRANTY; without even the implied warranty of \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
53 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n \ |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
54 See the GNU General Public License for more details.\n" |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
55 #define PLUGIN_NAME "Audacious-WMA" |
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
56 #define PLUGIN_VERSION "v.1.0.5" |
137 | 57 #define ST_BUFF 1024 |
58 | |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
59 static GtkWidget *dialog; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
60 static GtkWidget *dialog1, *button1, *label1; |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
61 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
62 static int wma_decode = 0; |
137 | 63 static gboolean wma_pause = 0; |
64 static int wma_seekpos = -1; | |
65 static int wma_st_buff, wma_idx; | |
179 | 66 static GThread *wma_decode_thread; |
67 GStaticMutex wma_mutex = G_STATIC_MUTEX_INIT; | |
137 | 68 static AVCodecContext *c = NULL; |
69 static AVFormatContext *ic = NULL; | |
70 static uint8_t *wma_outbuf, *wma_s_outbuf; | |
71 | |
72 char description[64]; | |
73 static void wma_about(void); | |
74 static void wma_init(void); | |
75 static int wma_is_our_file(char *filename); | |
76 static void wma_play_file(char *filename); | |
77 static void wma_stop(void); | |
78 static void wma_seek(int time); | |
79 static void wma_do_pause(short p); | |
80 static int wma_get_time(void); | |
81 static void wma_get_song_info(char *filename, char **title, int *length); | |
82 static void wma_file_info_box(char *filename); | |
83 static char *wsong_title; | |
84 static int wsong_time; | |
85 | |
86 InputPlugin *get_iplugin_info(void); | |
87 | |
88 InputPlugin wma_ip = | |
89 { | |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
90 NULL, // Filled in by xmms |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
91 NULL, // Filled in by xmms |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
92 description, // The description that is shown in the preferences box |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
93 wma_init, // Called when the plugin is loaded |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
94 wma_about, // Show the about box |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
95 NULL, // Show the configure box |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
96 wma_is_our_file, // Return 1 if the plugin can handle the file |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
97 NULL, // Scan dir |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
98 wma_play_file, // Play file |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
99 wma_stop, // Stop |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
100 wma_do_pause, // Pause |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
101 wma_seek, // Seek |
461 | 102 NULL, // Set the equalizer, most plugins won't be able to do this |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
103 wma_get_time, // Get the time, usually returns the output plugins output time |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
104 NULL, // Get volume |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
105 NULL, // Set volume |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
106 NULL, // OBSOLETE! |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
107 NULL, // OBSOLETE! |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
108 NULL, // Send data to the visualization plugins |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
109 NULL, // Fill in the stuff that is shown in the player window |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
110 NULL, // Show some text in the song title box. Filled in by xmms |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
111 wma_get_song_info, // Function to grab the title string |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
112 wma_file_info_box, // Bring up an info window for the filename passed in |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
113 NULL // Handle to the current output plugin. Filled in by xmms |
137 | 114 }; |
115 | |
116 InputPlugin *get_iplugin_info(void) | |
117 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
118 memset(description, 0, 64); |
751 | 119 wma_ip.description = g_strdup_printf(_("WMA Player %s"), PACKAGE_VERSION); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
120 return &wma_ip; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
121 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
122 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
123 static gchar *str_twenty_to_space(gchar * str) |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
124 { |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
125 gchar *match, *match_end; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
126 |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
127 g_return_val_if_fail(str != NULL, NULL); |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
128 |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
129 while ((match = strstr(str, "%20"))) { |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
130 match_end = match + 3; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
131 *match++ = ' '; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
132 while (*match_end) |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
133 *match++ = *match_end++; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
134 *match = 0; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
135 } |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
136 |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
137 return str; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
138 } |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
139 |
137 | 140 static void wma_about(void) |
141 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
142 char *title; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
143 char *message; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
144 |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
145 if (dialog1) return; |
137 | 146 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
147 title = (char *)g_malloc(80); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
148 message = (char *)g_malloc(1000); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
149 memset(title, 0, 80); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
150 memset(message, 0, 1000); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
151 |
553 | 152 sprintf(title, _("About %s"), PLUGIN_NAME); |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
153 sprintf(message, "%s %s\n\n%s", PLUGIN_NAME, PLUGIN_VERSION, ABOUT_TXT); |
137 | 154 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
155 dialog1 = gtk_dialog_new(); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
156 gtk_signal_connect(GTK_OBJECT(dialog1), "destroy", |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
157 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog1); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
158 gtk_window_set_title(GTK_WINDOW(dialog1), title); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
159 gtk_window_set_policy(GTK_WINDOW(dialog1), FALSE, FALSE, FALSE); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
160 gtk_container_border_width(GTK_CONTAINER(dialog1), 5); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
161 label1 = gtk_label_new(message); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
162 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog1)->vbox), label1, TRUE, TRUE, 0); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
163 gtk_widget_show(label1); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
164 |
553 | 165 button1 = gtk_button_new_with_label(_(" Close ")); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
166 gtk_signal_connect_object(GTK_OBJECT(button1), "clicked", |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
167 GTK_SIGNAL_FUNC(gtk_widget_destroy), |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
168 GTK_OBJECT(dialog1)); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
169 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog1)->action_area), button1, |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
170 FALSE, FALSE, 0); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
171 |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
172 gtk_widget_show(button1); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
173 gtk_widget_show(dialog1); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
174 gtk_widget_grab_focus(button1); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
175 g_free(title); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
176 g_free(message); |
137 | 177 } |
178 | |
179 static void wma_init(void) | |
180 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
181 avcodec_init(); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
182 avcodec_register_all(); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
183 av_register_all(); |
137 | 184 } |
185 | |
186 static int wma_is_our_file(char *filename) | |
187 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
188 gchar *ext; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
189 ext = strrchr(filename, '.'); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
190 if(ext) |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
191 if(!strcasecmp(ext, ".wma")) |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
192 return 1; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
193 return 0; |
137 | 194 } |
195 | |
196 static void wma_do_pause(short p) | |
197 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
198 wma_pause = p; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
199 wma_ip.output->pause(wma_pause); |
137 | 200 } |
201 | |
202 static void wma_seek(int time) | |
203 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
204 wma_seekpos = time; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
205 if(wma_pause) wma_ip.output->pause(0); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
206 while(wma_decode && wma_seekpos!=-1) xmms_usleep(10000); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
207 if(wma_pause) wma_ip.output->pause(1); |
137 | 208 } |
209 | |
210 static int wma_get_time(void) | |
211 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
212 wma_ip.output->buffer_free(); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
213 if(wma_decode) return wma_ip.output->output_time(); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
214 return -1; |
137 | 215 } |
216 | |
217 static gchar *extname(const char *filename) | |
218 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
219 gchar *ext = strrchr(filename, '.'); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
220 if(ext != NULL) ++ext; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
221 return ext; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
222 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
223 |
137 | 224 static char* w_getstr(char* str) |
225 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
226 if(str && strlen(str) > 0) return str; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
227 return NULL; |
137 | 228 } |
229 | |
230 static gchar *get_song_title(AVFormatContext *in, gchar * filename) | |
231 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
232 gchar *ret = NULL; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
233 TitleInput *input; |
137 | 234 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
235 input = bmp_title_input_new(); |
137 | 236 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
237 if((in->title[0] != '\0') || (in->author[0] != '\0') || (in->album[0] != '\0') || |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
238 (in->comment[0] != '\0') || (in->genre[0] != '\0') || (in->year != 0) || (in->track != 0)) |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
239 { |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
240 input->performer = w_getstr(in->author); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
241 input->album_name = w_getstr(in->album); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
242 input->track_name = w_getstr(in->title); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
243 input->year = in->year; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
244 input->track_number = in->track; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
245 input->genre = w_getstr(in->genre); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
246 input->comment = w_getstr(in->comment); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
247 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
248 input->file_name = g_path_get_basename(filename); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
249 input->file_path = g_path_get_dirname(filename); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
250 input->file_ext = extname(filename); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
251 ret = xmms_get_titlestring(xmms_get_gentitle_format(), input); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
252 if(input) g_free(input); |
137 | 253 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
254 if(!ret) |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
255 { |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
256 ret = g_strdup(input->file_name); |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
257 if (extname(ret) != NULL) |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
258 *(extname(ret) - 1) = '\0'; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
259 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
260 return ret; |
137 | 261 } |
262 | |
263 static guint get_song_time(AVFormatContext *in) | |
264 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
265 if(in->duration) |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
266 return in->duration/1000; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
267 else |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
268 return 0; |
137 | 269 } |
270 | |
271 static void wma_get_song_info(char *filename, char **title_real, int *len_real) | |
272 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
273 AVFormatContext *in = NULL; |
137 | 274 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
275 (*len_real) = -1; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
276 (*title_real) = NULL; |
137 | 277 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
278 if (av_open_input_file(&in, str_twenty_to_space(filename), NULL, 0, NULL) < 0) |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
279 return; |
137 | 280 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
281 av_find_stream_info(in); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
282 (*len_real) = get_song_time(in); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
283 (*title_real) = get_song_title(in, filename); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
284 av_close_input_file(in); |
137 | 285 } |
286 | |
287 static void wma_playbuff(int out_size) | |
288 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
289 FifoBuffer f; |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
290 int sst_buff; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
291 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
292 fifo_init(&f, out_size*2); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
293 fifo_write(&f, wma_outbuf, out_size, &f.wptr); |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
294 while(!fifo_read(&f, wma_s_outbuf, wma_st_buff, &f.rptr) && wma_decode) |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
295 { |
461 | 296 sst_buff = wma_st_buff; |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
297 if(wma_pause) memset(wma_s_outbuf, 0, sst_buff); |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
298 while(wma_ip.output->buffer_free() < wma_st_buff) xmms_usleep(20000); |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
299 produce_audio(wma_ip.output->written_time(), FMT_S16_NE, |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
300 c->channels, sst_buff, (short *)wma_s_outbuf, NULL); |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
301 memset(wma_s_outbuf, 0, sst_buff); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
302 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
303 fifo_free(&f); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
304 return; |
137 | 305 } |
306 | |
307 static void *wma_play_loop(void *arg) | |
308 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
309 uint8_t *inbuf_ptr; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
310 int out_size, size, len; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
311 AVPacket pkt; |
137 | 312 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
313 g_static_mutex_lock(&wma_mutex); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
314 while(wma_decode){ |
137 | 315 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
316 if(wma_seekpos != -1) |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
317 { |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
318 av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
319 wma_ip.output->flush(wma_seekpos * 1000); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
320 wma_seekpos = -1; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
321 } |
137 | 322 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
323 if(av_read_frame(ic, &pkt) < 0) break; |
137 | 324 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
325 size = pkt.size; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
326 inbuf_ptr = pkt.data; |
137 | 327 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
328 if(size == 0) break; |
137 | 329 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
330 while(size > 0){ |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
331 len = avcodec_decode_audio(c, (short *)wma_outbuf, &out_size, |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
332 inbuf_ptr, size); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
333 if(len < 0) break; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
334 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
335 if(out_size <= 0) continue; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
336 |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
337 wma_playbuff(out_size); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
338 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
339 size -= len; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
340 inbuf_ptr += len; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
341 if(pkt.data) av_free_packet(&pkt); |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
342 } |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
343 } |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
344 while(wma_decode && wma_ip.output->buffer_playing()) xmms_usleep(30000); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
345 wma_decode = 0; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
346 if(wma_s_outbuf) g_free(wma_s_outbuf); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
347 if(wma_outbuf) g_free(wma_outbuf); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
348 if(pkt.data) av_free_packet(&pkt); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
349 if(c) avcodec_close(c); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
350 if(ic) av_close_input_file(ic); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
351 g_static_mutex_unlock(&wma_mutex); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
352 g_thread_exit(NULL); |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
353 return(NULL); |
137 | 354 } |
355 | |
356 static void wma_play_file(char *filename) | |
357 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
358 AVCodec *codec; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
359 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
360 if(av_open_input_file(&ic, str_twenty_to_space(filename), NULL, 0, NULL) < 0) return; |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
361 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
362 for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) { |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
363 c = &ic->streams[wma_idx]->codec; |
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
364 if(c->codec_type == CODEC_TYPE_AUDIO) break; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
365 } |
179 | 366 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
367 av_find_stream_info(ic); |
137 | 368 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
369 codec = avcodec_find_decoder(c->codec_id); |
137 | 370 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
371 if(!codec) return; |
137 | 372 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
373 if(avcodec_open(c, codec) < 0) return; |
137 | 374 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
375 wsong_title = get_song_title(ic, filename); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
376 wsong_time = get_song_time(ic); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
377 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
378 if(wma_ip.output->open_audio( FMT_S16_NE, c->sample_rate, c->channels) <= 0) return; |
137 | 379 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
380 wma_st_buff = ST_BUFF; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
381 |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
382 wma_ip.set_info(wsong_title, wsong_time, c->bit_rate, c->sample_rate, c->channels); |
137 | 383 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
384 wma_s_outbuf = g_malloc0(wma_st_buff); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
385 wma_outbuf = g_malloc0(AVCODEC_MAX_AUDIO_FRAME_SIZE); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
386 wma_seekpos = -1; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
387 wma_decode = 1; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
388 wma_decode_thread = g_thread_create((GThreadFunc)wma_play_loop, NULL, TRUE, NULL); |
137 | 389 } |
390 | |
391 static void wma_stop(void) | |
392 { | |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
393 wma_decode = 0; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
394 if(wma_pause) wma_do_pause(0); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
395 g_thread_join(wma_decode_thread); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
396 wma_ip.output->close_audio(); |
137 | 397 } |
398 | |
399 static void wma_file_info_box (char *filename) | |
400 { | |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
401 GtkWidget *dialog_vbox1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
402 GtkWidget *vbox1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
403 GtkWidget *hbox1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
404 GtkWidget *label_name; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
405 GtkWidget *entry_filename; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
406 GtkWidget *hbox2; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
407 GtkWidget *frame_wma_info; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
408 GtkWidget *alignment1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
409 GtkWidget *table1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
410 GtkWidget *label_album; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
411 GtkWidget *label_year; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
412 GtkWidget *label_track; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
413 GtkWidget *label_genre; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
414 GtkWidget *label_comments; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
415 GtkWidget *label_wma_version; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
416 GtkWidget *label_bitrate; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
417 GtkWidget *label_rate; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
418 GtkWidget *label_chans; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
419 GtkWidget *label_play_time; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
420 GtkWidget *label_filesize; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
421 GtkWidget *label_wma_vers_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
422 GtkWidget *label_bitrate_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
423 GtkWidget *label_rate_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
424 GtkWidget *label_chans_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
425 GtkWidget *label_playtime_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
426 GtkWidget *label_filesize_val; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
427 GtkWidget *label4; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
428 GtkWidget *frame_tags; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
429 GtkWidget *alignment2; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
430 GtkWidget *table2; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
431 GtkWidget *label_artist; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
432 GtkWidget *label_title; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
433 GtkWidget *entry_artist; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
434 GtkWidget *entry_album; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
435 GtkWidget *entry_year; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
436 GtkWidget *entry_title; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
437 GtkWidget *entry_track; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
438 GtkWidget *entry_genre; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
439 GtkWidget *entry_comments; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
440 GtkWidget *label5; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
441 GtkWidget *dialog_action_area1; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
442 GtkWidget *okbutton; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
443 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
444 AVFormatContext *in = NULL; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
445 AVCodecContext *s = NULL; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
446 AVCodec *codec; |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
447 gint tns, thh, tmm, tss; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
448 gint i; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
449 gchar *title, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
450 *channels, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
451 *bitrate, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
452 *playtime, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
453 *samplerate, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
454 *filesize; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
455 FILE *f; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
456 if (dialog) { |
553 | 457 (void)printf(_("Info dialog is already opened!\n")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
458 return; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
459 } |
137 | 460 |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
461 if(av_open_input_file(&in, filename, NULL, 0, NULL) < 0) |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
462 return; |
137 | 463 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
464 for(i = 0; i < in->nb_streams; i++) { |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
465 s = &in->streams[i]->codec; |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
466 if(s->codec_type == CODEC_TYPE_AUDIO) |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
467 break; |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
468 } |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
469 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
470 av_find_stream_info(in); |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
471 codec = avcodec_find_decoder(s->codec_id); |
137 | 472 |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
473 /* window title */ |
553 | 474 title = g_strdup_printf(_("File Info - %s"), g_basename(filename)); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
475 /* channels */ |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
476 if (s->channels == 1) |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
477 channels = g_strdup("MONO"); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
478 else |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
479 channels = g_strdup("STEREO"); |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
480 |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
481 /* bitrate */ |
553 | 482 bitrate = g_strdup_printf(_("%d Kb/s"), (s->bit_rate / 1000)); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
483 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
484 /* playtime */ |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
485 if (in->duration != 0) { |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
486 tns = in->duration/1000000LL; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
487 thh = tns/3600; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
488 tmm = (tns%3600)/60; |
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
489 tss = (tns%60); |
553 | 490 playtime = g_strdup_printf(_("%02d:%02d:%02d"), thh, tmm, tss); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
491 } else |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
492 playtime = g_strdup("N/A"); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
493 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
494 /* samplerate */ |
553 | 495 samplerate = g_strdup_printf(_("%d Hz"), s->sample_rate); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
496 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
497 /* filesize */ |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
498 f = fopen(filename, "rb"); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
499 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
500 if (f == NULL) |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
501 return; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
502 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
503 fseek(f, 0, SEEK_END); |
553 | 504 filesize = g_strdup_printf(_("%lu Bytes"), ftell(f)); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
505 fclose(f); |
137 | 506 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
507 dialog = gtk_dialog_new(); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
508 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
509 gtk_signal_connect(GTK_OBJECT(dialog), "destroy", |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
510 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
511 |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
512 gtk_window_set_title(GTK_WINDOW(dialog), title); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
513 gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); |
210
12004b385a96
[svn] Sync with xmms-wma instead of bmp-wma & GThreadify. Does not explode, but does not play either.
chainsaw
parents:
179
diff
changeset
|
514 gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, FALSE); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
515 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
516 dialog_vbox1 = GTK_DIALOG(dialog)->vbox; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
517 gtk_widget_show(dialog_vbox1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
518 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
519 vbox1 = gtk_vbox_new(FALSE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
520 gtk_widget_show(vbox1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
521 gtk_box_pack_start(GTK_BOX(dialog_vbox1), vbox1, TRUE, TRUE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
522 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
523 hbox1 = gtk_hbox_new (FALSE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
524 gtk_widget_show (hbox1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
525 gtk_box_pack_start(GTK_BOX(vbox1), hbox1, FALSE, FALSE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
526 |
553 | 527 label_name = gtk_label_new(_("<b>Name:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
528 gtk_widget_show(label_name); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
529 gtk_box_pack_start(GTK_BOX (hbox1), label_name, FALSE, FALSE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
530 gtk_misc_set_alignment(GTK_MISC (label_name), 0.48, 0.51); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
531 gtk_misc_set_padding(GTK_MISC (label_name), 10, 10); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
532 gtk_label_set_use_markup(GTK_LABEL(label_name), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
533 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
534 entry_filename = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
535 gtk_widget_show(entry_filename); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
536 gtk_box_pack_start(GTK_BOX(hbox1), entry_filename, TRUE, TRUE, 4); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
537 gtk_editable_set_editable(GTK_EDITABLE(entry_filename), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
538 gtk_entry_set_text(GTK_ENTRY(entry_filename), filename); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
539 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
540 hbox2 = gtk_hbox_new(FALSE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
541 gtk_widget_show(hbox2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
542 gtk_box_pack_start(GTK_BOX(vbox1), hbox2, TRUE, TRUE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
543 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
544 frame_wma_info = gtk_frame_new(NULL); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
545 gtk_widget_show(frame_wma_info); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
546 gtk_box_pack_start(GTK_BOX(hbox2), frame_wma_info, TRUE, TRUE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
547 gtk_frame_set_shadow_type(GTK_FRAME (frame_wma_info), GTK_SHADOW_ETCHED_IN); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
548 gtk_container_set_border_width (GTK_CONTAINER(frame_wma_info), 10); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
549 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
550 alignment1 = gtk_alignment_new(0.5, 0.5, 1, 1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
551 gtk_widget_show(alignment1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
552 gtk_container_add(GTK_CONTAINER(frame_wma_info), alignment1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
553 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment1), 0, 0, 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
554 gtk_container_set_border_width(GTK_CONTAINER(alignment1), 2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
555 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
556 table1 = gtk_table_new(6, 2, FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
557 gtk_widget_show(table1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
558 gtk_container_add(GTK_CONTAINER(alignment1), table1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
559 gtk_container_set_border_width(GTK_CONTAINER(table1), 6); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
560 gtk_table_set_row_spacings(GTK_TABLE(table1), 3); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
561 gtk_table_set_col_spacings(GTK_TABLE(table1), 8); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
562 /* WMA Version label */ |
553 | 563 label_wma_version = gtk_label_new(_("<b>WMA Version:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
564 gtk_widget_show(label_wma_version); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
565 gtk_table_attach(GTK_TABLE(table1), label_wma_version, 0, 1, 0, 1, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
566 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
567 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
568 gtk_misc_set_alignment(GTK_MISC(label_wma_version), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
569 gtk_label_set_use_markup(GTK_LABEL(label_wma_version), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
570 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
571 /* Bitrate */ |
553 | 572 label_bitrate = gtk_label_new(_("<b>Bitrate:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
573 gtk_widget_show(label_bitrate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
574 gtk_table_attach(GTK_TABLE(table1), label_bitrate, 0, 1, 1, 2, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
575 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
576 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
577 gtk_misc_set_alignment(GTK_MISC(label_bitrate), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
578 gtk_label_set_use_markup(GTK_LABEL(label_bitrate), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
579 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
580 /* Samplerate */ |
553 | 581 label_rate = gtk_label_new(_("<b>Samplerate:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
582 gtk_widget_show(label_rate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
583 gtk_table_attach(GTK_TABLE(table1), label_rate, 0, 1, 2, 3, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
584 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
585 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
586 gtk_misc_set_alignment(GTK_MISC(label_rate), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
587 gtk_label_set_use_markup(GTK_LABEL(label_rate), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
588 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
589 /* Channels */ |
553 | 590 label_chans = gtk_label_new(_("<b>Channels:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
591 gtk_widget_show(label_chans); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
592 gtk_table_attach(GTK_TABLE (table1), label_chans, 0, 1, 3, 4, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
593 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
594 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
595 gtk_misc_set_alignment(GTK_MISC(label_chans), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
596 gtk_label_set_use_markup(GTK_LABEL(label_chans), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
597 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
598 /* Play time */ |
553 | 599 label_play_time = gtk_label_new(_("<b>Play time:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
600 gtk_widget_show(label_play_time); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
601 gtk_table_attach(GTK_TABLE (table1), label_play_time, 0, 1, 4, 5, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
602 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
603 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
604 gtk_misc_set_alignment(GTK_MISC(label_play_time), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
605 gtk_label_set_use_markup(GTK_LABEL(label_play_time), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
606 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
607 /* Filesize */ |
553 | 608 label_filesize = gtk_label_new(_("<b>Filesize:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
609 gtk_widget_show(label_filesize); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
610 gtk_table_attach(GTK_TABLE(table1), label_filesize, 0, 1, 5, 6, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
611 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
612 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
613 gtk_misc_set_alignment(GTK_MISC(label_filesize), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
614 gtk_label_set_use_markup(GTK_LABEL(label_filesize), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
615 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
616 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
617 label_wma_vers_val = gtk_label_new(codec->name); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
618 gtk_widget_show(label_wma_vers_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
619 gtk_table_attach(GTK_TABLE(table1), label_wma_vers_val, 1, 2, 0, 1, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
620 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
621 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
622 gtk_misc_set_alignment(GTK_MISC(label_wma_vers_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
623 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
624 label_bitrate_val = gtk_label_new(bitrate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
625 gtk_widget_show(label_bitrate_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
626 gtk_table_attach(GTK_TABLE(table1), label_bitrate_val, 1, 2, 1, 2, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
627 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
628 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
629 gtk_misc_set_alignment(GTK_MISC(label_bitrate_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
630 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
631 label_rate_val = gtk_label_new(samplerate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
632 gtk_widget_show(label_rate_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
633 gtk_table_attach(GTK_TABLE(table1), label_rate_val, 1, 2, 2, 3, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
634 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
635 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
636 gtk_misc_set_alignment(GTK_MISC(label_rate_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
637 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
638 label_chans_val = gtk_label_new(channels); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
639 gtk_widget_show(label_chans_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
640 gtk_table_attach(GTK_TABLE(table1), label_chans_val, 1, 2, 3, 4, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
641 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
642 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
643 gtk_misc_set_alignment(GTK_MISC (label_chans_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
644 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
645 label_playtime_val = gtk_label_new(playtime); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
646 gtk_widget_show(label_playtime_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
647 gtk_table_attach(GTK_TABLE(table1), label_playtime_val, 1, 2, 4, 5, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
648 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
649 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
650 gtk_misc_set_alignment(GTK_MISC(label_playtime_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
651 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
652 label_filesize_val = gtk_label_new(filesize); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
653 gtk_widget_show(label_filesize_val); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
654 gtk_table_attach(GTK_TABLE (table1), label_filesize_val, 1, 2, 5, 6, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
655 (GtkAttachOptions)(GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
656 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
657 gtk_misc_set_alignment(GTK_MISC(label_filesize_val), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
658 |
553 | 659 label4 = gtk_label_new (_("WMA Info")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
660 gtk_widget_show(label4); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
661 gtk_frame_set_label_widget(GTK_FRAME(frame_wma_info), label4); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
662 frame_tags = gtk_frame_new (NULL); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
663 gtk_widget_show (frame_tags); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
664 gtk_box_pack_start (GTK_BOX (hbox2), frame_tags, TRUE, TRUE, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
665 gtk_frame_set_shadow_type (GTK_FRAME (frame_tags), GTK_SHADOW_ETCHED_IN); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
666 gtk_container_set_border_width (GTK_CONTAINER (frame_tags), 10); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
667 |
137 | 668 |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
669 alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
670 gtk_widget_show (alignment2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
671 gtk_container_add (GTK_CONTAINER (frame_tags), alignment2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
672 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 0, 12, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
673 gtk_container_set_border_width (GTK_CONTAINER (alignment2), 2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
674 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
675 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
676 table2 = gtk_table_new(8, 2, FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
677 gtk_widget_show(table2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
678 gtk_container_add(GTK_CONTAINER(alignment2), table2); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
679 gtk_container_set_border_width(GTK_CONTAINER(table2), 6); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
680 gtk_table_set_row_spacings(GTK_TABLE(table2), 3); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
681 gtk_table_set_col_spacings(GTK_TABLE(table2), 8); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
682 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
683 /* Artist */ |
553 | 684 label_artist = gtk_label_new(_("<b>Artist:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
685 gtk_widget_show(label_artist); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
686 gtk_table_attach(GTK_TABLE (table2), label_artist, 0, 1, 0, 1, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
687 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
688 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
689 gtk_misc_set_alignment(GTK_MISC(label_artist), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
690 gtk_label_set_use_markup(GTK_LABEL(label_artist), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
691 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
692 /* Title */ |
553 | 693 label_title = gtk_label_new(_("<b>Title:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
694 gtk_widget_show(label_title); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
695 gtk_table_attach(GTK_TABLE (table2), label_title, 0, 1, 1, 2, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
696 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
697 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
698 gtk_misc_set_alignment(GTK_MISC(label_title), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
699 gtk_label_set_use_markup(GTK_LABEL(label_title), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
700 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
701 /* Album */ |
553 | 702 label_album = gtk_label_new(_("<b>Album:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
703 gtk_widget_show(label_album); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
704 gtk_table_attach(GTK_TABLE (table2), label_album, 0, 1, 2, 3, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
705 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
706 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
707 gtk_misc_set_alignment(GTK_MISC(label_album), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
708 gtk_label_set_use_markup(GTK_LABEL(label_album), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
709 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
710 /* Comments */ |
553 | 711 label_comments = gtk_label_new(_("<b>Comments:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
712 gtk_widget_show(label_comments); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
713 gtk_table_attach(GTK_TABLE(table2), label_comments, 0, 1, 3, 4, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
714 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
715 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
716 gtk_misc_set_alignment(GTK_MISC(label_comments), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
717 gtk_label_set_use_markup(GTK_LABEL(label_comments), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
718 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
719 /* Year */ |
553 | 720 label_year = gtk_label_new(_("<b>Year:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
721 gtk_widget_show(label_year); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
722 gtk_table_attach(GTK_TABLE (table2), label_year, 0, 1, 4, 5, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
723 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
724 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
725 gtk_misc_set_alignment(GTK_MISC(label_year), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
726 gtk_label_set_use_markup(GTK_LABEL(label_year), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
727 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
728 /* Track */ |
553 | 729 label_track = gtk_label_new(_("<b>Track:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
730 gtk_widget_show(label_track); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
731 gtk_table_attach(GTK_TABLE (table2), label_track, 0, 1, 5, 6, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
732 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
733 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
734 gtk_misc_set_alignment(GTK_MISC(label_track), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
735 gtk_label_set_use_markup(GTK_LABEL(label_track), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
736 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
737 /* Genre */ |
553 | 738 label_genre = gtk_label_new(_("<b>Genre:</b>")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
739 gtk_widget_show(label_genre); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
740 gtk_table_attach(GTK_TABLE (table2), label_genre, 0, 1, 6, 7, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
741 (GtkAttachOptions) (GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
742 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
743 gtk_misc_set_alignment(GTK_MISC (label_genre), 0, 0.5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
744 gtk_label_set_use_markup(GTK_LABEL(label_genre), TRUE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
745 |
137 | 746 |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
747 entry_artist = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
748 gtk_widget_show (entry_artist); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
749 gtk_table_attach (GTK_TABLE (table2), entry_artist, 1, 2, 0, 1, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
750 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
751 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
752 gtk_editable_set_editable (GTK_EDITABLE (entry_artist), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
753 gtk_entry_set_text(GTK_ENTRY(entry_artist), in->author); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
754 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
755 entry_title = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
756 gtk_widget_show(entry_title); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
757 gtk_table_attach (GTK_TABLE (table2), entry_title, 1, 2, 1, 2, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
758 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
759 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
760 gtk_editable_set_editable(GTK_EDITABLE (entry_title), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
761 gtk_entry_set_text(GTK_ENTRY(entry_title), in->title); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
762 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
763 entry_album = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
764 gtk_widget_show(entry_album); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
765 gtk_table_attach(GTK_TABLE (table2), entry_album, 1, 2, 2, 3, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
766 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
767 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
768 gtk_editable_set_editable(GTK_EDITABLE (entry_album), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
769 gtk_entry_set_text(GTK_ENTRY(entry_album), in->album); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
770 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
771 entry_comments = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
772 gtk_widget_show(entry_comments); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
773 gtk_table_attach(GTK_TABLE (table2), entry_comments, 1, 2, 3, 4, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
774 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
775 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
776 gtk_editable_set_editable(GTK_EDITABLE (entry_comments), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
777 gtk_entry_set_text(GTK_ENTRY(entry_comments), in->comment); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
778 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
779 entry_year = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
780 gtk_widget_show(entry_year); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
781 gtk_table_attach(GTK_TABLE (table2), entry_year, 1, 2, 4, 5, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
782 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
783 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
784 gtk_editable_set_editable(GTK_EDITABLE (entry_year), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
785 gtk_entry_set_text(GTK_ENTRY(entry_year), g_strdup_printf("%d", in->year)); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
786 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
787 entry_track = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
788 gtk_widget_show(entry_track); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
789 gtk_table_attach(GTK_TABLE (table2), entry_track, 1, 2, 5, 6, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
790 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
791 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
792 gtk_editable_set_editable(GTK_EDITABLE (entry_track), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
793 gtk_entry_set_text(GTK_ENTRY(entry_track), g_strdup_printf("%d", in->track)); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
794 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
795 entry_genre = gtk_entry_new(); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
796 gtk_widget_show(entry_genre); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
797 gtk_table_attach(GTK_TABLE (table2), entry_genre, 1, 2, 6, 7, |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
798 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
799 (GtkAttachOptions) (0), 0, 0); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
800 gtk_editable_set_editable(GTK_EDITABLE (entry_genre), FALSE); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
801 gtk_entry_set_text(GTK_ENTRY(entry_genre), in->genre); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
802 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
803 |
553 | 804 label5 = gtk_label_new(_("Tags")); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
805 gtk_widget_show(label5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
806 gtk_frame_set_label_widget(GTK_FRAME(frame_tags), label5); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
807 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
808 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
809 dialog_action_area1 = GTK_DIALOG(dialog)->action_area; |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
810 gtk_widget_show(dialog_action_area1); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
811 gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area1), GTK_BUTTONBOX_END); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
812 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
813 okbutton = gtk_button_new_from_stock("gtk-ok"); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
814 gtk_widget_show(okbutton); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
815 gtk_dialog_add_action_widget(GTK_DIALOG(dialog), okbutton, GTK_RESPONSE_OK); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
816 GTK_WIDGET_SET_FLAGS(okbutton, GTK_CAN_DEFAULT); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
817 |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
818 gtk_signal_connect_object(GTK_OBJECT(okbutton), "clicked", |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
819 GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(dialog)); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
820 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
821 gtk_widget_show(dialog); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
822 |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
823 g_free(title); |
458
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
824 g_free(channels); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
825 g_free(bitrate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
826 g_free(playtime); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
827 g_free(samplerate); |
154ca7ff713f
[svn] Temporarily stop building the WMA plugin until it can be fixed.
chainsaw
parents:
456
diff
changeset
|
828 g_free(filesize); |
456
ffd68c74022b
[svn] Revert to revision 379, unable to fix fallout from 450, still segfaults intermittently.
chainsaw
parents:
440
diff
changeset
|
829 } |