You are not logged in.
- Topics: Active | Unanswered
#1 10-28-2013 18:41:24
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
fromStdString and ‘RSC’
Hello,
I am trying to compile ffDiapora under Solaris. I have found two problems so far and one solution.
The first problem is about the method fromStdString which is used in engine/cBaseMediaFile.cpp.
Since this is a problem related to the "correct" configuration of Qt, I think it would be better to
use code that compiles regardless of the configuration. For example, instead of using
if ((QString().fromStdString(CurrentData->key())=="Exif.Image.Orientation")&&(CurrentData->tag()==274))
ImageOrientation=QString().fromStdString(CurrentData->value().toString()).toInt();
one could use
if ((QString().fromAscii(CurrentData->key().c_str(),-1)=="Exif.Image.Orientation")&&(CurrentData->tag()==274))
ImageOrientation=QString().fromAscii(CurrentData->value().toString().c_str(),-1).toInt();
This shows exactly how to replace calls to fromStdString with calls to fromAscii.
Now, the second problem is that when I try to compile this same file I get
error ‘RSC’ is not a member of ‘cVideoFile’
And this is really strange error. BTW, I am using gcc 4.7.2.
Does anybody have any idea what might fix this problem?
Regards,
Apostolos
Offline
#2 10-28-2013 19:18:34
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello
You're the first to ask me for Solaris.
First, I agree to apply the modification you propose for the stdstring.
The RSC error is from an incorrect libav or ffmpeg version.
The first thing to do is to check if you have all dependencies on this system.
The list of dependencies depends on the versions of installed libraries.
You need :
- QT4 or QT5 with Imageformat, svg and help modules
- Libav or ffmpeg
- SDL 1.2 (mainly the sdl_mixer module)
- Exiv 2 (version 0.22 or 0.23)
Actually, ffdiaporama support:
- Libav 0.8.x with taglib 1.8 as a complement (not yet tested with version 1.9)
- ffmpeg 1.2.x
- ffmpeg 2.x.x
Dominique
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#3 10-28-2013 19:33:51
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Thank you very much for your prompt response. I have used a git clone for ffmpeg since the
one I had on my system was rather old. Here is what ffmpeg reports:
$ /opt/gnu/bin/ffmpeg -version
ffmpeg version N-57473-g5b53dd0
built on Oct 27 2013 23:43:06 with gcc 4.7.2 (GCC)
configuration: --prefix=/opt/gnu --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libgsm --enable-libnut --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-bzlib --enable-pic --enable-version3 --enable-gpl --enable-nonfree --enable-shared
libavutil 52. 48.100 / 52. 48.100
libavcodec 55. 38.101 / 55. 38.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 89.100 / 3. 89.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
$ cat RELEASE
2.0
Also, I am using Qt 4.7.3, exiv2-0.23, but I don't have libav installed/ I thought that ffmpeg is enough.
Regards,
A.S.
Offline
#4 10-29-2013 08:08:10
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hi
A very important file to compile ffD is the src/ffdiaporama/ffdiaporama.pro file.
In this file there are a lines indicating where are libraries.
Could you check that your libraries are correctly handled by the paths indicated in this file?
Is swresample.h is in /usr/include/libswresample/ or in /usr/include/ffmpeg/libswresample/ or in /opt/ffmpeg/include/libswresample/ or elsewhere?
Another points:
-In many part of the source files they are tests on plateform. These tests are based on Q_OS_WIN, or Q_OS_LINUX, etc ...
What is the Q_OS_ value that QT return for Solaris?
-uname is used to determine if system is 32bits or 64bits
What "uname -m" return for Solaris?
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#5 10-29-2013 20:54:40
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Hello domledom,
It seems that the following code from src/ffDiaporama/ffDiaporama.pro
unix {
HARDWARE_PLATFORM = $$system(uname -i)
contains( HARDWARE_PLATFORM, x86_64 ) {
DEFINES+=Q_OS_LINUX64
} else {
DEFINES+=Q_OS_LINUX32
}
}
recognizes any non-Windows platform as a Linux platform. Now, uname -m reports i86pc
although I am running a 64bit kernel. Basically the system detects the kind of processor
it is running and provides two sets of binaries: 32bit and 64bit. Users are free to use
whichever set they like.
Also, the following code if from qt4/include/QtCore/qglobal.h:
#elif defined(__sun) || defined(sun)
# define Q_OS_SOLARIS
As far it regards paths, I have added one line in file ffDiaporama.pro that is on the top folder:
INCLUDEPATH += $$DESTDIR
+INCLUDEPATH += /opt/gnu/include
BTW, I had to manually add
#include <libswresample/swresample.h>
in file src/engine/cBaseMediaFile.h In addition, I had to enter the following definitions:
#define u_int64_t uint64_t
#define u_int32_t uint32_t
#define u_int16_t uint16_t
#define u_int8_t uint8_t
#define USELIBSWRESAMPLE
The first four because Solaris uses different names for these types and the fifth in order to force
the use of LIBSWRESAMPLE.
CodecID should be replaced with AVCodecID.
The following line (2170)
int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV,0);
should be replace by
int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV);
In http://ffmpeg.org/pipermail/ffmpeg-cvsl … 53785.html it is noted that
AVCODEC_MAX_AUDIO_FRAME_SIZE has been deprecated and now one should use
the number 192000 instead.
src/engine/_EncodeVideo.cpp
replace RESAMPLE_MAX_CHANNELS with AVRESAMPLE_MAX_CHANNELS
it is now defined in libavresample/avresample.h
With all these changes I am almost there...
Kind regards,
Apostolos
Offline
#6 10-30-2013 13:07:54
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello Apostolos
To start : All this is a lot of changes and it will not be possible to include them in version 1.7 because this version is about to become stable.
That is why I propose you to incorporate your changes in the trunk branch. The 1.7 branch is now defined and the trunk branch is now for the next 1.8 version.
So, from now, get sources from SVN using trunk branch.
If I correctly understood, there is a Q_OS_SOLARIS define. So we can use it to manage specific code for solaris and make change for make file generation
Could you said me what returns uname -i and uname -m?
If I understand well, the ffmpeg headers are in /opt/gnu/include
I modified the .pro and all files using #if/#elif to manage SOLARIS
Could you get the source from the svn now and said me what happens now ?
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#7 10-30-2013 16:09:37
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Hi domledom,
Just a quick response. Some of the changes I suggested are needed because they have been introduced in the latest versions of ffmpeg.
They are not Solaris specific. The answer to your uname questions follows:
apostolo@nadya>> /usr/bin/uname -i
i86pc
apostolo@nadya>> /usr/bin/uname -m
i86pc
Later today, I will get the svn source and I will try to recompile.
Thanks for your help!!!
Best regards,
Apostolos
Offline
#8 10-30-2013 17:17:11
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hi Apostolos
The uname command not give us information needed.
So, I think you will have to modify the .pro file to select which version you want 32 or 64bits by removing the uname test and keeping only the part you want.
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#9 11-05-2013 19:48:37
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Finally I managed to compile ffDiaporama under Solaris and now when it starts I get the following message:
[19:44:27.030:ERROR] SDLFirstInit=Error in SDL_OpenAudio:Fragment size must be a power of two
I have compiled ffDiaporama 1.6 (20130623) as there as some problems with 1.7, which I have to
look. Also, I used SDL2 and SDL1.2 but in both cases I get the same error message. Any ideas
what might be the problem?
Regards,
Apostolos
PS In the following message there is a typo:
[19:45:19.859:INFO] Try to find datas in /extra/sources/var/ffdiaporama/src/ffDiaporama.xml 0
please use data (plural of datum) and not datas.
Offline
#10 11-06-2013 07:28:30
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello
It is good news that you succeed in compiling the application.
Have you used the sources from the SVN trunk branch?
If so, you're in version 2 (for many reasons I mentioned in my last post, I have abandoned the 1.7 version).
As you make changes in the code, in addition to the directives that I added to Solaris?
For the SDL problem, there is an option to use the old SDL mode (in the option box). Have you tested in two modes?
PS: You're right, I'll remove the "s" of all data word
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#11 11-07-2013 19:16:10
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Hello Dominique,
Yesterday I tried the SVN trunk branch. The system compiled after applying some slight modification to files
_SDL_Support.cpp, cBaseMediaFile.h, and cSoundBlockList.h In particular, I had to enter the following code:
#ifdef __sun
#define u_int64_t uint64_t
#define u_int32_t uint32_t
#define u_int16_t uint16_t
#define u_int8_t uint8_t
#endif
The reason is that all u_intXX_t types are defined in Solaris with different names. Now, when I start the
binary I get this
SDLFirstInit=Error in SDL_OpenAudio:Fragment size must be a power of two
error message. The problem is in function SDLSetFPS defined in file _SDL_Support.cpp:
Desired.samples =MixedMusic.SoundPacketSize/MixedMusic.Channels; // In samples unit * chanels number for Linux
For some reason, this raises this "exception". BTW, when I assign some arbritary value
Desired.samples =4096;
then the program starts just fine and I can work with it. Can you suggest a solution?
Best regards,
Apostolos
PS The needs extensive documentation as for example, I have no idea how to make a moving zooming text.
But of course, this is an entirely different thing and I guess the community can help to make it.
Offline
#12 11-08-2013 17:54:07
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello
I've updated the SVN trunk branch with some improvements.
I added your #ifdef in the main global define .h file. I've changed the __sun with Q_OS_SOLARIS to stay homogeneous.
For your SDL error, did you test the 2 values for SDL Old mode in option dialog ?
Could you test this?
Could you give me instructions to compile for SOLARIS so I could add them to the readme.txt file?
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#13 11-08-2013 21:03:29
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
I have used the following command to "configure" the system:
/opt/gnu/qt4/bin/qmake PREFIX=/opt/gnu -o Makefile ffDiaporama.pro
If compilation fails because some MP3FILE symbol is not defined, add the following
includes in file src/engine/_GlobalDefines.h
#include <taglib/mpegheader.h>
#include <taglib/mpegfile.h>
#include <taglib/urllinkframe.h>
#include <taglib/id3v2tag.h>
#include <taglib/vorbisfile.h>
#include <taglib/vorbisproperties.h>
#include <taglib/oggpageheader.h>
#include <taglib/oggfile.h>
#include <taglib/attachedpictureframe.h>
#include <taglib/fileref.h>
Compiling Qt 4.8.5
I have installed Qt 4.8.5 in /opt/gnu/qt4. In order to compile Qt 4.8.5 I have
used gcc 4.7.2. There are two things one must take care in order to successfully
compile Qt. First, one should change all occurrences of
__attribute__ ((visibility("hidden")))
with
__attribute__ ((visibility("default")))
Also, one has to delete all instances of /usr/sfw/lib in file
mkspecs/solaris-g++/qmake.conf.
Compiling ffmpeg
I have used the following line to configure ffmpeg:
CFLAGS="-I/opt/gnu/include" LDFLAGS="-L/opt/gnu/lib -R/opt/gnu/lib" ./configure \
--prefix=/opt/gnu --enable-libopencore-amrnb --enable-libopencore-amrwb --enable \
-libfaac --enable-libmp3lame --enable-libgsm --enable-libnut --enable-libspeex \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib \
--enable-bzlib --enable-pic --enable-version3 --enable-gpl --enable-nonfree \
--enable-shared --enable-avresample
Of course, one can omit certain options (e.g., --enable-libopencore-amrwb) if some
libraries have not been installed in a system. When compilation and installation
finishes, make sure to delimit the headers libavresample/avresample.h and
libswresample/swresample.h with the blocks
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
Otherwise, linking of ffDiaporama will fail.
Now as far it regards the SDL error, as I said the system fails to start so I cannot change anything.
Of course, I can modify the source code...
BTW, I have tried to create video but it seems that the system has problem with the background sound.
The preview plays no sound at all and when I create a video, the sound clip is not include in the final video.
Best regards,
Apostolos
Offline
#14 11-09-2013 06:39:13
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello Apostolos
Thank you for this information.
Regarding Taglib and ffmpeg:
Normally, if you use ffmpeg, you do not need taglib, so I think you can remove your lines in file src/engine/_GlobalDefines.h. But what version of ffmpeg you used?
Regarding SDL problem:
Could you test this?
Modify _SDL_support.cpp by
-Replacing line 112:
Desired.samples =MixedMusic.SoundPacketSize/MixedMusic.Channels;
with:
Desired.samples =MixedMusic.SoundPacketSize/(MixedMusic.Channels*MixedMusic.SampleBytes);
-Removing line 116: if (!SDLAncMode) Desired.samples/=MixedMusic.SampleBytes;
Latest question: Have you tried using QT 5?
Dominique
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#15 11-09-2013 20:14:07
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
As far it regards ffmpeg, I am using a git version:
$ ffmpeg -version
ffmpeg version N-57473-g5b53dd0
built on Nov 4 2013 18:17:21 with gcc 4.7.2 (GCC)
configuration: --prefix=/opt/gnu --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libgsm --enable-libnut --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-bzlib --enable-pic --enable-version3 --enable-gpl --enable-nonfree --enable-shared --enable-avresample --disable-asm
libavutil 52. 48.100 / 52. 48.100
libavcodec 55. 38.101 / 55. 38.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 89.100 / 3. 89.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Nope the patch does not work. I am getting the same error message.
But I did a test and I changed the command that actually stops the
program
// ToLog(LOGMSG_CRITICAL,QString("SDLFirstInit=Error in SDL_OpenAudio:%1").arg(SDL_GetError()));
ToLog(LOGMSG_CRITICAL,QString("Stupid error: %1").arg(Desired.samples));
and now I am getting
[20:05:24.257:ERROR] Stupid error: 882
but I don't know if this helps.
And no I have not tried Qt5 yet. BUt maybe I will give it a try this week.
Regards,
Apostolos
Offline
#16 11-10-2013 06:44:35
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hi Apostolos
You are using a ffmpeg 2.1.x version. So, I confirm you that you don't need taglib
May be you should consider to use the last stable version. I experimented a lot of problems with this 2.1.x version ... that's not really usable a this time.
For the SDL error, I will remove the exit from the source code and replace it with only a warning.
After this message, is the sound works ?
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline
#17 11-10-2013 21:35:25
- asyropoulos
- Nouveau membre
- Registered: 10-28-2013
- Posts: 9
Re: fromStdString and ‘RSC’
Hi!
I have recompiled but now I am getting a core dump. A backtrace showed the following:
Program received signal SIGSEGV, Segmentation fault.
0xfbeb89af in QMutex::lock () from /opt/gnu/qt4/lib/libQtCore.so.4
(gdb) backtrace
#0 0xfbeb89af in QMutex::lock () from /opt/gnu/qt4/lib/libQtCore.so.4
#1 0x08256c22 in ToLog ()
#2 0x082db993 in cLumaList::cLumaList ()
#3 0x0838b5be in _GLOBAL__sub_I_LumaList_Bar ()
#4 0x0838987d in __do_global_ctors_aux ()
#5 0x083898aa in _init ()
#6 0x080ba11e in _start ()
I will try to find the problem but I guess it has something to do with the changes you made yesterday.
Best regards,
Apostolos
Offline
#18 11-11-2013 11:22:23
- domledom
- Administrateur
- Registered: 09-17-2011
- Posts: 1,080
Re: fromStdString and ‘RSC’
Hello
I added a mutex to the logging system.
That's really strange that it make errors on Solaris but you can test removing them in engine/_GlobalDefines.cpp.
In the function ToLog remove the line LogMutex.lock(); at the beginning of the function and the line LogMutex.unlock(); at the end of the function.
Processeur i5 - 8 Go RAM - Manjaro Linux KDE (64 bits) / Windows 7 (64 bits)
Offline