I am trying to play an audio CD with phonon under Windows. I use Qt 4.8.0.
I run a code like:
QString filepath = QString("E:\\")
myMusic = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(Phonon::Cd, filepath));
myMusic->play();
There are any errors in the log window and any sound either. The disk does not spin in drive too.
So is there an option to play audio CD with phonon? If it is, how can I select proper track?
P.S. MP3 is played without issues
Ok, I think I have solved this issue. Currently I have code like this:
Phonon::MediaObject *myMusic = Phonon::createPlayer(Phonon::MusicCategory,Phonon::MediaSource Phonon::Cd, QString("E:\\")));
Phonon::MediaController myMediaController(myMusic);
myMediaController.setAutoplayTitles(true);
myMediaController.setCurrentTitle(7);
myMusic->play();
"E:\" is my cd-drive with inserted audio cd and I play the track #8 (track count starts from zero).
Other issue on my Windows 7 system was Phonon warning:
unable to load the TOC from the CD
This issue is related to Phonon Windows backend. Some Windows systems do not have CDDA codecs (or what is that thing is) installed. In this case Phonon application will not play Audio CD discs. You won't see any errors (except from above) and there won't be any cd drive activity.
To fix this issue you should:
Dowload proper cddareader.ax for your system (I used one from MPC HomeCinema Standalone Filters on http://sourceforge.net/projects/mpc-hc/files/)
Open command line and execute regsvr32.exe cddareader.ax
Reboot
This code is tested on WinXP x86 and Win7 x64. Linux machine have played audio cd without problems (with different path of cource)
Hope this information will be useful
Related
I've compiled Qt5.15.0 and set up cross-compiler on my host machine (Ubuntu 20.04) and managed to cross-compile a simple Hello World app for my Raspberry Pi 4, however, when I deploy and run it (tried both on Qt Creator and in terminal) I get Could not queue DRM page flip on screen HDMI1 (Invalid argument) I use latest Raspbian image and tried both with lite and full desktop versions.
There are some solutions suggesting to set the environment variables;
QT_QPA_EGLFS_ALWAYS_SET_MODE=1
QT_QPA_EGLFS_KMS_ATOMIC=1
But I had no luck with setting them.
I don't know where the problem is, I'm very new to Qt.
For those who has the same problem here is how I solved;
Somehow I discovered that Raspberry Pi does not set the environment variable QT_QPA_EGLFS_ALWAYS_SET_MODE. You can check that by typing
printenv QT_QPA_EGLFS_ALWAYS_SET_MODE
or
echo $QT_QPA_EGLFS_ALWAYS_SET_MODE
in both cases, you should see 1 as a result if you've set it so.
However I got no response when I typed them.
Then I went and opened .profile and added
QT_QPA_EGLFS_ALWAYS_SET_MODE=1
at the end of the file and rebooted the system. Finally there it was, when I echoed the variable it returned 1, and my programs now work pretty well.
The variables should be set in:
/etc/default/qt
See QTBUG-72539 in the Qt bug tracking.
My problem is little bit strange for me. I wrote a mediaPlayer program.
And I move the executable file to another directory in the same machine. Put the dlls beside the exe. It works fine. It can plays .mp4,.avi etc. But when i move the exe and dlls another machine it doesn't play mp4 files.
I tried compile both MinGW and VS2012 and result is same. Didn't find why.
Is there a advice for me ?
Thanks.
Install a default codec pack onto the end user's machine or convert the mp4 to a codec sponsored by windows.
Codec Pack Recommendation
It is hard to go wrong with K-lite Basic Codec Pack. Just be careful when downloading because the main download site is riddled with ads and false download buttons.
My preferred way to install something like this on my development machine is to use chocolatey. First install chocolatey then in your admin cmd, run:
choco install k-litecodecpackbasic
Video Conversion Tool Recommendation
Handbrake. Occasionally ffmpeg or libav might be better suited, but for most cases go with Handbrake.
If You Can't Install New Codecs...
On the end user's machine (missing admin privileges) or something else, then you probably need to use vlc's library for video playback if you need to support more than the minimum supported out of the box by Windows.
Hope that helps.
I'm trying to get XCode 4 to symbolicate a crash report. I've googled and followed this link (https://github.com/chrispix/symbolicatecrash-fix) but get stopped. The instructions say "To fix your iOS crash report symbolication, move /usr/local/bin/symbolicatecrash aside and copy in the version in this repo." Well, I cannot find "/usr/local/bin/" on my Mac. I'm new to the Mac world, so I'm sure there's something I'm not understanding. If "/usr/local/bin/" doesn't exist, then where is XCode 4 finding symbolicatecrash? Please point a newbie in the right direction as I have a lot of bugs to be fixing.
Thanks
Tom
that tool has been relocated to /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash in newer version of the SDK
you would run it as:
./symbolicatecrash -A -v [crashlog-filename] MyApp.dSYM
keep in mind this is for iOS only, for OSX see http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html (for the app to contain the symbols "DWARF with dSYM" must be enabled in it's build settings)
you would run it as:
./symbolizecrashlog [application-name] [crashlog-filename] > symbolized.crash
I would like to add that all this usually is done automatically, these manual approaches are for cases when there are issues with the system symbols database as discussed in Xcode 4 failure to symbolicate Crash Log
Right now I have Phonon working on windows with a DS backend. However, it will not play certain mp3 files and although it appears to be playing m4a files (the song progress bar keeps moving) no sound comes out. The application is built using PyQt4 on Windows and is aimed at Windows users.
I know that this is not the fault of my program as when I replaced a file with one that did not play normally with one that did, the song played perfectly. I have downloaded phonon vlc, and tried to build it, but I cannot get CMake to create a makefile. Whenever I try, it tells me that the dev-cpp gcc is not able to make a simple test file.
I also tried downloading clementine and amorak to see if I could get that to work, but I have had the same problems there as well. Has anyone run into this sort of problem before?
I've run into the same problem recently. It seems to be that Phonon has a bit of a hissy fit about ID3 tags, particularly compressed ones. I've taken to creating a temporary copy of every mp3 that I open and using mutagen to delete the tags from that copy. I then open the de-tagged temporary file using PyQt/Phonon, and everything works as I expect. BTW, mutagen is awesome.
Phonon does have a bit of a habit of failing reasonably silently. This is what I do: check if your MediaObject is in a Phonon.ErrorState; if so check its errorString(), usually some incomprehensible message. Google this message and try to work from there.
Edit: Hmm, interesting. It's not Phonon having the problem, it's the DirectShow backend not being able to play the file with the compressed ID3 headers. While the "fix" I outline above does work, I found I was still having problems playing other types of files, e.g. .m4a, despite having the right codecs installed.
The solution was to install the K-Lite Codec Pack, and use the Win7DSFilterTweaker tool that comes with it to change the default decoder for the various codec types from "Microsoft" to "ffdshow". You might also need to run the ffdshow audio decoder configuration tool and tick the box marked Show dialog when an unknown application tries to load ffshow in the DirectShow control tab.
My swf is occasionally crashing the browser (or just crashing the plugin as chrome tells me).
How do I diagnose the bug? I am developing for flash player 9 using flex.
Things I have tried:
Turned on log files so I can see trace("...") output. However, my log files, and my swf, are ending at inconsistent termination points.
Install the debug version of the flash player
Tried different browsers (today I am on vista, and can reproduce the bug on four browsers).
I am hoping there is a [legible] stack trace from the plugin. Any suggestions?
It's likely that the flash plugin is causing the crash before your log files can be flushed. The only thing I can recommend is to install the Windows Debugging Tools.
Then bring up a command prompt (as administrator if in vista), and type the following:
cd "%programfiles%\Debugging Tools for Windows"
adplus -crash -pn iexplore.exe
(Obviously, change iexplore.exe to whatever browser you are running against.)
Now, use your flex application in the browser until it crashes. This will create a crash dump in %programfiles%\Debugging Tools for Windows\Crash_Mode__Date_02-18-2009__Time_14-40-0202 (actual date will be used).
You can now send that mini-dump (smallest dmp file) to Adobe so they can analyze it properly.
If you want to view the (native) call stacks in hope of discovering what caused the issue, you can load windbg and load the dump file (File > Open Crash Dump). Once it's loaded type the following at the windbg commandline and hit enter:
~* kb 2000
Some specifics on the bug I uncovered regarding masks and textfields:
http://summitprojectsflashblog.wordpress.com/2008/04/16/flash-browser-crashing-bug/
http://team.bkwld.com/2007/11/21/flash-player-crashes-browser-when-closing-window-possible-fix/