Net::UPnP::AV::MediaRenderer(3)

NAME
Net::UPnP::AV::MediaRenderer - Perl extension for UPnP.

SYNOPSIS
    use Net::UPnP::ControlPoint;
    use Net::UPnP::AV::MediaRenderer;

    my $obj = Net::UPnP::ControlPoint->new();

    @dev_list = ();
    while (@dev_list <= 0 || $retry_cnt > 5) {
        @dev_list = $obj->search(st =>'upnp:rootdevice', mx => 3);
        $retry_cnt++;
    }

    $devNum= 0;
    foreach $dev (@dev_list) {
        my $device_type = $dev->getdevicetype();
        if  ($device_type ne 'urn:schemas-upnp-org:device:MediaRenderer:1') {
            next;
        }
        my $friendlyname = $dev->getfriendlyname();
        print "[$devNum] : " . $friendlyname . "\n";
        my $renderer = Net::UPnP::AV::MediaRenderer->new();
        $renderer->setdevice($dev);
        $renderer->stop();
        $renderer->setAVTransportURI(CurrentURI => 'http://xxx.xxx.xxx.xxx/xxxx.mpg');
        $renderer->play();
        $devNum++;
    }

DESCRIPTION
The package is a extention UPnP/AV media server.

METHODS

new - create new Net::UPnP::AV::MediaRenderer.
        $renderer = Net::UPnP::AV::MediaRenderer();

    Creates a new object. Read `perldoc perlboot` if you don't understand that.

    The new object is not associated with any UPnP devices. Please use setdevice() to set the device.

setdevice - set a UPnP devices
        $renderer->setdevice($dev);

    Set a device to the object.

setAVTransportURI - set a current content.
        @action_response = $renderer->setAVTransportURI(
                                            InstanceID => $instanceID, # 0
                                            CurrentURI => $url, # ''
                                            CurrentURIMetaData => $metaData, # "'
                                            );

    Set a current content to play, Net::UPnP::ActionResponse.

setNextAVTransportURI - set a next content.
            @action_response = $renderer->setNextAVTransportURI(
                                                                                    InstanceID => $instanceID, # 0
                                            NextURI => $url, # ''
                                            NextURIMetaData => $metaData, # "'
                                                                                    );

    Set a next content to play, Net::UPnP::ActionResponse.

play - play.
        @action_response = $renderer->play(
                                                                                    InstanceID => $instanceID, # 0
                                                                                    Speed => $url, # 1
                                                                                    );

    Play the specified content.

stop - stop.
        @action_response = $renderer->stop(
                                                                                    InstanceID => $instanceID, # 0
                                                                                    );

    Stop the playing content.

SEE ALSO
Net::UPnP::AV::Content

Net::UPnP::AV::Item

Net::UPnP::AV::Container

AUTHOR
Satoshi Konno skonno@cybergarage.org

CyberGarage http://www.cybergarage.org

COPYRIGHT AND LICENSE
Copyright (C) 2005 by Satoshi Konno

It may be used, redistributed, and/or modified under the terms of BSD License.