Hi Robert,

The osgdb_ffmpeg plugin may not work with latest ffmpeg windows sdk and
will say "The procedure entry point xxx could not be located in xxx.dll"
instead. The following link describes the reason (maybe a certain
optimization problem of the VS compiler):
http://forum.videolan.org/viewtopic.php?f=32&t=98097

After adding the /OPT:NOREF, the problem has gone.

Cheers,

Wang Rui
INCLUDE_DIRECTORIES( ${FFMPEG_INCLUDE_DIRS} )
LINK_DIRECTORIES(${FFMPEG_LIBRARY_DIRS})
SET(TARGET_EXTERNAL_LIBRARIES ${FFMPEG_LIBRARIES} )


IF(FFMPEG_LIBSWSCALE_FOUND)

    INCLUDE_DIRECTORIES( ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS} 
${FFMPEG_LIBSWSCALE_INCLUDE_DIRS}/libswscale )

    ADD_DEFINITIONS(-DUSE_SWSCALE)

    SET(TARGET_EXTERNAL_LIBRARIES ${FFMPEG_LIBRARIES} 
${FFMPEG_LIBSWSCALE_LIBRARIES})

ENDIF()

ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)

# MESSAGE("FFMPEG_LIBAVFORMAT_INCLUDE_DIRS = "  
${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} )
# MESSAGE("FFMPEG_LIBAVDEVICE_INCLUDE_DIRS = "  
${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} )
# MESSAGE("FFMPEG_LIBAVCODEC_INCLUDE_DIRS = "  
${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} )
# MESSAGE("FFMPEG_LIBAVUTIL_INCLUDE_DIRS = "  ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} )
# MESSAGE("FFMPEG_LIBRARIES = "  ${FFMPEG_LIBRARIES} )

SET(TARGET_SRC 
    FFmpegClocks.cpp
    FFmpegDecoderAudio.cpp
    FFmpegDecoder.cpp
    FFmpegDecoderVideo.cpp
    FFmpegImageStream.cpp
    FFmpegAudioStream.cpp
    FFmpegParameters.cpp
    ReaderWriterFFmpeg.cpp
)

SET(TARGET_H
    BoundedMessageQueue.hpp
    FFmpegClocks.hpp
    FFmpegDecoderAudio.hpp
    FFmpegDecoder.hpp
    FFmpegDecoderVideo.hpp
    FFmpegHeaders.hpp
    FFmpegPacket.hpp
    FFmpegImageStream.hpp
    FFmpegAudioStream.hpp
    FFmpegParameters.hpp
    MessageQueue.hpp
)

IF(CMAKE_COMPILER_IS_GNUCXX)
    # Remove -pedantic flag as it barfs on ffmoeg headers
   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()

#### end var setup  ###
SETUP_PLUGIN(ffmpeg ffmpeg)

IF(MSVC)
    SET_TARGET_PROPERTIES(${TARGET_DEFAULT_PREFIX}ffmpeg PROPERTIES LINK_FLAGS 
"/OPT:NOREF")
ENDIF(MSVC)
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to