[mythtv] LastFM support in MythMusic

Willem Ligtenberg wligtenberg at gmail.com
Mon Feb 18 20:54:31 UTC 2008

musicplayer.cpp: In function 'uint8_t* my_md5(QString&)':
musicplayer.cpp:845: error: invalid conversion from 'void*' to 'uint8_t*'
musicplayer.cpp:846: error: invalid conversion from 'const char*' to 'uint8_t*'
musicplayer.cpp:847: error: expected ',' or ';' before 'av_md5_sum'
musicplayer.cpp:846: warning: unused variable 'c_string'
musicplayer.cpp: In member function 'void MusicPlayer::scrobbleLastFM()':
musicplayer.cpp:863: error: invalid conversion from 'uint8_t*' to 'const char*'
musicplayer.cpp:863: error:   initializing argument 1 of
'QString::QString(const char*)'
make[1]: *** [musicplayer.o] Error 1
make[1]: Leaving directory

I get this error when I try the code you wrote...
I don't really get what you mean by define strings in the start of your mail...

Thanks for the help, and sorry that I am such a bad C++ programmer...
But at least I get the opportunity to learn...



On Feb 18, 2008 9:28 PM, Janne Grunau <janne-mythtv at grunau.be> wrote:
> On Monday 18 February 2008 20:34:10 Willem Ligtenberg wrote:
> > OK, I'm stuck on the MD5 stuff, which annoys me, because it shouldn't
> > be this hard...
> > Well as far as I know now, both md5's that are already in mythtv are
> > meant to be used for something else than Strings.
> define strings. libavutil's md5 operates on uint8_t* which are more or
> less c type strings. If you want to compute the md5 of QString use
> something like:
> uint8_t *my_md5(QString &string)
> {
>     uint8_t *md5val = malloc(8);
>     uint8_t *c_string = string.local8Bit()
>     av_md5_sum(md5val, c_string, strlen(c_string));
>     return md5val;
> }
> If you want the typical string result the command line md5sums returns
> print the eight uint8_ts as hexadecimal values.
> Janne
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list