User:Shellylin/InputPort: Difference between revisions

Line 17: Line 17:
=== Basic Port Interface ===
=== Basic Port Interface ===
   enum InputPortType { "audio", "av", "displayport", "dvi", "hdmi" };
   enum InputPortType { "audio", "av", "displayport", "dvi", "hdmi" };
  enum AudioFormat { "LPCM", "Dolby Digital" };
  enum VideoFormat { "480i", "480p", "720p", "1080i", "1080p" };


   interface InputPort {
   interface InputPort {
    sequence<AudioFormat> getSupportedAudioFormats ();
    sequence<VideoFormat> getSupportedVideoFormats ();
     readonly attribute DOMString name;
     readonly attribute DOMString name;
     readonly attribute DOMString id;
     readonly attribute DOMString id;
Line 47: Line 43:
'''stream''' of type MediaStream, readonly<br />
'''stream''' of type MediaStream, readonly<br />
The stream represents the media content provided by this input port.
The stream represents the media content provided by this input port.
<u>'''Methods'''</u><br />
'''getSupportedAudioFormats'''<br />
Return the audio formats supported by this input port. Formats should vary on different types of input port.
'''getSupportedVideoFormats'''<br />
Return the video formats supported by this input port. Formats should vary on different types of input port.


=== Specific Port Interfaces ===
=== Specific Port Interfaces ===
==== A/V ====
==== A/V ====
   enum AVType { "scart", "rca" };
   enum AVInputPortType { "scart", "rca" };
 
  enum AVInputPortVideoFormat { "component", "composite", "scart-rgb" };
   interface AVInputPort : InputPort {
   interface AVInputPort : InputPort {
     readonly attribute AVType type;
    sequence<AVInputPortVideoFormat> getSupportedVideoFormats ();
     readonly attribute AVInputPortType type;
   }
   }


==== DVI ====
==== Video ====
   interface DVIInputPort : InputPort {
  enum VideoInputPortType { "dvi", "d-sub" };
  enum VideoInputPortVideoFormat { "vga", "wuxga" );
 
   interface VideoInputPort : InputPort {
    sequence<VideoInputPortVideoFormat> getSupportedVideoFormats ();
    readonly attribute VideoInputPortType type;
   }
   }


==== Audio ====
==== Audio ====
   enum AudioType { "pc" };
   enum AudioInputPortType { "pc" };


   interface AudioInputPort : InputPort {
   interface AudioInputPort : InputPort {
     readonly attribute AudioType type;
     readonly attribute AudioInputPortType type;
   }
   }


==== HDMI/DisplayPort ====
==== HDMI/DisplayPort ====
  enum HDMIInputPortAudioFormat { "LPCM", "Dolby Digital" };
   interface HDMIInputPort : InputPort {
   interface HDMIInputPort : InputPort {
    sequence<HDMIInputPortAudioFormat> getSupportedAudioFormats ();
   }
   }
  enum DisplayPortInputPortAudioFormat { "LPCM" };


   interface DisplayPortInputPort : InputPort {
   interface DisplayPortInputPort : InputPort {
    sequence<DisplayPortInputPortAudioFormat> getSupportedAudioFormats ();
   }
   }


Line 90: Line 92:


   interface InputPortManager {
   interface InputPortManager {
     sequence<InputPort> getInputPorts();
     sequence<InputPort> getInputPorts ();
   };
   };


== Examples ==
== Examples ==
Confirmed users
220

edits