You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(4) |
2004 |
Jan
(26) |
Feb
(18) |
Mar
(12) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(12) |
Aug
(5) |
Sep
(1) |
Oct
(10) |
Nov
(3) |
Dec
(3) |
2005 |
Jan
|
Feb
(6) |
Mar
(7) |
Apr
(10) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(19) |
Oct
(4) |
Nov
(2) |
Dec
(3) |
2006 |
Jan
(19) |
Feb
(32) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(8) |
Jul
(4) |
Aug
(3) |
Sep
(8) |
Oct
(3) |
Nov
(10) |
Dec
(8) |
2007 |
Jan
(3) |
Feb
(10) |
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David S. <da...@si...> - 2004-01-31 04:50:09
|
Thanks, I might want some help with the admin part after next month, when presumably I have "finished" this part of my project and won't be tinkering as much in jffmpeg (but then again, who knows, I might be back in).. By the way, My last updates have at least fixed the H263_RTP sending and receiving such that it works between two jffmpeg codecs. There is still a problem with RFC2190 compliance and as such it doesn't work that great between other codecs. That, and there are still some errors coming from the decoder (but I suspect this is really an encoding problem). I have also added a framerate and bitrate control into the mix. There are still some problems with the encoder (aforementioned rfc2190 compliance, and it occasionally causes the VM to crash, ooops).. but at least you can see a reasonable picture. Stephen Davidson wrote: > Hi Francisco. > > Sorry to hear you are so busy. Hopefully, this means you are earning > some > Overtime or Bonuses. > > David, you have my support if you want it. > |
From: Stephen D. <go...@fr...> - 2004-01-31 04:36:52
|
Hey guys, I just had a thought. Francisco, when you add David as admin, don't take yourself off. It would be nice to have a fallback if one of you two got hit by a truck, (or in David's case, a Sander) or something. There is absolutely no reason why a project can't have multiple admins (and many do). Regards, Steve David Stuart wrote: > I don't mind for the time being.. ;) > > Although after I get something working for my requirements I will > probably slow down. > > But presumably I could hand it back to someone else then. > > [snip] -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2004-01-31 00:46:46
|
Hi Francisco. Sorry to hear you are so busy. Hopefully, this means you are earning some Overtime or Bonuses. David, you have my support if you want it. Regards, Steve Francisco Javier Cabello wrote: > Hello, > As far as you can see I have no time these days to perform daily project > tasks. I would like to give admin status to other active developer. David > seems to be the most active developer. David, would you like to be jffmpeg > project admin? > > Regards, > > paco > -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: David S. <da...@si...> - 2004-01-29 08:39:17
|
I don't mind for the time being.. ;) Although after I get something working for my requirements I will probably slow down. But presumably I could hand it back to someone else then. Francisco Javier Cabello wrote: >Hello, >As far as you can see I have no time these days to perform daily project >tasks. I would like to give admin status to other active developer. David >seems to be the most active developer. David, would you like to be jffmpeg >project admin? > >Regards, > >paco > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Jffmpeg-devel mailing list >Jff...@li... >https://lists.sourceforge.net/lists/listinfo/jffmpeg-devel > > |
From: Francisco J. C. <pa...@ca...> - 2004-01-28 23:46:03
|
Hello, As far as you can see I have no time these days to perform daily project tasks. I would like to give admin status to other active developer. David seems to be the most active developer. David, would you like to be jffmpeg project admin? Regards, paco |
From: Stephen D. <go...@fr...> - 2004-01-28 12:58:14
|
Hi David. I know of one good sized group that tried getting up on the java.net set, but it took a while to due to lack of action on Sun's part. As in, they managed two releases before Sun set up the website. But thanks for mentinoning this, as it caused me to check, and the project is finally up, and I don't think the project managers know. On the other hand, maybe Sun is getting their act together? Regards, Steve David Stuart wrote: > It's working much better for me today. > > I just had the unfortunate luck of trying to do my first major > source-forge checkin while they were tinkering with the developer CVS > servers.. :P > > FYI the java.net developer service is also quite good, if you are ever > looking for an alternative. > -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2004-01-28 12:58:02
|
Hi David. Um, you do know that 0.4.7 is several months old? aAd that while the current version claims to be 0.4.8 (and will eventually be release under that, someday), that ffmpeg CVS HEAD is actually the current stable release, with MANY bug fixes, right? Anyways, I am doing a test/debug/release cycle right now, and the next project is starting in a week or two. That one, one of the first things I will do is bring this up to date (if noone else has done so yet). Regards, Steve David Stuart wrote: > Hi All, > > Just dropping you a note to let you know I've checked in some more changes. > > These are focusing more around the encoding portion, specifically > H263_RTP. Basically it still does not work but it is much further along > than before. > > Unfortunately due to the nature of ffmpeg and RFC2190 (H263 and RTP), I > had to introduce a dependency on a patch for ffmpeg-0.4.7, which means > that for the moment jffmpeg is dependent on 0.4.7, until the patch is > updated for the new version or the changes are rolled into ffmpeg. I > would do it myself but would rather not tinker in the codec for fear of > breaking something. > > See the README.install for directions on installing the patch (including > where to find it). > > I am *this* close to having a function H263_RTP encoder, if anyone has > the time to help me debug the last few problems I would be glad for the > help .. > -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2004-01-27 16:24:48
|
Greetings. These files were posted to the ffmpeg mailing list a while back, and I happened to trip across them when going through my logs. I wonder if we should add them to the JFFMpeg project? Regards, Steve <===Begin Forwarded email===> Subject: [Ffmpeg-devel] jni wrapper for ffmpeg From: Olaf Landsiedel <vi...@ol...> Date: Tue, 21 Oct 2003 19:56:03 -0500 To: ffm...@li... Yes, of course there is Runtime for all java users who want to use ffmpeg. But the ones, who want to encode captured video data on the fly, may have problem to achieve this by using the Java Runtime calls. These people might consider JNI calls way more appropriate, since these calls allow to path function parameters. I have attached a shaped version of some of the files I wrote for my research; feel free to have a look. Sorry, I had to leave the copyright statements in there, but I thing these files should give everybody (who is interested) a very good idea how to use JNI and JMF in combination with avcodec of ffmpeg. VideoFormats: In the code I mention a MPEG-4 and a H263 video format; these are just formats that inherit VideoFormat Before using a codec, it has to be registered with the JMF, use the static method register codec. When used for RTP the payload number also has to be registered, use the static method registerRtpPayloadType with your RTPManager as parameter for this. In your application you should set up a codec chain, I do it like this: You have to ask your JMF processor for the trackcontrols. Assuming you did this and know video height, width, target bitrate and framerate: while ( i < trackControl.length ){ // video setup if (trackControl[i].getFormat() instanceof VideoFormat ) { try { boolean set = false; Dimension videoDim = new Dimension( width, height ); int dataLength = width * height; YUVFormat yuvFormat = new YUVFormat( videoDim, dataLength * 3 / 2, Format.byteArray, 30, YUVFormat.YUV_420, receive.video.width, receive.video.width / 2, 0, dataLength, dataLength * 5 / 4 ); // setup the codecs Mpeg4VideoRtpFormat mpeg4VideoRtpFormat = new Mpeg4VideoRtpFormat( videoDim, dataLength * 3 / 2, Format.byteArray, frameRate ); FfmpegVideoEncoder ffmpegVideoEncoder = new FfmpegVideoEncoder( bitRate, frameRate ); Codec codecs[] = { ffmpegVideoEncoder }; trackControl[i].setCodecChain( codecs ); trackControl[i].setFormat( mpeg4VideoRtpFormat ); set = true; } catch (UnsupportedPlugInException e) { System.out.println("The processor does not support effects." + e.toString() ); } } [look at the jmf examples from sun for more] ..., including i++ } Linux compile works for me like this (please do not forget that you will have different directories and packet names): Here I assume you have avcodec as shared library and that you compiled your java classes. javah -jni -d edu/ku/ittc/ACE/jmfMedia/codec edu.ku.ittc.ACE.jmfMedia.codec.FfmpegVideoEncoder javah -jni -d edu/ku/ittc/ACE/jmfMedia/codec edu.ku.ittc.ACE.jmfMedia.codec.FfmpegVideoDecoder g++ -o libFfmpegVideoEncoderlib.so -shared -Wl,-soname,libFfmpegVideoEncoder.so -I/tools/java/i686/j2sdk1.4.2/include -I/tools/java/i686/j2sdk1.4.2/include/linux -I/home/olaf/ffmpeg-cvs-2003-08-09/libavcodec -L/users/olaf/projects/ace3/lib -lavcodec FfmpegVideoEncoder.cpp -lc g++ -o libFfmpegVideoDecoderlib.so -shared -Wl,-soname,libFfmpegVideoDecoder.so -I/tools/java/i686/j2sdk1.4.2/include -I/tools/java/i686/j2sdk1.4.2/include/linux -I/home/olaf/ffmpeg-cvs-2003-08-09/libavcodec -L/users/olaf/projects/ace3/lib -lavcodec FfmpegVideoDecoder.cpp -lc Now make sure that all libs are in your java classpath, than everything should be alright. Hope that gives an idea. I am always willing to answer more questions. Olaf -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: David S. <da...@si...> - 2004-01-26 23:07:58
|
It's working much better for me today. I just had the unfortunate luck of trying to do my first major source-forge checkin while they were tinkering with the developer CVS servers.. :P FYI the java.net developer service is also quite good, if you are ever looking for an alternative. Stephen Davidson wrote: > Hi Guys. > > It is an SF problem. I am seeing this over in Keel as well. > If it gets to be too much of a nuisance, we can always do > what the FFMPeg folks did, which is move to a new server. -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: David S. <da...@si...> - 2004-01-26 23:06:02
|
Hi All, Just dropping you a note to let you know I've checked in some more changes. These are focusing more around the encoding portion, specifically H263_RTP. Basically it still does not work but it is much further along than before. Unfortunately due to the nature of ffmpeg and RFC2190 (H263 and RTP), I had to introduce a dependency on a patch for ffmpeg-0.4.7, which means that for the moment jffmpeg is dependent on 0.4.7, until the patch is updated for the new version or the changes are rolled into ffmpeg. I would do it myself but would rather not tinker in the codec for fear of breaking something. See the README.install for directions on installing the patch (including where to find it). I am *this* close to having a function H263_RTP encoder, if anyone has the time to help me debug the last few problems I would be glad for the help .. -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: Stephen D. <go...@fr...> - 2004-01-26 22:53:29
|
Hi Guys. It is an SF problem. I am seeing this over in Keel as well. If it gets to be too much of a nuisance, we can always do what the FFMPeg folks did, which is move to a new server. Regards, Steve Francisco Javier Cabello Torres wrote: > I think it's a sourceforge problem. I have the same problem :( > > On Thursday 22 January 2004 15:13, David Stuart wrote: > >>Hi Guys, >> >>I'm trying to check some things in but I keep getting the following >>problems: >> >>[dave@dave cpp]$ cvs status jffmpeg.c >>ssh: connect to address 66.35.250.207 port 22: Connection refused >>cvs [status aborted]: end of file from server (consult above messages if >>any) >> >>And yes, I have the CVS_RSH environment variable set to ssh >> >>Any ideas? > > -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: David S. <da...@si...> - 2004-01-22 21:46:18
|
Well, once again I have checked in my changes. I have tested it by making sure I could check them out again (but that worked last time as well for me).. So if anyone out there wants to give it a try, please let me know if there are further problems. As of this check-in, some new things are enabled: - You can now encode (at least, in H263 format). For some reason the quality of the encoded picture is poor. I know it's not ffmpeg's fault but I can't figure out why (yet). If anyone has any ideas, I'd be happy to hear them. - Decoding of H263_RTP should now be working (but not yet encoding of this) Next I am trying to work on the encoding of H263_RTP, although this is proving to be trickier than I first anticipated. After the full circle of H263 and H263_RTP is done then I might look into H264. David Stuart wrote: > I don't know what's going on anymore.. -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: David S. <da...@si...> - 2004-01-22 21:15:13
|
I don't know what's going on anymore.. The CVS system on sourceforge is all screwed up, it's as if it's forgotten my previous check-ins.. also even stranger, the anonymous CVS seems to be OK with my previous check-ins. I will try to re-do my previous check-ins, but given my luck with sourceforge so far, I'm not terribly hopeful. It seems I have to retry the same commands multiple times before they succeed. Perhaps it's my location (in Ottawa) it seems that the connection to their server is tenuous at best. I've never had so much trouble dealing with a cvs server before.. :( -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: Francisco J. C. T. <fjc...@vi...> - 2004-01-22 17:49:38
|
I think it's a sourceforge problem. I have the same problem :( On Thursday 22 January 2004 15:13, David Stuart wrote: > Hi Guys, > > I'm trying to check some things in but I keep getting the following > problems: > > [dave@dave cpp]$ cvs status jffmpeg.c > ssh: connect to address 66.35.250.207 port 22: Connection refused > cvs [status aborted]: end of file from server (consult above messages if > any) > > And yes, I have the CVS_RSH environment variable set to ssh > > Any ideas? -- Stop software patents! examples: http://www.base.com/software-patents/examples.html stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en 18:48:55 up 1 day, 47 min, 2 users, load average: 0.00, 0.10, 0.08 |
From: David S. <da...@si...> - 2004-01-22 14:17:57
|
Hi Guys, I'm trying to check some things in but I keep getting the following problems: [dave@dave cpp]$ cvs status jffmpeg.c ssh: connect to address 66.35.250.207 port 22: Connection refused cvs [status aborted]: end of file from server (consult above messages if any) And yes, I have the CVS_RSH environment variable set to ssh Any ideas? -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: David S. <da...@si...> - 2004-01-19 19:58:00
|
Hi Steve, Stephen Davidson wrote: > Hi David. > > Your commits of the java files definately did NOT make it. I just I have noticed that my changes are not (as of yet anyway) on the anonymous CVS. I presume you're using developer CVS? Also was this before or after we chatted on the phone? ;) > checked the SF CVS Webpages, and the last changes checked in on > the java files were mine from a month ago. Can you try to confirm > or resubmit your java changes? I just did a checkout in a separate directory on my machine from the developer branch and all the files seem to be there OK. > Also, why did you change the extension of jffmpeg.cpp to jffmpeg.c? Chiefly because the implementation was changed from c++ to c of this file. "gcc" will only treat files as "C" instead of C++ if the extension is ".c". This change was strictly not necessary but I think more people are familiar with the C JNI bindings. > It does make it difficult to compare changes that way. Yes, I sympathize. From here on in I probably won't have to move/rename any files. -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: Stephen D. <go...@fr...> - 2004-01-19 19:52:31
|
David Stuart wrote: > Hi All, > > I've just checked in my changes for the decoding portion of jffmpeg. > > Changes: > ======== > > - Decoding H263 files (and probably MPEG) now works. Previously there > were some buffer size errors and memory initializations which caused > core dumps in JNI. > - Fixed some errors which caused the codecs to be opened multiple times > - Code cleanup, removed some "dead" code and re-packaged the java > classes under net/sourceforget/jffmpeg. Hope everyone is OK with the > package name. > - Moved jffmpeg.java to NativeDecoder.java under this package. The > thought being that we will have a second file for the NativeEncoder > portion, which will be coming. > - I removed support for versions before 0.4.8 of ffmpeg. If this is a > problem we can put it back, let me know. > > I guess that's about it. Give it a try with your programs to see if > there are any problems I introduced. Hopefully I fixed more than I > contributed. ;) > > Nevermind the SF issues, just my CVS viewer (Eclipse) being wacky today.... Got the updates, but curious about the cpp -> c change. As for package naming, I wonder if it would be better to name the package org.jffmpeg? or org.ffmpeg.jffmpeg? Nothing written in stone about having to be a three part package name.... Regards, Steve -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2004-01-19 19:46:39
|
David Stuart wrote: > Hi All, > > I've just checked in my changes for the decoding portion of jffmpeg. > > Changes: > ======== > > - Decoding H263 files (and probably MPEG) now works. Previously there > were some buffer size errors and memory initializations which caused > core dumps in JNI. > - Fixed some errors which caused the codecs to be opened multiple times > - Code cleanup, removed some "dead" code and re-packaged the java > classes under net/sourceforget/jffmpeg. Hope everyone is OK with the > package name. > - Moved jffmpeg.java to NativeDecoder.java under this package. The > thought being that we will have a second file for the NativeEncoder > portion, which will be coming. > - I removed support for versions before 0.4.8 of ffmpeg. If this is a > problem we can put it back, let me know. > > I guess that's about it. Give it a try with your programs to see if > there are any problems I introduced. Hopefully I fixed more than I > contributed. ;) > > Hi David. Your commits of the java files definately did NOT make it. I just checked the SF CVS Webpages, and the last changes checked in on the java files were mine from a month ago. Can you try to confirm or resubmit your java changes? Also, why did you change the extension of jffmpeg.cpp to jffmpeg.c? It does make it difficult to compare changes that way. Thanks & Regards, Steve -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: David S. <da...@si...> - 2004-01-19 19:18:40
|
Hi All, I've just checked in my changes for the decoding portion of jffmpeg. Changes: ======== - Decoding H263 files (and probably MPEG) now works. Previously there were some buffer size errors and memory initializations which caused core dumps in JNI. - Fixed some errors which caused the codecs to be opened multiple times - Code cleanup, removed some "dead" code and re-packaged the java classes under net/sourceforget/jffmpeg. Hope everyone is OK with the package name. - Moved jffmpeg.java to NativeDecoder.java under this package. The thought being that we will have a second file for the NativeEncoder portion, which will be coming. - I removed support for versions before 0.4.8 of ffmpeg. If this is a problem we can put it back, let me know. I guess that's about it. Give it a try with your programs to see if there are any problems I introduced. Hopefully I fixed more than I contributed. ;) -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: David S. <da...@si...> - 2004-01-18 22:39:14
|
By the way Steve (et al), MPEG-4 (or H264) decoding and encoding are in my plans, as is encoding for H263. I presume that MPEG-2 will come along "free for the ride", but we will see. Also ideally I would like to have ffmpeg do the YUV to RGB conversion (optionally) such that JMF will "skip" a conversion step and thus probably be just a little bit faster yet again. I will be happy to test these formats, but can anyone point me to a web page (or the like) that contains sample files of all these formats so that I can test them? Also I am hoping to have RTP streaming support for each (for instance, H263 and H263_RTP). Stephen Davidson wrote: > If you would be willing to run checks to make sure that your > changes let MPEG-2 and/or MPEG-4 code actually work, I would > like to see you added as a developer to jffmpeg. > |
From: David S. <da...@si...> - 2004-01-16 23:32:26
|
Hi Steve, I found it surprising that when I went through the file that it did not seem the YUV buffers were being used anywhere..? Please correct me if I am wrong. Currently I'm having trouble with the "convert" method. It seems the memcpy just causes JNI to go beserk.. :P Stephen Davidson wrote: > Hi David. > > Going through the CPP file, I found an interesting change; > > 1) Lines 105-109: Why did you delete the the YUV buffers? > > If you would be willing to run checks to make sure that your > changes let MPEG-2 and/or MPEG-4 code actually work, I would > like to see you added as a developer to jffmpeg. > > Regards, > Steve -- David Stuart, SIPquest Email: dave (at) sipquest (dot) com Phone: 254-8886 x234 Web: http://www.sipquest.com/ Address: 106 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5 |
From: Stephen D. <go...@fr...> - 2004-01-16 23:16:47
|
Hi David. Going through the CPP file, I found an interesting change; 1) Lines 105-109: Why did you delete the the YUV buffers? If you would be willing to run checks to make sure that your changes let MPEG-2 and/or MPEG-4 code actually work, I would like to see you added as a developer to jffmpeg. Regards, Steve David Stuart wrote: > Hi Steve, > > I finally found the cause of my core dump by rolling up the sleeves and > going into the ffmpeg source. > > Basically the problem was that we do a memset on the AVCodecContext > after calling avcodec_alloc_context(), thereby erasing important things > that the library has set in the context (including some pointers to > functions which are used in the decoding of H263 items, D'OH!!). > > However, I now have another coredump, which I am going to investigate > tomorrow. Will keep you appraised. I think the convert method does not > actually write the data to the buffer in the correct fashion, not sure > about the pointer arithmetic there. > > I have also made some changes which gets around the multiple > opening/closing of codecs at the beginning (I open the codec in the > open() method instead, how novel).. Also there was some "dead code" that > I removed. ;) ;) > > Here's my latest two files, complete with debugging statements all over > the place (sorry about that, will remove them later)... > > > Stephen Davidson wrote: > >> Hi David. >> >> This was a major improvement. The JMF code blew when it tried to >> configure >> the soundcard, as this workstation did not have one. I finally received >> authorization to pull one out of stores and install. >> >> Will be working on this some more tommorrow (Friday). Sound card is >> currently >> being installed, and will be up and running within the next 10 minutes. >> >> Regards, >> Steve > > > > ------------------------------------------------------------------------ > > /* > * Author: Francisco J. Cabello. fjc...@vi... > > * Version control > * =============== > * $Id: jffmpeg.cpp,v 1.1 2003/12/11 19:17:43 northgorky Exp $ > * > * Description > * ============ > * JMF wrapper for FFMPEG > * > * Important: > * ============ > * We do a quick hack after decoding each frame. We know how ffmpeg works, and > * copy frames to own buffers supposing that each luma and chroma planes with > * one memcpy. This is possible only if you modify ffmpeg and set DRAW_EDGE to > * zero in mpegvideo.c. If you don't do that you'll have to do the copy line by > * line. > * > * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > * > * this is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * this is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this program; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > #include <jni.h> > #include "jffmpeg_Jffmpeg.h" > > extern "C" > { > #include <libavcodec/avcodec.h> > }; > > static int FFMPEG_init = 0; > > typedef struct > { > AVCodec *codec; > AVCodecContext *codec_context; > AVFrame *picture; > } FFMPEGWrapper; > > /* > * Class: jffmpeg_Jffmpeg > * Method: init > * Signature: ()V > */ > JNIEXPORT void JNICALL Java_jffmpeg_Jffmpeg_init(JNIEnv *env, jobject Jffmpeg) > { > FFMPEGWrapper *wrapper; > > if(!FFMPEG_init) { > /* must be called before using avcodec lib */ > avcodec_init(); > > /* register all the codecs (you can also register only the codec > you wish to have smaller code */ > avcodec_register_all(); > FFMPEG_init = 1; > } > > // Only perform the following section if the "peer" variable is currently > // set to zero. > jclass clazz = env->GetObjectClass(Jffmpeg); > jfieldID fidPeer = env->GetFieldID(clazz, "peer", "I"); > jint peerVal = env->GetIntField(Jffmpeg, fidPeer); > if (peerVal != 0) > return; > > // Otherwise, initialize the wrapper structure and set the peer > // variable > wrapper = (FFMPEGWrapper *) malloc( sizeof(FFMPEGWrapper) ); > if(!wrapper) > return; > > // Make sure the wrapper is zeroed > memset(wrapper,0,sizeof(FFMPEGWrapper)); > > // set the "peer" variable in the containing java class > env->SetIntField(Jffmpeg, fidPeer, (jint)wrapper); > printf("jffmpeg (native): jffmpeg initialized.\n"); > return; > } > > > /* > * Class: jffmpeg_Jffmpeg > * Method: open_codec > * Signature: (ILjava/lang/String;)Z > */ > JNIEXPORT jboolean JNICALL Java_jffmpeg_Jffmpeg_open_1codec > (JNIEnv *env, jobject Jffmpeg, jint peer, jstring codec_name) > { > FFMPEGWrapper *wrapper; > > if (peer == 0) > return (jboolean) false; > > wrapper = (FFMPEGWrapper *) peer; > > // Find matching ffmpeg codec using the codec_name passed in > const char *str = env->functions->GetStringUTFChars(env, codec_name, 0); > printf("open_codec called for %s\n", str); > > CodecID codec_required; > if ((strcasecmp(str, "h263") == 0) || (strcasecmp(str, "h263/rtp") == 0)) { > codec_required = CODEC_ID_H263; > } else if (strcasecmp(str, "mpeg") == 0) { > codec_required = CODEC_ID_MPEG1VIDEO; > } else { > env->functions->ReleaseStringUTFChars(env, codec_name, str); > return (jboolean) false; > } > env->functions->ReleaseStringUTFChars(env, codec_name, str); > > /* find the video decoder */ > wrapper->codec = avcodec_find_decoder(codec_required); > if (!wrapper->codec ) { > fprintf(stderr, "codec not found\n"); > return (jboolean) false; > } > > // Allocate and zero the codec context and frame. Remember > // them in the wrapper structure. > AVCodecContext *context = avcodec_alloc_context(); > wrapper->codec_context = context; > wrapper->picture = avcodec_alloc_frame(); > > /* for some codecs, such as msmpeg4 and mpeg4, width and height > MUST be initialized there because these info are not available > in the bitstream */ > > /* open it */ > if (avcodec_open(wrapper->codec_context, wrapper->codec) < 0) { > fprintf(stderr, "could not open codec\n"); > return (jboolean) false; > } > > printf("open_codec successful!\n"); > return (jboolean) true; > } > > /* > * Class: jffmpeg_Jffmpeg > * Method: convert > * Signature: (ILjava/lang/Object;JLjava/lang/Object;JJ)Z > */ > JNIEXPORT jboolean JNICALL Java_jffmpeg_Jffmpeg_convert > (JNIEnv *env, jobject Jffmpeg, jint peer, jobject jinBuffer, jlong inBytes, > jobject joutBuffer, jlong outBytes, jlong size) > { > FFMPEGWrapper *wrapper; > int got_picture, len; > unsigned char * inBuf = (unsigned char *) (int) inBytes; > unsigned char * outBuf = (unsigned char *) (int) outBytes; > unsigned char * inbuf_ptr; > AVCodecContext *c; > > if (peer == 0) > return (jboolean) false; > > wrapper = (FFMPEGWrapper *) peer; > > c = wrapper->codec_context; > > if (inBuf == NULL) > inBuf = (unsigned char *) env->GetByteArrayElements((jbyteArray) jinBuffer, 0); > > if (outBuf == NULL) > outBuf = (unsigned char *) env->GetByteArrayElements((jbyteArray) joutBuffer, 0); > > > /* NOTE1: some codecs are stream based (mpegvideo, mpegaudio) > and this is the only method to use them because you cannot > know the compressed data size before analysing it. > > BUT some other codecs (msmpeg4, mpeg4) are inherently frame > based, so you must call them with all the data for one > frame exactly. You must also initialize 'width' and > 'height' before initializing them. */ > > /* NOTE2: some codecs allow the raw parameters (frame size, > sample rate) to be changed at any frame. We handle this, so > you should also take care of it */ > > /* here, we use a stream based decoder (mpeg1video), so we > feed decoder and see if it could decode a frame */ > > > inbuf_ptr = inBuf; > > printf("convert: the value of 'c' is %d\n", c); > printf("convert: the value of 'wrapper' is %d\n", wrapper); > printf("convert: the value of 'wrapper->picture' is %d\n", wrapper->picture); > printf("convert: the value of 'inbuf_ptr' is %d\n", inbuf_ptr); > printf("convert: the value of 'size' is %d\n", size); > > got_picture = 0; > while (size > 0) { > len = avcodec_decode_video(c, wrapper->picture, &got_picture, inbuf_ptr, size); > printf("convert: got here\n"); > fflush(stdout); > if (len < 0) { > fprintf(stderr, "Error while decoding frame \n"); > return (jboolean) false; > } > if (got_picture) { > // Read Y, U, and V from picture data > unsigned char *y_in, *u_in, *v_in; > y_in = wrapper->picture->data[0]; > u_in = wrapper->picture->data[1]; > v_in = wrapper->picture->data[2]; > > // copy image to outBuf > unsigned char *outbuf_ptr = outBuf; > int i,j,w; > > for(j= 0; j<3; j++) { > w = wrapper->picture->linesize[j]; > for(i= 0; i< c->height;i++) { > // copy one line > memcpy(outbuf_ptr, y_in, c->width); > outbuf_ptr += w; > y_in+=w; > } > } > > } > size -= len; > inbuf_ptr += len; > } > > if (outBytes == 0) > env->ReleaseByteArrayElements((jbyteArray) joutBuffer, (jbyte *) outBuf, 0); > > if (inBytes == 0) > env->ReleaseByteArrayElements((jbyteArray) jinBuffer, (jbyte *) inBuf, JNI_ABORT); > > return (jboolean) true; > } > > > /* > * Class: jffmpeg_Jffmpeg > * Method: freeJFFMPEG > * Signature: (I)Z > */ > JNIEXPORT jboolean JNICALL Java_jffmpeg_Jffmpeg_close_1codec > (JNIEnv *env, jobject Jffmpeg, jint peer) > { > FFMPEGWrapper *wrapper; > AVCodecContext *c; > > if (peer == 0) > return (jboolean) false; > > wrapper = (FFMPEGWrapper *) peer; > > c = wrapper->codec_context; > > if (c != NULL) { > avcodec_close(c); > free(c); > } > > free(wrapper->picture); > wrapper->picture = NULL; > > free(wrapper); > > // Make sure the "peer" variable is zeroed in java class > jclass clazz = env->GetObjectClass(Jffmpeg); > jfieldID fidPeer = env->GetFieldID(clazz, "peer", "I"); > env->SetIntField(Jffmpeg, fidPeer, (jint)0); > > printf("jffmpeg: (native) finished freeJFFMPEG\n"); > return (jboolean) true; > } > > > ------------------------------------------------------------------------ > > /* > * Copyright (c) 2002 Francisco Javier Cabello > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Lesser General Public > * License as published by the Free Software Foundation; either > * version 2 of the License, or (at your option) any later version. > * > * This library is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > * Lesser General Public License for more details. > * > * You should have received a copy of the GNU Lesser General Public > * License along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > * > */ > > /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > * > * $Id: Jffmpeg.java,v 1.1 2003/12/11 19:17:43 northgorky Exp $ > * > * Description > * ============ > * Java Wrap for FFMPEG Decoder and VTCodec mixed. > * First, it decompress mpeg stream and gets YUV. In a second step > * converts YUV to RGB. > *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ > > package jffmpeg; > > import javax.media.Buffer; > import javax.media.Format; > import javax.media.ResourceUnavailableException; > import javax.media.format.VideoFormat; > import javax.media.format.YUVFormat; > > import java.awt.Dimension; > > import com.sun.media.BasicCodec; > > /** > * A Codec to convert YUVFormat buffer to RGBFormat buffer. > */ > public class Jffmpeg extends BasicCodec > { > // The name of this plug-in > private final static String PLUGIN_NAME = "JFFMPEG"; > > // Native method prototypes > private native void init(); > private native boolean open_codec(int peer, String codec); > private native boolean close_codec(int peer); > private native boolean convert( int peer, Object inData, long inDataBytes, > Object outData, long outDataBytes, long length); > > // Native structure pointer > private int peer = 0; > > // The default input and output formats > protected Format [] supportedInputFormats = { > //new VideoFormat(VideoFormat.MPEG), > new VideoFormat(VideoFormat.H263), > new VideoFormat(VideoFormat.H263_RTP) > }; > protected Format [] defOutputFormats = { > new YUVFormat() > }; > > // Formats selected by JMF > private VideoFormat inputFormat = null; > private YUVFormat outputFormat = null; > > static { > try { > System.loadLibrary("jffmpeg"); > } > catch (UnsatisfiedLinkError e) { > e.printStackTrace(); > throw new ExceptionInInitializerError(e.getMessage()); > } > } > > protected Format getInputFormat() { > return inputFormat; > } > > protected Format getOutputFormat() { > return outputFormat; > } > > /** > * Return the list of format types that can be accepted as input. > */ > public Format [] getSupportedInputFormats() { > return supportedInputFormats; > } > > /** > * Return the list of formats supported at the output. > */ > public Format [] getSupportedOutputFormats(Format in) { > > // Make sure it's the right kind of format > if (!(in instanceof VideoFormat)) > return defOutputFormats; > > // Test that the format is supported > if (matches(in, supportedInputFormats) == null) > return null; > > VideoFormat videoIn = (VideoFormat) in; > Dimension size = videoIn.getSize(); > int lineStride = 0; > if (size != null) { > lineStride = size.width; > if ((lineStride & 1) != 0) > lineStride ++; > } > > int offsetU = size.width * size.height; > int offsetV = offsetU + (offsetU>>2); > > YUVFormat yuvOut[] = new YUVFormat[1]; > yuvOut[0] = new YUVFormat( size, > lineStride * size.height +1, > Format.byteArray, > videoIn.getFrameRate(), > YUVFormat.YUV_420, > lineStride, //strideY > lineStride >> 1, //strideUV > 0, //offsetY > offsetU, //offsetU > offsetV); //offsetV > return yuvOut; > } > > public Format setInputFormat(Format in) { > > // Make sure it's the right kind of format > if (!(in instanceof VideoFormat)) > return null; > > // Test that the format is supported > if (matches(in, supportedInputFormats) == null) > return null; > > // Set the inputFormat variable. > inputFormat = (VideoFormat) in; > > // Return the selected inputFormat > return inputFormat; > } > > public Format setOutputFormat(Format out) { > > // Make sure it's the right kind of format > if (!(out instanceof YUVFormat)) > return null; > > YUVFormat yuv = (YUVFormat) out; > Dimension outSize = yuv.getSize(); > > if (outSize == null) > return null; > > // TODO : Make other safety checks > > outputFormat = yuv; > return out; > } > > public int process(Buffer inBuffer, Buffer outBuffer) { > boolean result; > > if (isEOM(inBuffer)) { > propagateEOM(outBuffer); > return BUFFER_PROCESSED_OK; > } > > if (inBuffer.isDiscard() ) { > outBuffer.setDiscard(true); > return BUFFER_PROCESSED_OK; > } > > long inDataBytes = 0; > long outDataBytes = 0; > Object inData = null; > Object outData = null; > Format inFormat = inBuffer.getFormat(); > if (inFormat != inputFormat && !(inFormat.equals(inputFormat))) { > setInputFormat(inFormat); > } > > inData = getInputData(inBuffer); > inDataBytes = getNativeData(inData); > > outData = getOutputData(outBuffer); > > if ( outData == null || outBuffer.getFormat() != outputFormat || > !outBuffer.getFormat().equals(outputFormat) ) { > YUVFormat yuv = (YUVFormat) outputFormat; > int strideY = yuv.getStrideY(); > int strideUV = yuv.getStrideUV(); > int dataSize = yuv.getSize().height * strideY + > (yuv.getSize().height/2) * strideUV + 1; > > outBuffer.setLength(dataSize); > outBuffer.setFormat(outputFormat); > } > > outData = validateData(outBuffer, 0, true); > outDataBytes = getNativeData(outData); > > if (inBuffer.getLength() < 10) { > outBuffer.setDiscard(true); > return BUFFER_PROCESSED_OK; > } > > result = convert(peer, inData, inDataBytes, outData, outDataBytes, inBuffer.getLength()); > > if (result) { > Dimension size = outputFormat.getSize(); > int dim = size.width * size.height; > outBuffer.setLength( dim + (dim/4) ); > return BUFFER_PROCESSED_OK; > } > > System.err.println("JFFMPEG: BUFFER_PROCESSED_FAILED"); > return BUFFER_PROCESSED_FAILED; > } > > public synchronized void open() throws ResourceUnavailableException { > > init(); > if (peer == 0) > throw new ResourceUnavailableException("Unable to initialize JFFMPeg"); > > if (inputFormat == null) > throw new ResourceUnavailableException("No input format selected"); > > if (outputFormat == null) > throw new ResourceUnavailableException("No output format selected"); > > if (!open_codec(inputFormat.getEncoding())) > throw new ResourceUnavailableException("Couldn't open codec for " + inputFormat.toString()); > } > > private boolean open_codec(String codec_name) { > return open_codec(peer, codec_name); > } > > public synchronized void close() { > close_codec( peer ); > } > > public synchronized void reset() { > try { > close(); > open(); > } > catch(Exception e) { > e.printStackTrace(); > } > } > > public void finalize() { > close(); > } > > public String getName() { > return PLUGIN_NAME; > } > } -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2004-01-16 18:10:01
|
Greetings. I am trying to use JMStudio in a Real Life situation, but I have been having MANY problems with it. 1) MPEG File extensions vary DEPENDING ON THE HARDWARE Manufacture, and in some cases the encoding software. Specifically, M2P files can carry a video signal. Currently, JMStudio has Hardcoded that as Audio only, with no way to change it. 2) The Sun video player does not accept MPEG-3 Audio input. 3) If I am going to continue proceeding on current project using JMF code, I will have a LARGE amount of code fixes to submit. So for subquestions; a) Where do I submit the enhancements b) Where do I get the REST OF THE JMF Source code???? If you guys EVER want to see JMF deployed in practical industrial grade applications, some attention to these matters will need to be paid. I am willing to help to get this out the door sooner, but I do have deadlines, and can not afford to wait indefinately. Regards, Steve CC'd to JFFMPEG, as they make a JMF compliant wrapper for a multi-platform encoder/decoder/transcoder software package. -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Stephen D. <go...@fr...> - 2003-12-11 19:18:44
|
Greetings. I have just commited some changes, which have resulted in a number of files being moved. The main purpose for these changes were; 1) Allow better integration into Multi-Project builds 2) MinGW can now be used to build on MS Platforms (identical to FFMpeg) 3) Better conformance of Java File output to Java Specifications. (Note that this means that classes were moved from javax package to jffmpeg package!). 4) jffmpeg.h is now generated on the fly during the build process. WARNING - ALL SOURCE FILES HAVE BEEN MOVED OUT OF THE ROOT DIRECTORY. Please make backups of your changes before your next syncronization. Regards, Steve -- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741 |
From: Cory J. <cj...@st...> - 2003-12-02 18:26:42
|
>> SO, Ok, I now have JFFMPeg compiling on Microsoft using MinGw. >> When I try to follow Sun's instructions for installing, I get a = "Class not available" Error. >>=20 >> What am I missing? make sure the jffmpeg jar is in your classpath and when installing = specify the full package/class name, e.g. com.thepackage.jffmpeg (I forget the actual package name but I think is something like = javax.jffmpeg??) ~Cory |