Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Vorbis tools
Commits
b21c6cef
Commit
b21c6cef
authored
Jan 03, 2002
by
Segher Boessenkool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support utf8 in ogg123 and ogginfo.
svn path=/trunk/vorbis-tools/; revision=2944
parent
d755b054
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
6 deletions
+26
-6
ogg123/Makefile.am
ogg123/Makefile.am
+1
-1
ogg123/ogg123.c
ogg123/ogg123.c
+4
-1
ogg123/oggvorbis_format.c
ogg123/oggvorbis_format.c
+11
-3
ogginfo/ogginfo.c
ogginfo/ogginfo.c
+10
-1
No files found.
ogg123/Makefile.am
View file @
b21c6cef
...
...
@@ -12,7 +12,7 @@ INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \
@PTHREAD_CFLAGS@ @SHARE_CFLAGS@
ogg123_LDADD
=
@VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@
\
@SOCKET_LIBS@ @SHARE_LIBS@ @CURL_LIBS@ @PTHREAD_CFLAGS@
\
@SOCKET_LIBS@
@LIBICONV@
@SHARE_LIBS@ @CURL_LIBS@ @PTHREAD_CFLAGS@
\
@PTHREAD_LIBS@
ogg123_DEPENDENCIES
=
@SHARE_LIBS@
ogg123_SOURCES
=
audio.c buffer.c callbacks.c
\
...
...
ogg123/ogg123.c
View file @
b21c6cef
...
...
@@ -14,7 +14,7 @@
* *
********************************************************************
last mod: $Id: ogg123.c,v 1.5
7
2002/01/0
1
1
5
:4
3:29 volsung
Exp $
last mod: $Id: ogg123.c,v 1.5
8
2002/01/0
3
1
0
:4
0:40 segher
Exp $
********************************************************************/
...
...
@@ -28,6 +28,7 @@
#include <signal.h>
#include <unistd.h>
#include <sys/time.h>
#include <locale.h>
#include "audio.h"
#include "buffer.h"
...
...
@@ -267,6 +268,8 @@ int main(int argc, char **argv)
{
int
optind
;
setlocale
(
LC_ALL
,
""
);
ao_initialize
();
stat_format
=
stat_format_create
();
options_init
(
&
options
);
...
...
ogg123/oggvorbis_format.c
View file @
b21c6cef
...
...
@@ -11,7 +11,7 @@
* *
********************************************************************
last mod: $Id: oggvorbis_format.c,v 1.
3
200
1/12/28 00:22:36
segher Exp $
last mod: $Id: oggvorbis_format.c,v 1.
4
200
2/01/03 10:40:40
segher Exp $
********************************************************************/
...
...
@@ -22,6 +22,7 @@
#include <vorbis/vorbisfile.h>
#include "transport.h"
#include "format.h"
#include "utf8.h"
typedef
struct
ovf_private_t
{
...
...
@@ -339,10 +340,17 @@ void print_stream_comments (decoder_t *decoder)
return
;
for
(
i
=
0
;
i
<
priv
->
vc
->
comments
;
i
++
)
{
char
*
decoded_value
;
comment
=
priv
->
vc
->
user_comments
[
i
];
comment_formatstr
=
lookup_comment_formatstr
(
comment
,
&
offset
);
cb
->
printf_metadata
(
decoder
->
callback_arg
,
1
,
if
(
utf8_decode
(
comment
+
offset
,
&
decoded_value
)
>=
0
)
{
cb
->
printf_metadata
(
decoder
->
callback_arg
,
1
,
comment_formatstr
,
decoded_value
);
free
(
decoded_value
);
}
else
cb
->
printf_metadata
(
decoder
->
callback_arg
,
1
,
comment_formatstr
,
comment
+
offset
);
}
}
...
...
ogginfo/ogginfo.c
View file @
b21c6cef
...
...
@@ -14,6 +14,8 @@
#include <string.h>
#include <ogg/ogg.h>
#include <vorbis/codec.h>
#include <locale.h>
#include "utf8.h"
int
dointegritycheck
(
char
*
filename
);
...
...
@@ -21,6 +23,8 @@ int main(int ac,char **av)
{
int
i
;
setlocale
(
LC_ALL
,
""
);
if
(
ac
<
2
)
{
fprintf
(
stderr
,
"Usage: %s [filename1.ogg] ... [filenameN.ogg]
\n
"
,
av
[
0
]);
return
(
0
);
...
...
@@ -49,7 +53,12 @@ void print_header_info(vorbis_comment *vc, vorbis_info *vi)
int
i
;
for
(
i
=
0
;
i
<
vc
->
comments
;
i
++
)
{
printf
(
"%s
\n
"
,
vc
->
user_comments
[
i
]);
char
*
decoded_value
;
if
(
utf8_decode
(
vc
->
user_comments
[
i
],
&
decoded_value
)
>=
0
)
printf
(
"%s
\n
"
,
decoded_value
);
else
printf
(
"%s
\n
"
,
vc
->
user_comments
[
i
]);
}
printf
(
"vendor=%s
\n
"
,
vc
->
vendor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment