Jmf in mhp

Hi all,
Can any one tell me how can I creat JMF player in MHP without any services I mean STB is not connected to any satellite.Ur help is higly appriciated in this regard.Pls let me know in detail.U can mail me at [email protected]
Ramesh

You can't create a valid JMF player for a DVB service without having a valid locator for it (meaning, one that the implementation can recognise as valid and pointing to some useful content). If you try, Manager.createPlayer() should throw an IOException.
You can create a Player for other media types supported by MHP without having a connection to a transport stream, but I guess this isn't what you want to do, right?

Similar Messages

  • Scaling a video played by JMF in MHP

    Hi
    I'm looking for the approach scaling the area where
    a video plays in MHP.
    This video is played by JMF.
    MHP HAVi defines a class "HVideoDevice",
    and it has a member method "getVideoController()"
    which return a java.lang.Object. It seems that
    the returned video controller should be able to
    scale the video area.
    I also check the javaDoc of JavaTV and I found that
    there is an interface "AWTVideoSizeControl"
    which looks exactly what I need.
    Is this how MHP scales a video area?
    Does JavaTV RI 1.1 implement this interface?
    I'm also wondering that if the implementation returns
    a class which implements AWTVideoSizeControl.
    Any reply is appreciated.

    Hi!
    I can give you a code that uses the AWTVideoSizeControl and scales the video.Here is the code:
    Rectangle source = new Rectangle(0, 0, 720, 576);
    Rectangle destination = new Rectangle(360, 0, 720/2, 576/2);
    resize(new AWTVideoSize(source, destination));
    private void resize(AWTVideoSize size) {
              ServiceContextFactory serviceContextFactory = null;
              javax.tv.service.selection.ServiceContext serviceContext = null;
              try {
                   serviceContextFactory = ServiceContextFactory.getInstance();
                   serviceContext = serviceContextFactory.getServiceContext(context);
              }//end try
              catch (Exception ex) {
                   ex.printStackTrace();
              }//end catch
              if (serviceContext != null) {
                   ServiceContentHandler[] serviceContentHandler = serviceContext.getServiceContentHandlers();
                   Player player = null;
                   if (serviceContentHandler.length > 0) {
                        player = (Player) serviceContentHandler[0];
                   }//end if
                   if (player != null) {
                        AWTVideoSizeControl awtVideoSizeControl = (AWTVideoSizeControl) player.getControl("javax.tv.media.AWTVideoSizeControl");
                        awtVideoSizeControl.setSize(size);
                   }//end if
              }//end if
         }//end methodThen you can start the player and play the scaled video.
    I hope it can help you.
    (I'm sorry for my bad english)
    Bye!!

  • Help (JavaTV vs JMF vs MHP?!)

    hi,
    could someone delineate for me the roles of the different APIs mentioned in the title. From what I have read I infer that MHP is a framework which allows sending Xlets with the TV stream which are then executed on the set top box. What API should you use if you want to have a go at writing an application that resides on the computer/STB and gives the user information about scheduling and allows them to change channels, and which might be extended to employ recording of tv programmes? I am a little confused as to whether JavaTV should be used for this or JMF?
    In addition what is the hardware compatibility like for these technologies - I was looking at trying to write a program to use on my PC and receive digitalTV from an ATI or NVIDIA card. Do these APIs support this hardware?
    Many thanks

    MHP is more than an API - it includes a specification for content formats, for network protocols, for security policy, for a graphics model as well as a number of APIs of which JavaTV and JMF are examples.
    JMF is a generic media player API originally designed for streaming media across intranets or perhaps the internet. MHP and JavaTV use parts of JMF version 1.0 but a lot of it is simply not appropriate in TV.
    JavaTV sounds closest to what you want.
    None of these (yet) support recording apart from JMF version 2.0 which is not included in either JavaTV or MHP and probably never will be.
    There is an implementation of MHP available for free for the PC from www.m hp4free.de but this may not support the hardware platform you want to use and the www site is entirely in German. There is also www.openmhp.org but there's not a lot of documentation on their www site without downloading it.

  • What is the relationship of javatv api,jmf api and mhp api ?

    Whether all these three set of API are required to write digital tv program?

    That depends on what the digital TV program (I assume you mean MHP application) wants to do. Specifically;
    - javax.tv.xlet.Xlet is needed whatever you want to do.
    - Most of the rest of JavaTV is only needed if you want to write an electronic program guide, e.g. to get at service information.
    - If you want to write a program which manipulates the video & audio of the TV signal then you need the JMF API and also a small part of javax.tv.service.selection to get hold of the JMF player for the running TV content.
    - The MHP APIs do many different things, again depending on what your application wants to do.
    - You don't mention them but you also probably need some of the org.havi.ui APIs. In MHP, the top level graphics Container class for applications is an instance of org.havi.ui.HScene. Also the "VK_" constants for some of the remote control codes are only defined in org.havi.ui.HRcEvent.
    See http://www.mhp-interactive.org for examples of how to use many of the MHP APIs.

  • Unable to capture video from webcam in JMF in xlet

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
    Thanks
    Rajesh

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Unable to capture video from webcam in JMF

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Playing a ts-file in an application  (JMF,without Tuning/service selection)

    Hey there!
    I got a ts-File (1.438.1) on HDD and i am trying to play it using a jmf-player in my application. I know that MHP does not support playing video from HDD but the IRT RI (which i use) does..
    For a ts is also just a *.mpg-file i thought my solution would work..
    Anyway, my stream is found but i get a org.davic.net.tuning.NotTunedException.
    Here's a piece of my code:
    public void playVideo() {
    targetVideo = new MediaLocator(dvb://1.438.1);
    player = javax.media.Manager.createPlayer(targetVideo);
    player.addControllerListener(this);
    scalingControl = (org.dvb.media.BackgroundVideoPresentationControl) player.getControl("org.dvb.media.BackgroundVideoPresentationControl");
    player.start();
    transformation = new VideoTransformation();
    transformation.setScalingFactors((float)0.5, (float)0.5);
    transformation.setVideoPosition(new HScreenPoint((float)0.5, (float)0.0));
    transformation = scalingControl.getClosestMatch(transformation);
    result = scalingControl.setVideoTransformation(transformation);
    player.stop();
    player.deallocate();
    catch (Exception e){
    System.out.println("Exception thrown while using the JMF Player:");
    e.printStackTrace();
    I was wondering if there is way to get this run without using the service selection API or Tuning API?
    Hopefully someone has an idea or is able to explain me why this won't work!!!
    Thanks in advance,
    with best regards,
    Alex.

    Hello Steve!
    First of all, thank you for trying to help me out!
    I tried the code i posted above (using BackgroundVideoPresentationControl and a quarter sized video area in the upper right corner).
    The NullPointer is thrown at the following line:
    transformation = scalingControl.getClosestMatch(transformation);
    I also tried other positions and video sizes but nothing worked at all..
    For at least quarter size video should be supported i am not quite sure where the problem is..
    As i said i also tried AWTVideoSizeControl with something like:
    source = new Rect(0,0,320,288);
    dest = new Rect(source.getBounds());
    videoSize = new AWTVideoSize(source,destination);
    When i do something like:
    transformation.setVideoSize(videoSize);
    i get a NullPointer too!
    Do you have any ideas what my problems might be?
    Thanks in advance,
    with best regards,
    Alex.
    P.S.:
    My *.ts-File was captured with a DVB-Card and contains 6 Services (that only contain TV-programs). For i am not able to test it by now (because i don't see any video ;-( ) i have another question (Because i am a little bit confused concerning service selection):
    Is it possible to play the different services of my ts-File (that's on my HDD) with the JMF , or do i 0have to use the service selection API for adressing the different streams (or services)? I guess this is not necessary for i can just set a parameter in the
    line:
    targetVideo = new MediaLocator(dvb://1.438.3);
    that describes the service (3 in that case). Am i right or am i really really confused and a hopeless case??
    Thanks again,
    with very best regards,
    Alex.

  • How to implement MHP on PC?

    I'm doing project that implement MHP on PC. I read the MHP spec for a long time, but i'm really comfused. If i want to implement MHP on PC, what should i do first? what preparations should I do? Can my direct show filters be called by JVM?

    Possibly you could use Directshow from java using Java Native Interface (JNI). But I would rather use Java Media Framework (JMF). If you know directshow is not very difficult to learn; the arquitecture is also based on connected filters.
    You would also need a DVB-T/S/C capture card to access the content. JMF will probably present audio and video correctly; anyway I would check this before buying the card. I'm not sure about next, but probably to access MHP data you would have to use JNI, and things would be easier if you buy a card provided with an SDK.
    Note that if you use JNI, that application will NOT be platform independent.
    You could also build all your application in Directshow, parse MHP data and send it to a Java Program that executes the Xlet..
    In orther to execute the Xlets you could use XletView, which will save you lots of work; but you should have a look at the license.

  • Is licence required for implementing JavaTv and JMF.

    Hi,,
    I am trying to develop GEM middleware for my STB,
    The STB has OS20 as RTOS and implemented on an ST chip
    This GEM is DVB MHP minus DVB.
    We have to implement JavaTV package and JMF for that,
    But do we have to pay any royalty to SUN for implementing the JavaTV or JMF packages or can we implement the binary versions of the packages.
    Please letme know how to implement the following packages
    org.havic.*
    org.davic.*
    javax.tv.*
    org.dvb.*
    and JMF?

    Hi Rohit,
    let me also add a few words. In principle the process Sales Order Processing B2B with ERP sales order in CRM Web Channel means that you setup (a) Web shop(s) that use and display the CRM product catalog but create orders directly in SAP ERP without first creating them in SAP CRM. It also allows to use certain E-Marketing features of CRM in the Web shop. The CRM product catalog in this process can only be used if you do use the TREX. There is no way of directly call up the catalog from CRM in the Web shop by bypassing the TREX.
    In the SAP E-Commerce for SAP ERP solution (ECO ERP) we in contrast offer the possibility to use the ERP catalog without the TREX. In this solution you can use the Memory Catalog which is not using the TREX. This solution by this way allows to directly use and display the ERP catalog and create orders directly in SAP ERP.
    For the CRM catalog in contrast we do not have something similar to the Memory Catalog. Instead you DO need to use the TREX to display the CRM catalog in the Web shop.
    The only option you have to "avoid" the TREX i a CRM web shop is what Easwar and Christoph have written about: The usage of an external catalog from a 3rd party catalog engine via the Open Catalog Interface (OCI) in the CRM Web shop. This we do offer for the CRM Web shop. However if you do not have an external catalog engine and want to use the CRM catalog then again you do need to use the TREX. It does not matter if you do not want to use product search nor prices other than fro ERP sales order.
    Greetings
    Torsten Kliesch

  • To play video stream by using MHP

    Hi
    I want to play a video from the MHP application.
    Could anybody help me of that.
    Thanks,
    Ranikkarasu

    u can use the ##### JMF ##### (Java Media Framework)(java.sun.com/javase/technologies/desktop/media/jmf/) :
    and take a look here :)
    1/haptics.eas.asu.edu/kanav/material/cse408material/presentations/JavaMediaFramework.ppt
    2/ and 'biensur' : tucs.fi/publications/attachment.php?fname=miscPaHaKoBjNySa04a.pdf , if u are using the OpenMHP .

  • Problem in open mhp?

    Hi,
    iam swetha and iam doing a project as"to develop applications on open mhp"
    i have installed open mhp,jre 1.4.2 and also jmf 2.1.1
    iam getting open mhp application manager but helloworld example is not running on it and even iam not geeting tv screen also
    please could anyone help me out to complete this project
    thanks

    Could you provide steps leading to this error? Also start your platoform.
    For the start, you check to confirm that all the admin folders still exist. For instance the location of user_dump_dest and background_dump_dest
    <br>
    Oracle Database FAQs
    </br>

  • MHP play sound, background sound problem

    Hi all,
    In my mhp app, I need to preview a ringtone, so I use
    player = javax.media.Manager.createPlayer(loc);
    player.start();
    sound played successfully, however, after finish, the background TV sound also gone.. I call player.stop(),also does not work.... any one knows why?
    thanks
    Aimar
    Edited by: AimarAimar on Sep 10, 2009 4:41 AM

    Hi,
    It seems like the software platform you are using does not manage the presentation resources, in particular between JMF-created audio player and ServiceMediaHandler instance.
    Try to stop and start the ServiceMediaHandler (it is also an Player), returned from ServiceContext (ServiceContentHandler[] ServiceContext.getServiceContentHandlers()))
    Cheers.
    J.W.

  • Video receiving applet in JMF

    Hello,
    I'm creating a webcam based video channel system but i have problems receiving the signal from the pc in the server. I send it using JMStudio but i'm unable to interpret.
    This is the code i use:
    import java.applet.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    import javax.media.Format;
    import javax.media.format.FormatChangeEvent;
    import javax.media.control.BufferControl;
    public class RecibeVideoApplet extends Applet implements ReceiveStreamListener, SessionListener
         String ip = "my ip"; // Estas direcciones variaran dependiendo del transmisor
         int puerto =0000;
         String puerto1;
         RTPManager rtpm = RTPManager.newInstance();
         Object datoSinc = new Object();
         boolean datoRecibido = false;
         Panel panelCam = new Panel(new BorderLayout());
         Button cerrar =new Button("Salir");
         Player player=null;
         // Funcion que inicializa el Applet
         public void init()
              // Recogemos el parametro de la pagina HTML
              ip = getParameter("IP");
              //puerto1 = getParameter("PUERTO");
              ///puerto = Integer.valueOf(puerto1).intValue();
              try
                   System.out.println("Ip" +ip);
                   InetAddress dirIp = InetAddress.getByName(ip);
                   System.out.println("dirIP" +dirIp);
                   SessionAddress dirLocal = new SessionAddress(InetAddress.getByName("000.000.000.000"),puerto);
                   System.out.println("dirLocal" +dirLocal);
                   SessionAddress dirDest = new SessionAddress(dirIp,puerto);
                   rtpm.addSessionListener(this);
                   rtpm.addReceiveStreamListener(this);
                   rtpm.initialize(dirLocal);
                   rtpm.addTarget(dirDest);          
              catch (Exception e)
                   System.out.println("No se pudo crear la sesion RTP" + e.getMessage());
              // Esperamos a que lleguen los datos
              long then = System.currentTimeMillis();
              long periodoEspera = 60000; // esperamos como maximo 60segundos
              try{
              synchronized (datoSinc)
                   while (!datoRecibido &&
                        System.currentTimeMillis() - then < periodoEspera)
                   if (!datoRecibido)
                        System.err.println("Esperando datos RTP...");
                   datoSinc.wait(1000);
              catch (Exception e) {}
              if (!datoRecibido) {
              System.err.println("No se ha recibido ningn dato RTP");
         // Funciones que esperan a que llegue un evento y avisan de ello
         public synchronized void update (SessionEvent evento)
              if (evento instanceof NewParticipantEvent)
                   Participant participante = ((NewParticipantEvent)evento).getParticipant();
                   System.out.println("Acaba de unirse un nuevo participante:"+ participante.getCNAME());
         public synchronized void update (ReceiveStreamEvent evento)
              RTPManager rtpm = (RTPManager)evento.getSource();
              Participant participante =evento.getParticipant();
              ReceiveStream stream = evento.getReceiveStream();
              if (evento instanceof NewReceiveStreamEvent)
                   try
                        stream = ((NewReceiveStreamEvent)evento).getReceiveStream();
                        DataSource ds =stream.getDataSource();
                        // Creamos el player para visualizar el video
                        player = Manager.createRealizedPlayer(ds);
                        if (player == null)
                             return;
                        // Comenzamos la transmision
                        player.start();
                        // Cogemos el componente visual para a�adirlo al panel
                        Component comp;
                   if ((comp = player.getVisualComponent()) == null)
                        return;
                   panelCam.add("Center", comp);
                   panelCam.add("South", cerrar);
                   add("Center",panelCam);
                   this.setSize(800,800);
                   this.setVisible(true);
                   //Avisamos al metodo inicializar de que hemos recibido datos
                   synchronized (datoSinc)
                        datoRecibido = true;
                        datoSinc.notifyAll();
                   catch (Exception e)
                        System.out.println("Error: " + e.getMessage());
                        return;
         // Metodo que utilizamos para poder cerrar la transmisi�n mediante un bot�n
         public boolean action(Event evt,Object arg)
              if(evt.target.equals(cerrar))
                   close();
              else
              return super.action (evt,arg);
              return true;
         // Metodo para cerrar el player de la transmision
         public void close()
         try
              player.close();
              rtpm.removeTargets("Cerrando sesion desde RecibeVideo");
              rtpm.dispose();
              rtpm = null;
         catch (Exception e)
                   System.out.println("No se ha podido cerrar correctamente");
         //Metodo para destruir el applet
         public void destroy()
    The names are in spanish but i think that the main function can be understood
    and this is the output i get from the webpage:
    java.lang.Error: Unresolved compilation problems:
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         ReceiveStreamListener cannot be resolved to a type
         SessionListener cannot be resolved to a type
         RTPManager cannot be resolved to a type
         RTPManager cannot be resolved
         Player cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         SessionEvent cannot be resolved to a type
         NewParticipantEvent cannot be resolved to a type
         Participant cannot be resolved to a type
         NewParticipantEvent cannot be resolved to a type
         ReceiveStreamEvent cannot be resolved to a type
         RTPManager cannot be resolved to a type
         RTPManager cannot be resolved to a type
         Participant cannot be resolved to a type
         ReceiveStream cannot be resolved to a type
         NewReceiveStreamEvent cannot be resolved to a type
         NewReceiveStreamEvent cannot be resolved to a type
         DataSource cannot be resolved to a type
         player cannot be resolved
         Manager cannot be resolved
         player cannot be resolved
         player cannot be resolved
         player cannot be resolved
         player cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         at RecibeVideoApplet.<init>(RecibeVideoApplet.java:12)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.Error: Unresolved compilation problems:
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         The import javax.media cannot be resolved
         ReceiveStreamListener cannot be resolved to a type
         SessionListener cannot be resolved to a type
         RTPManager cannot be resolved to a type
         RTPManager cannot be resolved
         Player cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         SessionAddress cannot be resolved to a type
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         SessionEvent cannot be resolved to a type
         NewParticipantEvent cannot be resolved to a type
         Participant cannot be resolved to a type
         NewParticipantEvent cannot be resolved to a type
         ReceiveStreamEvent cannot be resolved to a type
         RTPManager cannot be resolved to a type
         RTPManager cannot be resolved to a type
         Participant cannot be resolved to a type
         ReceiveStream cannot be resolved to a type
         NewReceiveStreamEvent cannot be resolved to a type
         NewReceiveStreamEvent cannot be resolved to a type
         DataSource cannot be resolved to a type
         player cannot be resolved
         Manager cannot be resolved
         player cannot be resolved
         player cannot be resolved
         player cannot be resolved
         player cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         rtpm cannot be resolved
         at RecibeVideoApplet.<init>(RecibeVideoApplet.java:12)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    If anyone knows how to solve the problems i have, please let me know.
    Thank you

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • How to record DVB-S Stream with JavaTV/JMF ?

    Hi,
    i'm starting to program with JavaTV and JMF. Now my Question is, how can i record a DVB-S Stream (DVB-Card: Haupauge Nexus) to my hdd?

    MHP uses JMF 1.0, which does not include recording functionality. If you want to do this in Java then JMF 2.x includes recording support, but I'm not sure whether there is a JMF implementaiton that supports the Hauppage cards.
    Steve.

  • JMF HELLLP !!!

    Dear all ;
    I'm trying to write a code that plays a video file, sound file and text file(as subtitles)
    all synchronized. Video and audio synchronization problem is solved,
    the text problem did not.
    I used JMF , what I wish to hava is:if the video is backwarded the appropriate text
    line to be displayed as a subtitle>
    please help !!

    Hi,
    The JavaTV platforms MHP/OCAP/OnRamp don't support downloading and playing video from files. The problem is that video files tend to be very large and most STB's don't have enough memory. All you can do is look at the 'live' video as it's streamed to your STB.
    Also : I'm not exactly sure what you mean by backward video!
    Roger

Maybe you are looking for