Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th August 2019, 11:02   #21  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Tested ffms2 integration in x264 with the 8.3.1 from the link provided by StvG. ffms2 builds, but unfortunately, the integration in x264 fails.
The pkg-config --libs ffms2 returns the same value than 9.1.0 (or 9.2.0) MSYS2 GCC (see previous post).
Can't test a 8.1.x because these GCC versions begin with 8.3.1.

As far as i know, it doesn't exist mcf thread build option for ffmpeg, ffms2 or x264, only posix or win32threads. What is the closets ? My guess would be Win32threads, but...
__________________
My github.

Last edited by jpsdr; 14th August 2019 at 11:06.
jpsdr is offline   Reply With Quote
Old 15th August 2019, 02:54   #22  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 106
Yes, Win32threads.

About ffms2 issue linking EXE file I'm using this patch (line #1348 + #1349)

About ffms2 integration in x264 this works fine --extra-ldflags="$(PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig pkg-config --libs --static ffms2)". Just tested with 8.3.1 x86 from that gcc-mcf link.
StvG is offline   Reply With Quote
Old 15th August 2019, 21:22   #23  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Quote:
Originally Posted by Wolfberry View Post
and adds -DFFMS_STATIC to Cflags in ffms2.pc
My building script for ffms2 is (setting part of _cf, etc... skipped) :
Code:
PKG_CONFIG_PATH="${_dir}/lib/pkgconfig" \
CFLAGS="${_cf}" \
CXXFLAGS="${_cxx}" \
LDFLAGS="${_ld}" \
../configure --prefix=${_dir} --build="i686-w64-mingw32" --host=${_host} \
--enable-static --disable-shared
make -j1
make install
What should i add in it for the -DFFMS_STATIC be automaticaly include to Cflags in ffms2.pc ?

EDIT :
I think i just can patch ffms2.pc.in... I'll test.

EDIT 2 :
Thanks to StvG and Wolfberry, i've been able to fix the exe error link and the integration, but still needed a little patch for this.
__________________
My github.

Last edited by jpsdr; 15th August 2019 at 21:55.
jpsdr is offline   Reply With Quote
Old 17th August 2019, 00:34   #24  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
@StvG
What do i have to add in the compile (or linker) command line to avoid the message telling me that mcfgthreads-12.dll is missing ?
I build everything in static, but clearly it's not enough...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 17th August 2019, 00:44   #25  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
Did you read https://github.com/lhmouse/mcfgthrea...ribution-notes ?

Quote:
At the moment, mcfgthread can't be linked statically and the file libmcfgthread.a is a copy of libmcfgthread.dll.a. Hence, if you want to distribute a program linked againast mcfgthread, you must always distribute mcfgthread-*.dll with it.
You may try gcc build provided here: http://msystem.waw.pl/x265/
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 17th August 2019, 01:07   #26  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Argh... I just found out, i was about to change my post, but too late. Thanks anyway, i'll test.
__________________
My github.

Last edited by jpsdr; 17th August 2019 at 01:23.
jpsdr is offline   Reply With Quote
Old 17th August 2019, 02:40   #27  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Thanks, these GCC work, but it seems that with win32 thread model GCC, ffms2 needs Komisar's not so trivial patch (at least for me), including putting back numthreads files.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 17th August 2019, 04:00   #28  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 106
You can use this C++11 implementation https://github.com/Cwc-Test/mingw-std-threads instead that Komisar's patch.
Copy all mingw.*.h files to /mingw32/include/c++/**/
** - GCC version
Then from ffms2 root folder:
sed -i 's/#include <mutex>/#include "mingw.mutex.h"/g' src/core/ffms.cpp
sed -i 's/#include <thread>/#include "mingw.thread.h"/g' src/core/videosource.cpp

Last edited by StvG; 17th August 2019 at 10:35.
StvG is offline   Reply With Quote
Old 17th August 2019, 12:25   #29  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Thanks, i'll test, it's seem "cleaner" than Komisar's patch.

EDIT
Thanks, this works fine. I prefer this where there is no need to tweak the ffms2 code, just the headers.
__________________
My github.

Last edited by jpsdr; 17th August 2019 at 13:32.
jpsdr is offline   Reply With Quote
Old 18th August 2019, 12:09   #30  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,758
Thanks to all who have helped me, i have now a working good build process.
__________________
My github.
jpsdr is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.