Coder Social home page Coder Social logo

Comments (16)

JPGygax68 avatar JPGygax68 commented on September 18, 2024

I'm linking the statically built FFMPEG libraries into my DLL, but I cannot seem to resolve this issue using /force:unresolved as mentioned in the readme. I'm still getting a very (>2k) number of unresolveds, starting with _ff_async_protocol.

Curiously, that symbol (it's a static structure instance) is defined in a file named async.c, which is present in the sources but not included in the list of Source Files of the libavformat project.

What am I missing?

EDIT: I tried adding async.c, unfortunately that file is including pthread.h, introducing another dependency... which unfortunately is not part of your fantastic collection of customized libraries.

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

async.c not being included is standard behaviour as it doesnt build natively with msvc so nothing to worry about there.

The main thing is that /force:unresolved doesnt stop the linker from spewing out heaps of errors and stating that the link failed. It should however still allow the linker to output a completed binary. So providing that the linker option is added correctly you should still actually get a working output DLL and all the errors listed by the linker can be entirely ignored.

So you should be able to do a manual build, ignore the link error output but then debug the DLL as normal (as long as nothing tries to rebuild the DLL on debug execution).

This is not the cleanest solution but FFmpeg was not written with msvc debugging in mind and the upstream code is not going to be completely rewritten to fix this any time soon.

from ffmpeg.

JPGygax68 avatar JPGygax68 commented on September 18, 2024

You are right! The DLL is being generated.

Visual Studio is evidently unaware of this, as it is trying to rebuild and asking me whether I want to "run the last successful build" - but it appears to work nonetheless.

Ouf of curiosity, what functionality is getting lost because of the missing async.c ?

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

It just does url streaming by wrapping it in an async background thread.

There have been several components in FFmpeg that ive converted to run on windows natively. There are a couple more ive missed (async and decklink being the only remaining ones) but unless there actually used by someone I dont normally here about them.

from ffmpeg.

JPGygax68 avatar JPGygax68 commented on September 18, 2024

Thanks!

I've resolved my original issue thanks to your libraries.

(Of course I've run into a new one - hopefully I won't have to bother
you about that... :-) )

It just does url streaming by wrapping it in an async background thread.

There have been several components in FFmpeg that ive converted to run
on windows natively. There are a couple more ive missed (async and
decklink being the only remaining ones) but unless there actually used
by someone I dont normally here about them.


Reply to this email directly or view it on GitHub
#2 (comment).

from ffmpeg.

JPGygax68 avatar JPGygax68 commented on September 18, 2024

One other thing. I'm using your project for paid work, so I'd like to make a small donation. Would you consider subscribing to Pledgie ? (see https://github.com/blog/57-getting-paid-the-open-source-way)

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

Certainly, any donation would be much appreciated.
I have started a pledgie campaign here "http://pledgie.com/campaigns/30265" and ill soon update the project pages with proper links.
Click here to lend your support to: Shift Media Project and make a donation at pledgie.com !

PS. I have also fixed async and decklink so they work without needing pthreads which should be available once I push them to upstream.

from ffmpeg.

JPGygax68 avatar JPGygax68 commented on September 18, 2024

Donation made!

And thanks for your continued work.

Certainly, any donation would be much appreciated.
I have started a pledgie campaign here
"http://pledgie.com/campaigns/30265" and ill soon update the project
pages with proper links.
Click here to lend your support to: Shift Media Project and make a
donation at pledgie.com ! https://pledgie.com/campaigns/30265

PS. I have also fixed async and decklink so they work without needing
pthreads which should be available once I push them to upstream.


Reply to this email directly or view it on GitHub
#2 (comment).

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

thank you in return.

from ffmpeg.

xuws20 avatar xuws20 commented on September 18, 2024

when run bat file,
Error: Failed calling temp.bat. Ensure you have Visual Studio or the Microsoft compiler installed and that any required dependencies are available.

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

That is a completely different issue to this one.
That error is for the project generator which is not included in this repo at all. If you are trying to run one of the project_generate scripts contained in this repo then youll find you probably dont actually need to as the projects have already been generated.
If you are trying to generate new projects using the generator with different configuration then that error belongs in a new ticket in the FFVS-Project-Generator repo.
However before that just check the output log the project_generator.exe creates in its bin folder as that will have the exact error. As for fixing it, make sure you have performed the appropriate required steps that are outlined in the readme.txt file.

from ffmpeg.

xuws20 avatar xuws20 commented on September 18, 2024

1> These errors are the result of dead code elimination not being performed in debug builds.
1>libavdeviced.lib(SDL_error.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1> Creating library D:\tmp\ffmpeg\ffmpeg\ffmpeg_vs2013\ffmpeg\SMP......\msvc\ffmpeg.lib and object D:\tmp\ffmpeg\ffmpeg\ffmpeg_vs2013\ffmpeg\SMP......\msvc\ffmpeg.exp
1>cmdutils.obj : error LNK2019: unresolved external symbol _avresample_version referenced in function _print_all_libs_info
1>cmdutils.obj : error LNK2019: unresolved external symbol _avresample_configuration referenced in function _print_all_libs_info
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_alsa_muxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_alsa_demuxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_avfoundation_demuxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_bktr_demuxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_caca_muxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_decklink_muxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_decklink_demuxer
1>libavdeviced.lib(alldevices.obj) : error LNK2001: unresolved external symbol _ff_dv1394_demuxer

from ffmpeg.

xuws20 avatar xuws20 commented on September 18, 2024

thanks,in dubug mode, set Undefined Symbol Only (/FORCE:UNRESOLVED) ffmpeg.exe is output.but run ffmpeg -h, program crash.

from ffmpeg.

Sibras avatar Sibras commented on September 18, 2024

Im unable to reproduce this problem as a fresh build on ffmpeg in debug worked perfectly fine for me. You ll have to provide additional information in order to reproduce.

from ffmpeg.

xuws20 avatar xuws20 commented on September 18, 2024

1 in compile,remove files about cuda,opencl。
2 the image of crash is :
//ffmpeg_vs2013\ffmpeg\libavcodec\utils.c
av_cold void avcodec_register(AVCodec _codec)
{
AVCodec *_p;
avcodec_init();
p = last_avcodec;
codec->next = NULL;//crash position

while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, codec))
    p = &(*p)->next;
last_avcodec = &codec->next;

if (codec->init_static_data)
    codec->init_static_data(codec);

}

from ffmpeg.

xuws20 avatar xuws20 commented on September 18, 2024

thanks.delete option about nv opengl,generate,rebuild。ffmpeg.exe can run sucessfully.

from ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.