OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

FindFFmpeg - the adventure continues ;-)

Goto page Previous  1, 2
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12206

PostPosted: Mon Mar 23, 2009 3:44 pm    Post subject:
FindFFmpeg - the adventure continues ;-)
Reply with quote

On Mon, Mar 23, 2009 at 3:44 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Thanks David, changes look sensible, I've tested then against ffmpeg installed from Ubuntu repositories and svn/trunk of ffmpeg and both are picked up fine.  Fingers crossed things will continue working fine under other platforms as well.


Forgot to mention, changes now checked into svn/trunk.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Ulrich Hertlein
Guest





PostPosted: Tue Mar 24, 2009 3:03 am    Post subject:
FindFFmpeg - the adventure continues ;-)
Reply with quote

On 24/3/09 2:44 AM, Robert Osfield wrote:
Quote:
Thanks David, changes look sensible, I've tested then against ffmpeg
installed from Ubuntu repositories and svn/trunk of ffmpeg and both
are picked up fine. Fingers crossed things will continue working
fine under other platforms as well.

I got the following type error from gcc 4.0.1 on OS X 10.5.6:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In
member function ‘int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, AVPicture*,
int, int, int)’:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245:
error: invalid conversion from ‘int’ to ‘PixelFormat’
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245:
error: initializing argument 3 of ‘SwsContext* sws_getContext(int, int, PixelFormat,
int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)’

It expects 'src_pix_fmt' and 'dst_pix_fmt' to be of type 'PixelFormat' rather than int.
The attached cast fixes this (for me).

I've also added Matroska video to the list of supported extensions:

Index: ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
===================================================================
--- ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp (revision 9964)
+++ ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp (working copy)
@@ -240,8 +240,8 @@
#ifdef USE_SWSCALE
if (m_swscale_ctx==0)
{
- m_swscale_ctx = sws_getContext(src_width, src_height, src_pix_fmt,
- src_width, src_height, dst_pix_fmt,

+ m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat) src_pix_fmt,
+ src_width, src_height, (PixelFormat) dst_pix_fmt,
/*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL);
}

Index: ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
===================================================================
--- ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp (revision 9964)
+++ ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp (working copy)
@@ -36,7 +36,8 @@
supportsExtension("ogg", "Theora movie format");
supportsExtension("mpg", "Mpeg movie format");
supportsExtension("mpv", "Mpeg movie format");
- supportsExtension("wmv", "");
+ supportsExtension("wmv", "Windows Media Video format");
+ supportsExtension("mkv", "Matroska");

// Register all FFmpeg formats/codecs
av_register_all();

Cheers,
/ulrich



------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12206

PostPosted: Tue Mar 24, 2009 11:08 am    Post subject:
FindFFmpeg - the adventure continues ;-)
Reply with quote

Thanks Ulrich, changes now merged and submitted to svn/trunk.

On Tue, Mar 24, 2009 at 3:02 AM, Ulrich Hertlein < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
On 24/3/09 2:44 AM, Robert Osfield wrote:
Quote:
   Thanks David, changes look sensible, I've tested then against ffmpeg
   installed from Ubuntu repositories and svn/trunk of ffmpeg and both
   are picked up fine.  Fingers crossed things will continue working
   fine under other platforms as well.


I got the following type error from gcc 4.0.1 on OS X 10.5.6:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function ‘int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, AVPicture*, int, int, int)’:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: invalid conversion from ‘int’ to ‘PixelFormat’
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error:   initializing argument 3 of ‘SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)’

It expects 'src_pix_fmt' and 'dst_pix_fmt' to be of type 'PixelFormat' rather than int. The attached cast fixes this (for me).

I've also added Matroska video to the list of supported extensions:

Index: ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
===================================================================
--- ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp     (revision 9964)
+++ ../src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp     (working copy)
@@ -240,8 +240,8 @@
 #ifdef USE_SWSCALE
    if (m_swscale_ctx==0)
    {
-        m_swscale_ctx = sws_getContext(src_width, src_height, src_pix_fmt,
-                                      src_width, src_height, dst_pix_fmt,
+        m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat) src_pix_fmt,
+                                      src_width, src_height, (PixelFormat) dst_pix_fmt,
                                      /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL);
    }

Index: ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
===================================================================
--- ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp     (revision 9964)
+++ ../src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp     (working copy)
@@ -36,7 +36,8 @@
        supportsExtension("ogg", "Theora movie format");
        supportsExtension("mpg", "Mpeg movie format");
        supportsExtension("mpv", "Mpeg movie format");
-        supportsExtension("wmv", "");
+        supportsExtension("wmv", "Windows Media Video format");
+        supportsExtension("mkv", "Matroska");

        // Register all FFmpeg formats/codecs
        av_register_all();

Cheers,
/ulrich

_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Weekend adventure robertosfield General 5 Fri Jun 11, 2010 1:07 pm View latest post
No new posts FindFFMPEG.cmake module to find FFMPE... Skylark Submission 13 Wed Mar 04, 2009 3:36 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP