ITVViewer::Tune

[This is preliminary documentation and subject to change.]

The Tune method tunes the WebTV for Windows display to the specified channel.

HRESULT Tune(
  long lTuningSpace,    
  long lChannelNumber,  
  long lVideoStream,    
  long lAudioStream,    
  BSTR bsIPStream       
);
 

Parameters

lTuningSpace
Tuning space of the input. Typically, each input device uses a separate tuning space.
lChannelNumber
Channel number.
lVideoStream
Video input stream. If you pass – 1, WebTV for Windows uses the default video stream as defined by the broadcast content provider. To access alternate video streams, pass the video stream identifier specified by the content provider.
lAudioStream
Audio input stream. A single video input stream may have several audio streams associated with it. If you pass in a value of – 1, WebTV for Windows uses the default audio stream, as defined by the broadcast content provider.

This functionality is useful because, for example, a television station with a Hispanic audience might define a Spanish-language audio stream as the default but also define an English-language version as an alternate audio stream. To access the English-language version in this case, an application passes the audio stream identifier that the content provider specifies for that version.

bsIPStream
String that contains information about the IP stream used by triggers. This string must be in the format "xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy:zzz preloadURL&overlayCSS", where xxx.xxx.xxx.xxx specifies the netcard address, yyy.yyy.yyy.yyy specifies the announcement IP address, zzz specifies the announcement port, preloadURL specifies the preload URL and overlayCSS specifies the overlay style sheet. For example: "255.255.255.255 123.25.433.1:1701 basepage.htm&basestyle.css"

The preloadURL and overlayCSS parameters are optional, and can be left out of the string. For example, "255.255.255.255 123.25.433.1:1701".

If no trigger stream exists, this value is set to NULL.

Return Values

Returns an HRESULT indicating success or failure. If the method succeeds it returns S_OK. Otherwise it returns an error code. For specific error code values see Winerror.h.

QuickInfo

  Windows NT: Unsupported.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in tvdisp.odl.
  Import Library: Included as a resource in tvx.exe.
  Unicode: Yes.

See Also

ITVViewer::GetCurrentTuningInfo, ITVViewer::GetPreviousTuningInfo, ITVControl::Tune