Java Media Framework vs IP Camera JPEG/MJPEG

NOTE:
+ This article is pretty deprecated. I do not say that the info here is false, but I would like to write a new article about this. Please leave me comments with what you want to know, and I will try do add more info to the article. And ofcourse, more sources.
+ A Romanian translation for this article is found here.

I really don”t think I”m either the first or the last to try and obtain images from and ip camera and than use them with JMF. So… after a few days of reading and trying to understand how JMF works, as I already had a JPEG/MJPEG grabber, here is my solutions:

As Chris Adamson explains in his article, Java Media Development with QuickTime for Java, to create a new JMF plugin you need to create two classes, one to extend DataSource and one to extend PushBufferStream or PullBufferStream from JMF. For DataSource I used PushBufferDataSource, which implements the parent class: DataSource.

The most important element is the fact that Datasource must be placed int a package named smth like this: name1.name2.someothername.media.protocol.numeprotocol (i.e. com.sun.media.protocol.http, com.sun.media.protocol.rtp, com.ibm.media.protocol.file).

For the DataSource class I used the example given by SUN in their ScreenGrabber, and I only modified the streaming class name. I won”t reveal the image grabing class, as SUN forum is allready filled with such examples, but I will reveal the streaming class under a surogated protocol I called htmjpeg. I”m sure it won”t take long to you to understant that the protocol is just a simple name, and can be easily changed in my example:

JMF MJPEG Plugin (for Download)

[[wppald_inposts|Donation for JMF Work]]

8 Comments Add yours

  1. clay says:

    Dear sir,
    Could you please show the source of mjpegGrabber also?

    I counld not find mjpegGrabber from the SUN Forum.

    Thank you !

  2. admin says:

    I’m so sorry I didn’t answer sooner. I will email you all you need this evening, and soon I will post a new update of this article, with more details.

  3. dragos says:

    I think I debated about the same thing here:

    http://forums.sun.com/thread.jspa?threadID=5285525

  4. dragos says:

    I’ve decided to rewrite this article, but for now I do not have too much time for it. (I left this problem about an year ago, and I don’t work any more with JMF) If there is anyone interested in helping me it would be great.

    Here are some old hints I wrote on the SUN forum on that time:
    http://forums.sun.com/thread.jspa?messageID=10205866

  5. fang says:

    The 2010 China Security &Protection Expo is the most important meeting for the security sector in China and Asian Pacific, which called “Security China 2010 Expo” on 2-5 November.

    The exhibition area would be above 72,000 ㎡, 3500 spaces totally, more than 1000 exhibitors, and the total trade visitors would be beyond record of 120,000 in Security China 2008.

    For more detailed information, please browse our website: http://www.securitychina.com.cn
    Therefore, Could you kindly confirm whether you have the plan to attend the show in 2010, and we would confirm you the better space location.

    Best regards

    MR. Fang
    Foreign Affairs Committee
    China Security and Protection Industry Association (CSPIA)
    Tel: 86-10-51920118
    Fax: 86-10-51920118
    Email: fang@bizcspia.com securitychina86@gmail.com
    Website: http://www.securitychina.com.cn http://www.bizcspia.com
    MSN: fangxiangdirection@live.cn
    Skype: China-Security

  6. dusan says:

    Can you reupload JMF MJPEG Plugin (for Download) please. It seems it doesn’t functioned.
    Thanks a lot.

  7. dragos says:

    Dusan, in the newer article I wrote about this things (http://dragosc.itmcd.ro/uncategorized/java-media-framework-vs-ip-camera-jpegmjpeg-complete-overview-sources/) you have an SVN account from which you can download the code.

Leave a Reply

Your email address will not be published. Required fields are marked *