build error under window 10
skydig opened this issue · 16 comments
\gettext-rs-0.7.0\src/lib.rs:382: undefined reference to `wbindtextdomain'
it's gettext issue?
@skydig 大佬,请问您那rust编译器报错汉化翻译是怎么做到的?
vs code 错误提示(语句错误。或变量错误等)如何汉化?或者从什么地方进行汉化修改呢??可否告知汉化方法?
Hi @skydig !
Yes, that would be an issue with gettext-rs
. Unfortunately, I can't help much as I don't have any Windows box at hand ATM. Did you install the dependencies as listed in this README? See also the installation instructions I provided for media-toc. Note however that these can be out of date as I didn't test them on Windows in a long time.
Alternatively, I could set the gettext
dependency under a feature. Tell me if that would be of any help for you.
@zhifu3158: there is currently no Chinese translation for media-toc
. The problem @skydig encountered was due to the localization dependency gettext-rs
, which needs special libraries and executables to be installed on the compilation and execution machines. It's always tricky to get this done on Windows, and even more tricky to describe an installation set that would keep working in the long run.
Adding a new localization requires being a bit familiar with gettext
and writing a translations file. See this PR from @XTR81 for the Spanish translation. Note however that this was 4 years ago, so the .po file has changed in the meantime. Adding a Chinese translation would require to generate a new .po file first (using this script).
@zhifu3158
我用的中文系统,本人没做什么汉化,如果vs code 错误提示是中文,那应该是vs code做的汉化
@skydig: you should be able to open a wave file thanks to the package mingw-w64-x86_64-gst-plugins-good
. In a mingw-w64
prompt, you can check if the wave decoder is available using the following command:
gst-inspect-1.0 wavpackdec
This should show the documentation for this GStreamer element.
I tried the file you attached but I suspect it is a bit too short. I can display the waveform in media-toc
if I click several times on play. I didn't investigate further, but I think this is due to the fact that the waveform is only rendered when a minimal amount of samples are read. In the file you attached, I think there are not enough samples, but it shouldn't be a problem with a longer file. Tell me if this is a concern for you, I could probably adapt the heuristic a bit to handle this case. However, I guess that if you want to use media-toc
to define a table of contents, you probably also want to use a longer file :)
@fengalin
you said: I tried the file you attached but I suspect it is a bit too short.
no, it is not short, you can listen it by using normal music player, it is a segment of wav which check left/right sound channel.
@skydig: I looked again. After unzipping the file you attached, I get a 229kB file named lr.wav
. Several third party tools I have at hand account for a 1s and 300ms duration and the waveform is almost flat. One of the tools states that it erroneously reaches end of stream.
In media-toc
, I use 5s queues so that the audio waveform can be displayed even when the application is paused, so the file must be longer than 5s for the waveform to display initially.
@zhifu3158 我用的中文系统,本人没做什么汉化,如果vs code错误提示是中文,那应该是vs code做的汉化
好的 谢谢,我再研究下~~~
@fengalin
could you download this music player and try again?
https://y.qq.com/download/index.html
I see the duration is 24s
Can you try downloading the file from the link you provided in this comment and check again. I believe it is truncated somehow. Like I said: once I unzipped the file from this link, I get a 229,538 B wave file. Assuming wave codec, not counting the format's overhead, 44,100 samples / s, 2 channels and 2 bytes per samples this is at most 229,538 / 44,100 / 2 / 2 => 1s and 301ms. That's all I can get from this link.
media-toc
works OK with wave files provided they can be processed by a regular GStreamer installation. Did you try the command I suggested in this comment?
@fengalin
you are right, I attached wrong file.
I attached again, currently, it's OK.
very thanks
lr.zip
I attached the command output
gst-inspect-1.0 wavpackdec
Factory Details:
Rank primary (256)
Long-name Wavpack audio decoder
Klass Codec/Decoder/Audio
Description Decodes Wavpack audio data
Author Arwed v. Merkatz v.merkatz@gmx.net, Sebastian Dr?ge slomo@circular-chaos.org
Plugin Details:
Name wavpack
Description Wavpack lossless/lossy audio format handling
Filename C:\msys64\mingw64\lib\gstreamer-1.0\libgstwavpack.dll
Version 1.18.5
License LGPL
Source module gst-plugins-good
Source release date 2021-09-08
Binary package GStreamer Good Plug-ins source release
Origin URL https://www.msys2.org
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstAudioDecoder
+----GstWavpackDec
Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
audio/x-wavpack
depth: [ 1, 32 ]
channels: [ 1, 8 ]
rate: [ 6000, 192000 ]
framed: true
SRC template: 'src'
Availability: Always
Capabilities:
audio/x-raw
format: S8
layout: interleaved
channels: [ 1, 8 ]
rate: [ 6000, 192000 ]
audio/x-raw
format: S16LE
layout: interleaved
channels: [ 1, 8 ]
rate: [ 6000, 192000 ]
audio/x-raw
format: S32LE
layout: interleaved
channels: [ 1, 8 ]
rate: [ 6000, 192000 ]
audio/x-raw
format: F32LE
layout: interleaved
channels: [ 1, 8 ]
rate: [ 6000, 192000 ]
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
SINK: 'sink'
Pad Template: 'sink'
SRC: 'src'
Pad Template: 'src'
Element Properties:
max-errors : Max consecutive decoder errors before returning flow error
flags: readable, writable
Integer. Range: -1 - 2147483647 Default: 10
min-latency : Aggregate output data to a minimum of latency time (ns)
flags: readable, writable
Integer64. Range: 0 - 9223372036854775807 Default: 0
name : The name of the object
flags: readable, writable, 0x2000
String. Default: "wavpackdec0"
parent : The parent of the object
flags: readable, writable, 0x2000
Object of type "GstObject"
plc : Perform packet loss concealment (if supported)
flags: readable, writable
Boolean. Default: false
tolerance : Perfect ts while timestamp jitter/imperfection within tolerance (ns)
flags: readable, writable
Integer64. Range: 0 - 9223372036854775807 Default: 0
Thanks! With your last link, I could unzip the full length file and it opened properly in media-toc
. I noticed a regression though: the waveform is not properly refreshed when the window is resized. I created an issue and will look into it later. But the application is still usable on my machine.
The good news from the gst-inspect-1.0 wavpackdec
output is that you use a fairly recent version of GStreamer. I was wrong with the element name, it's wavparse
that should be used, not wavpackdec
, but since they are both part of gst-plugins-good
, that shouldn't make any difference.
What are the symptoms of the problem you observe in media-toc
? If you still see problems, can you post the output from:
RUST_LOG=INFO GST_DEBUG=*:WARN cargo r -- __PATH_TO_THE_FILE__\\lr.wav
(running in a mingw-w64
prompt under the media-toc
source root folder)