C# Class SV.UPnPLite.Protocols.DLNA.MediaRenderer

A device which renders content from Media Server.
Inheritance: SV.UPnPLite.Protocols.UPnP.UPnPDevice
显示文件 Open project: SNIKO/UPnPLite

Public Methods

Method Description
GetCurrentPosition ( ) : Task

Requests current playback position.

GetCurrentState ( ) : Task

Requests current playback state.

GetMediaInfoAsync ( ) : Task

Requests an information about current media info.

MediaRenderer ( string udn, IAvTransportService avTransportService ) : System

Initializes a new instance of the MediaRenderer class.

MediaRenderer ( string udn, IAvTransportService avTransportService, ILogManager logManager ) : System

Initializes a new instance of the MediaRenderer class.

OpenAsync ( SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaItem item ) : System.Threading.Tasks.Task

Prepares the item for playback on renderer.

OpenAsync ( SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaResource resource ) : System.Threading.Tasks.Task

Prepares the resource for playback on the renderer.

PauseAsync ( ) : System.Threading.Tasks.Task

Requests the renderer to pause playback.

PlayAsync ( ) : System.Threading.Tasks.Task

Requests the renderer to start playback.

StopAsync ( ) : System.Threading.Tasks.Task

Requests the renderer to stop playback.

Private Methods

Method Description
Initialize ( ) : void
ParseTransportState ( string transportState ) : MediaRendererState
SelectResourceForPlayback ( SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaItem mediaItem ) : SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaResource

Method Details

GetCurrentPosition() public method

Requests current playback position.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public GetCurrentPosition ( ) : Task
return Task

GetCurrentState() public method

Requests current playback state.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public GetCurrentState ( ) : Task
return Task

GetMediaInfoAsync() public method

Requests an information about current media info.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public GetMediaInfoAsync ( ) : Task
return Task

MediaRenderer() public method

Initializes a new instance of the MediaRenderer class.
/// is null or -OR- /// is null. ///
public MediaRenderer ( string udn, IAvTransportService avTransportService ) : System
udn string /// A universally-unique identifier for the device. ///
avTransportService IAvTransportService /// A to use for controlling the transport of media streams. ///
return System

MediaRenderer() public method

Initializes a new instance of the MediaRenderer class.
/// is null or -OR- /// is null -OR- /// is null. ///
public MediaRenderer ( string udn, IAvTransportService avTransportService, ILogManager logManager ) : System
udn string /// A universally-unique identifier for the device. ///
avTransportService IAvTransportService /// A to use for controlling the transport of media streams. ///
logManager ILogManager /// The to use for logging the debug information. ///
return System

OpenAsync() public method

Prepares the item for playback on renderer.
/// is null. /// /// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public OpenAsync ( SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaItem item ) : System.Threading.Tasks.Task
item SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaItem /// An item to play on renderer. ///
return System.Threading.Tasks.Task

OpenAsync() public method

Prepares the resource for playback on the renderer.
/// is null. /// /// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public OpenAsync ( SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaResource resource ) : System.Threading.Tasks.Task
resource SV.UPnPLite.Protocols.DLNA.Services.ContentDirectory.MediaResource /// A resource to play on the renderer. ///
return System.Threading.Tasks.Task

PauseAsync() public method

Requests the renderer to pause playback.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public PauseAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

PlayAsync() public method

Requests the renderer to start playback.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public PlayAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

StopAsync() public method

Requests the renderer to stop playback.
/// An error occurred when sending request to service. /// /// An unexpected error occurred when executing request on device. ///
public StopAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task