Arduino DLNA Server
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
tiny_dlna::DLNAMediaRenderer Class Reference

MediaRenderer DLNA Device. More...

#include <DLNAMediaRenderer.h>

Inheritance diagram for tiny_dlna::DLNAMediaRenderer:
Inheritance graph
[legend]

Public Types

typedef void(* MediaEventHandler) (MediaEvent event, DLNAMediaRenderer &renderer)
 

Public Member Functions

 DLNAMediaRenderer ()
 Default constructor.
 
 DLNAMediaRenderer (HttpServer &server, IUDPService &udp)
 Recommended constructor Construct a MediaRenderer bound to an HttpServer and IUDPService. The provided references are stored and used when calling begin().
 
bool begin ()
 Override to initialize the device.
 
void end ()
 Stops processing and releases resources.
 
bool loop ()
 Call this from Arduino loop()
 
void setHttpServer (HttpServer &server)
 Set the http server instance the MediaRenderer should use.
 
void setUdpService (IUDPService &udp)
 Set the UDP service instance the MediaRenderer should use.
 
bool isActive ()
 Query whether renderer is active (playing)
 
void setActive (bool active)
 Set the active state (used by transport callbacks)
 
const char * getMime ()
 Provides the mime from the DIDL or nullptr.
 
void setMediaEventHandler (MediaEventHandler cb)
 Register application event handler.
 
uint8_t getVolume ()
 Get current volume (0-255)
 
void setVolume (uint8_t vol)
 Set volume and publish event.
 
bool isMuted ()
 Query mute state.
 
void setMuted (bool m)
 Set mute state and publish event.
 
const char * getCurrentUri ()
 
const char * getTransportState ()
 Get textual transport state.
 
DLNADevicedevice ()
 Provides access to the internal DLNA device instance.
 
bool play ()
 Start playback: same as setActive(true)
 
bool play (const char *urlStr)
 Start playback of a network resource (returns true on success)
 
bool setPlaybackURL (const char *urlStr)
 Defines the actual url to play.
 
bool stop ()
 Stop playback.
 
void setPlaybackCompleted ()
 Notify the renderer that playback completed.
 
size_t getRelativeTimePositionSec ()
 Get estimated playback position (seconds)
 
void publishGetRelativeTimePositionSec ()
 Publish the RelativeTimePosition property.
 
const char * getCurrentTransportActions ()
 Get a csv of the valid actions.
 
void setCustomActionRule (const char *suffix, bool(*handler)(DLNAMediaRenderer *, ActionRequest &, HttpServer &))
 Defines a custom action rule for the media renderer.
 
void print (Print &out)
 renders the device xml
 
void setDeviceType (const char *st)
 
const char * getDeviceType ()
 
void setUDN (const char *id)
 Define the udn uuid.
 
const char * getUDN ()
 Provide the udn uuid.
 
void setBaseURL (const char *url)
 Defines the base url.
 
void setBaseURL (IPAddress ip, int port, const char *path=nullptr)
 Defines the base URL.
 
const char * getBaseURL ()
 Provides the base url.
 
UrlgetDeviceURL ()
 This method returns base url/device.xml.
 
void setIPAddress (IPAddress address)
 Defines the local IP address.
 
IPAddress getIPAddress ()
 Provides the local IP address.
 
const char * getIPStr ()
 Provides the local address as string.
 
void setNS (const char *ns)
 
const char * getNS ()
 
void setFriendlyName (const char *name)
 
const char * getFriendlyName ()
 
void setManufacturer (const char *man)
 
const char * getManufacturer ()
 
void setManufacturerURL (const char *url)
 
const char * getManufacturerURL ()
 
void setModelDescription (const char *descr)
 
const char * getModelDescription ()
 
void setModelName (const char *name)
 
const char * getModelName ()
 
void setModelNumber (const char *number)
 
const char * getModelNumber ()
 
void setSerialNumber (const char *sn)
 
const char * getSerialNumber ()
 
void setUniversalProductCode (const char *upc)
 
const char * getUniversalProductCode ()
 
void addService (DLNAServiceInfo s)
 Adds a service definition.
 
DLNAServiceInfogetService (const char *id)
 Finds a service definition by name.
 
DLNAServiceInfogetServiceByAbbrev (const char *abbrev)
 Finds a service definition by name.
 
Vector< DLNAServiceInfo > & getServices ()
 Provides all service definitions.
 
void clear ()
 Clears all device information.
 
void clearIcons ()
 Overwrite the default icon.
 
void addIcon (Icon icon)
 adds an icon
 
Icon getIcon (int idx=0)
 Provides the item at indix.
 
 operator bool ()
 return true if active
 

Protected Member Functions

void publishProperty (const char *serviceAbbrev, const char *changeTag)
 serviceAbbrev: AVT, RCS, CMS
 
void publishAVT ()
 
void publishRCS ()
 Publish the current RenderingControl state (Volume, Mute)
 
void publishCMS ()
 Publish a minimal ConnectionManager state (CurrentConnectionIDs)
 
void setMime (const char *mime)
 Set MIME explicitly (used when DIDL-Lite metadata provides protocolInfo)
 
void setMimeFromDIDL (const char *didl)
 
void setupTransportService (HttpServer *server)
 
void setupConnectionManagerService (HttpServer *server)
 
void setupRenderingControlService (HttpServer *server)
 
void setupServicesImpl (HttpServer *server)
 Register all services (called when HTTP server is set)
 
bool processAction (ActionRequest &action, HttpServer &server)
 Process parsed SOAP ActionRequest and dispatch to appropriate handler.
 
void setupRules ()
 Setup the action handling rules.
 
virtual void setupServices (HttpServer &server, IUDPService &udp)
 to be implemented by subclasses
 
size_t printRoot ()
 
size_t printDevice ()
 
size_t printSpecVersion ()
 
size_t printServiceList ()
 
size_t printService (void *srv)
 
size_t printIconList ()
 
size_t printIconDlnaInfo (Icon &icon)
 

Static Protected Member Functions

static void transportDescrCB (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 
static void connmgrDescrCB (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 
static void controlDescrCB (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 
static void controlCB (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 
static void eventSubscriptionHandler (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 After the subscription we publish all relevant properties.
 
static int printReplyXML (Print &out, const char *replyName, const char *serviceId, const char *values=nullptr)
 Builds a standard SOAP reply envelope.
 
static size_t replyPlay (Print &out)
 
static size_t replyPause (Print &out)
 
static size_t replyStop (Print &out)
 
static size_t replySetAVTransportURI (Print &out)
 
static size_t replySetVolume (Print &out)
 
static size_t replySetMute (Print &out)
 
static size_t replyGetMute (Print &out, bool isMuted)
 
static size_t replyGetVolume (Print &out, uint8_t volume)
 

Protected Attributes

tiny_dlna::Str current_uri
 
tiny_dlna::Str current_mime
 
MediaEventHandler event_cb = nullptr
 
uint8_t current_volume = 50
 
bool is_muted = false
 
unsigned long start_time = 0
 
unsigned long time_sum = 0
 
tiny_dlna::Str transport_state = "NO_MEDIA_PRESENT"
 
const char * st = "urn:schemas-upnp-org:device:MediaRenderer:1"
 
const char * usn = "uuid:09349455-2941-4cf7-9847-1dd5ab210e97"
 
DLNADevice dlna_device
 
HttpServerp_server = nullptr
 
IUDPServicep_udp_member = nullptr
 
void * ref_ctx [1] = {nullptr}
 
Vector< ActionRulerules
 
bool is_active = true
 
XMLPrinter xml
 
Url device_url
 
IPAddress localhost
 
int version_major = 1
 
int version_minor = 0
 
const char * base_url = "http://localhost:9876/dlna"
 
const char * udn = "uuid:09349455-2941-4cf7-9847-0dd5ab210e97"
 
const char * ns = "xmlns=\"urn:schemas-upnp-org:device-1-0\""
 
const char * device_type = nullptr
 
const char * friendly_name = nullptr
 
const char * manufacturer = nullptr
 
const char * manufacturer_url = nullptr
 
const char * model_description = nullptr
 
const char * model_name = nullptr
 
const char * model_url = nullptr
 
const char * model_number = nullptr
 
const char * serial_number = nullptr
 
const char * universal_product_code = nullptr
 
Icon icon
 
Vector< DLNAServiceInfoservices
 
Vector< Iconicons
 
Str url_str
 

Detailed Description

MediaRenderer DLNA Device.

MediaRenderer implements a simple UPnP/DLNA Media Renderer device. It receives stream URIs via UPnP AVTransport actions and delegates actual playback and rendering to the application through an event callback API. This removes any dependency on an internal audio stack: applications handle playback themselves by registering a handler with setMediaEventHandler(). The device still supports rendering controls (volume, mute) and transport controls (play/pause/stop) and provides helper accessors like getCurrentUri() and getMime().

Usage summary:

This class is intentionally small and Arduino-friendly: methods return bool for success/failure and avoid heavy dynamic memory allocations in the hot path.

Author: Phil Schatzmann

Member Typedef Documentation

◆ MediaEventHandler

typedef void(* tiny_dlna::DLNAMediaRenderer::MediaEventHandler) (MediaEvent event, DLNAMediaRenderer &renderer)

Constructor & Destructor Documentation

◆ DLNAMediaRenderer() [1/2]

tiny_dlna::DLNAMediaRenderer::DLNAMediaRenderer ( )
inline

Default constructor.

Initializes device metadata (friendly name, manufacturer, model) and sets default base URL and identifiers. It does not configure any audio pipeline components; use setOutput() and setDecoder() for that.

◆ DLNAMediaRenderer() [2/2]

tiny_dlna::DLNAMediaRenderer::DLNAMediaRenderer ( HttpServer server,
IUDPService udp 
)
inline

Recommended constructor Construct a MediaRenderer bound to an HttpServer and IUDPService. The provided references are stored and used when calling begin().

Member Function Documentation

◆ addIcon()

void tiny_dlna::DLNADeviceInfo::addIcon ( Icon  icon)
inlineinherited

adds an icon

◆ addService()

void tiny_dlna::DLNADeviceInfo::addService ( DLNAServiceInfo  s)
inlineinherited

Adds a service definition.

◆ begin()

bool tiny_dlna::DLNAMediaRenderer::begin ( )
inlinevirtual

Override to initialize the device.

Reimplemented from tiny_dlna::DLNADeviceInfo.

◆ clear()

void tiny_dlna::DLNADeviceInfo::clear ( )
inlineinherited

Clears all device information.

◆ clearIcons()

void tiny_dlna::DLNADeviceInfo::clearIcons ( )
inlineinherited

Overwrite the default icon.

◆ connmgrDescrCB()

static void tiny_dlna::DLNAMediaRenderer::connmgrDescrCB ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

◆ controlCB()

static void tiny_dlna::DLNAMediaRenderer::controlCB ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

◆ controlDescrCB()

static void tiny_dlna::DLNAMediaRenderer::controlDescrCB ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

◆ device()

DLNADevice & tiny_dlna::DLNAMediaRenderer::device ( )
inline

Provides access to the internal DLNA device instance.

◆ end()

void tiny_dlna::DLNAMediaRenderer::end ( )
inline

Stops processing and releases resources.

◆ eventSubscriptionHandler()

static void tiny_dlna::DLNAMediaRenderer::eventSubscriptionHandler ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

After the subscription we publish all relevant properties.

◆ getBaseURL()

const char * tiny_dlna::DLNADeviceInfo::getBaseURL ( )
inlineinherited

Provides the base url.

◆ getCurrentTransportActions()

const char * tiny_dlna::DLNAMediaRenderer::getCurrentTransportActions ( )
inline

Get a csv of the valid actions.

◆ getCurrentUri()

const char * tiny_dlna::DLNAMediaRenderer::getCurrentUri ( )
inline

◆ getDeviceType()

const char * tiny_dlna::DLNADeviceInfo::getDeviceType ( )
inlineinherited

◆ getDeviceURL()

Url & tiny_dlna::DLNADeviceInfo::getDeviceURL ( )
inlineinherited

This method returns base url/device.xml.

◆ getFriendlyName()

const char * tiny_dlna::DLNADeviceInfo::getFriendlyName ( )
inlineinherited

◆ getIcon()

Icon tiny_dlna::DLNADeviceInfo::getIcon ( int  idx = 0)
inlineinherited

Provides the item at indix.

◆ getIPAddress()

IPAddress tiny_dlna::DLNADeviceInfo::getIPAddress ( )
inlineinherited

Provides the local IP address.

◆ getIPStr()

const char * tiny_dlna::DLNADeviceInfo::getIPStr ( )
inlineinherited

Provides the local address as string.

◆ getManufacturer()

const char * tiny_dlna::DLNADeviceInfo::getManufacturer ( )
inlineinherited

◆ getManufacturerURL()

const char * tiny_dlna::DLNADeviceInfo::getManufacturerURL ( )
inlineinherited

◆ getMime()

const char * tiny_dlna::DLNAMediaRenderer::getMime ( )
inline

Provides the mime from the DIDL or nullptr.

◆ getModelDescription()

const char * tiny_dlna::DLNADeviceInfo::getModelDescription ( )
inlineinherited

◆ getModelName()

const char * tiny_dlna::DLNADeviceInfo::getModelName ( )
inlineinherited

◆ getModelNumber()

const char * tiny_dlna::DLNADeviceInfo::getModelNumber ( )
inlineinherited

◆ getNS()

const char * tiny_dlna::DLNADeviceInfo::getNS ( )
inlineinherited

◆ getRelativeTimePositionSec()

size_t tiny_dlna::DLNAMediaRenderer::getRelativeTimePositionSec ( )
inline

Get estimated playback position (seconds)

◆ getSerialNumber()

const char * tiny_dlna::DLNADeviceInfo::getSerialNumber ( )
inlineinherited

◆ getService()

DLNAServiceInfo & tiny_dlna::DLNADeviceInfo::getService ( const char *  id)
inlineinherited

Finds a service definition by name.

◆ getServiceByAbbrev()

DLNAServiceInfo & tiny_dlna::DLNADeviceInfo::getServiceByAbbrev ( const char *  abbrev)
inlineinherited

Finds a service definition by name.

◆ getServices()

Vector< DLNAServiceInfo > & tiny_dlna::DLNADeviceInfo::getServices ( )
inlineinherited

Provides all service definitions.

◆ getTransportState()

const char * tiny_dlna::DLNAMediaRenderer::getTransportState ( )
inline

Get textual transport state.

◆ getUDN()

const char * tiny_dlna::DLNADeviceInfo::getUDN ( )
inlineinherited

Provide the udn uuid.

◆ getUniversalProductCode()

const char * tiny_dlna::DLNADeviceInfo::getUniversalProductCode ( )
inlineinherited

◆ getVolume()

uint8_t tiny_dlna::DLNAMediaRenderer::getVolume ( )
inline

Get current volume (0-255)

◆ isActive()

bool tiny_dlna::DLNAMediaRenderer::isActive ( )
inline

Query whether renderer is active (playing)

◆ isMuted()

bool tiny_dlna::DLNAMediaRenderer::isMuted ( )
inline

Query mute state.

◆ loop()

bool tiny_dlna::DLNAMediaRenderer::loop ( )
inlinevirtual

Call this from Arduino loop()

Reimplemented from tiny_dlna::DLNADeviceInfo.

◆ operator bool()

tiny_dlna::DLNADeviceInfo::operator bool ( )
inlineinherited

return true if active

◆ play() [1/2]

bool tiny_dlna::DLNAMediaRenderer::play ( )
inline

Start playback: same as setActive(true)

◆ play() [2/2]

bool tiny_dlna::DLNAMediaRenderer::play ( const char *  urlStr)
inline

Start playback of a network resource (returns true on success)

◆ print()

void tiny_dlna::DLNADeviceInfo::print ( Print &  out)
inlineinherited

renders the device xml

◆ printDevice()

size_t tiny_dlna::DLNADeviceInfo::printDevice ( )
inlineprotectedinherited

◆ printIconDlnaInfo()

size_t tiny_dlna::DLNADeviceInfo::printIconDlnaInfo ( Icon icon)
inlineprotectedinherited

◆ printIconList()

size_t tiny_dlna::DLNADeviceInfo::printIconList ( )
inlineprotectedinherited

◆ printReplyXML()

static int tiny_dlna::DLNAMediaRenderer::printReplyXML ( Print &  out,
const char *  replyName,
const char *  serviceId,
const char *  values = nullptr 
)
inlinestaticprotected

Builds a standard SOAP reply envelope.

◆ printRoot()

size_t tiny_dlna::DLNADeviceInfo::printRoot ( )
inlineprotectedinherited

◆ printService()

size_t tiny_dlna::DLNADeviceInfo::printService ( void *  srv)
inlineprotectedinherited

◆ printServiceList()

size_t tiny_dlna::DLNADeviceInfo::printServiceList ( )
inlineprotectedinherited

◆ printSpecVersion()

size_t tiny_dlna::DLNADeviceInfo::printSpecVersion ( )
inlineprotectedinherited

◆ processAction()

bool tiny_dlna::DLNAMediaRenderer::processAction ( ActionRequest action,
HttpServer server 
)
inlineprotected

Process parsed SOAP ActionRequest and dispatch to appropriate handler.

Parameters
actionParsed ActionRequest
serverHttpServer for reply
Returns
true if action handled, false if not supported

◆ publishAVT()

void tiny_dlna::DLNAMediaRenderer::publishAVT ( )
inlineprotected

Publish the current AVTransport state (TransportState, CurrentTrackURI, RelativeTimePosition, CurrentTransportActions)

◆ publishCMS()

void tiny_dlna::DLNAMediaRenderer::publishCMS ( )
inlineprotected

Publish a minimal ConnectionManager state (CurrentConnectionIDs)

◆ publishGetRelativeTimePositionSec()

void tiny_dlna::DLNAMediaRenderer::publishGetRelativeTimePositionSec ( )
inline

Publish the RelativeTimePosition property.

◆ publishProperty()

void tiny_dlna::DLNAMediaRenderer::publishProperty ( const char *  serviceAbbrev,
const char *  changeTag 
)
inlineprotected

serviceAbbrev: AVT, RCS, CMS

◆ publishRCS()

void tiny_dlna::DLNAMediaRenderer::publishRCS ( )
inlineprotected

Publish the current RenderingControl state (Volume, Mute)

◆ replyGetMute()

static size_t tiny_dlna::DLNAMediaRenderer::replyGetMute ( Print &  out,
bool  isMuted 
)
inlinestaticprotected

◆ replyGetVolume()

static size_t tiny_dlna::DLNAMediaRenderer::replyGetVolume ( Print &  out,
uint8_t  volume 
)
inlinestaticprotected

◆ replyPause()

static size_t tiny_dlna::DLNAMediaRenderer::replyPause ( Print &  out)
inlinestaticprotected

◆ replyPlay()

static size_t tiny_dlna::DLNAMediaRenderer::replyPlay ( Print &  out)
inlinestaticprotected

◆ replySetAVTransportURI()

static size_t tiny_dlna::DLNAMediaRenderer::replySetAVTransportURI ( Print &  out)
inlinestaticprotected

◆ replySetMute()

static size_t tiny_dlna::DLNAMediaRenderer::replySetMute ( Print &  out)
inlinestaticprotected

◆ replySetVolume()

static size_t tiny_dlna::DLNAMediaRenderer::replySetVolume ( Print &  out)
inlinestaticprotected

◆ replyStop()

static size_t tiny_dlna::DLNAMediaRenderer::replyStop ( Print &  out)
inlinestaticprotected

◆ setActive()

void tiny_dlna::DLNAMediaRenderer::setActive ( bool  active)
inline

Set the active state (used by transport callbacks)

◆ setBaseURL() [1/2]

void tiny_dlna::DLNADeviceInfo::setBaseURL ( const char *  url)
inlineinherited

Defines the base url.

◆ setBaseURL() [2/2]

void tiny_dlna::DLNADeviceInfo::setBaseURL ( IPAddress  ip,
int  port,
const char *  path = nullptr 
)
inlineinherited

Defines the base URL.

◆ setCustomActionRule()

void tiny_dlna::DLNAMediaRenderer::setCustomActionRule ( const char *  suffix,
bool(*)(DLNAMediaRenderer *, ActionRequest &, HttpServer &)  handler 
)
inline

Defines a custom action rule for the media renderer.

◆ setDeviceType()

void tiny_dlna::DLNADeviceInfo::setDeviceType ( const char *  st)
inlineinherited

◆ setFriendlyName()

void tiny_dlna::DLNADeviceInfo::setFriendlyName ( const char *  name)
inlineinherited

◆ setHttpServer()

void tiny_dlna::DLNAMediaRenderer::setHttpServer ( HttpServer server)
inline

Set the http server instance the MediaRenderer should use.

◆ setIPAddress()

void tiny_dlna::DLNADeviceInfo::setIPAddress ( IPAddress  address)
inlineinherited

Defines the local IP address.

◆ setManufacturer()

void tiny_dlna::DLNADeviceInfo::setManufacturer ( const char *  man)
inlineinherited

◆ setManufacturerURL()

void tiny_dlna::DLNADeviceInfo::setManufacturerURL ( const char *  url)
inlineinherited

◆ setMediaEventHandler()

void tiny_dlna::DLNAMediaRenderer::setMediaEventHandler ( MediaEventHandler  cb)
inline

Register application event handler.

◆ setMime()

void tiny_dlna::DLNAMediaRenderer::setMime ( const char *  mime)
inlineprotected

Set MIME explicitly (used when DIDL-Lite metadata provides protocolInfo)

◆ setMimeFromDIDL()

void tiny_dlna::DLNAMediaRenderer::setMimeFromDIDL ( const char *  didl)
inlineprotected

Try to parse a DIDL-Lite snippet and extract the protocolInfo MIME from the <res> element. If found, set current_mime.

◆ setModelDescription()

void tiny_dlna::DLNADeviceInfo::setModelDescription ( const char *  descr)
inlineinherited

◆ setModelName()

void tiny_dlna::DLNADeviceInfo::setModelName ( const char *  name)
inlineinherited

◆ setModelNumber()

void tiny_dlna::DLNADeviceInfo::setModelNumber ( const char *  number)
inlineinherited

◆ setMuted()

void tiny_dlna::DLNAMediaRenderer::setMuted ( bool  m)
inline

Set mute state and publish event.

◆ setNS()

void tiny_dlna::DLNADeviceInfo::setNS ( const char *  ns)
inlineinherited

◆ setPlaybackCompleted()

void tiny_dlna::DLNAMediaRenderer::setPlaybackCompleted ( )
inline

Notify the renderer that playback completed.

This helper updates the internal transport state to "STOPPED", marks the renderer inactive, resets the start time, logs the event and notifies the application event handler with MediaEvent::STOP so the application can perform cleanup (release resources, update UI, etc.).

◆ setPlaybackURL()

bool tiny_dlna::DLNAMediaRenderer::setPlaybackURL ( const char *  urlStr)
inline

Defines the actual url to play.

◆ setSerialNumber()

void tiny_dlna::DLNADeviceInfo::setSerialNumber ( const char *  sn)
inlineinherited

◆ setUDN()

void tiny_dlna::DLNADeviceInfo::setUDN ( const char *  id)
inlineinherited

Define the udn uuid.

◆ setUdpService()

void tiny_dlna::DLNAMediaRenderer::setUdpService ( IUDPService udp)
inline

Set the UDP service instance the MediaRenderer should use.

◆ setUniversalProductCode()

void tiny_dlna::DLNADeviceInfo::setUniversalProductCode ( const char *  upc)
inlineinherited

◆ setupConnectionManagerService()

void tiny_dlna::DLNAMediaRenderer::setupConnectionManagerService ( HttpServer server)
inlineprotected

◆ setupRenderingControlService()

void tiny_dlna::DLNAMediaRenderer::setupRenderingControlService ( HttpServer server)
inlineprotected

◆ setupRules()

void tiny_dlna::DLNAMediaRenderer::setupRules ( )
inlineprotected

Setup the action handling rules.

◆ setupServices()

virtual void tiny_dlna::DLNADeviceInfo::setupServices ( HttpServer server,
IUDPService udp 
)
inlineprotectedvirtualinherited

to be implemented by subclasses

◆ setupServicesImpl()

void tiny_dlna::DLNAMediaRenderer::setupServicesImpl ( HttpServer server)
inlineprotected

Register all services (called when HTTP server is set)

◆ setupTransportService()

void tiny_dlna::DLNAMediaRenderer::setupTransportService ( HttpServer server)
inlineprotected

◆ setVolume()

void tiny_dlna::DLNAMediaRenderer::setVolume ( uint8_t  vol)
inline

Set volume and publish event.

◆ stop()

bool tiny_dlna::DLNAMediaRenderer::stop ( )
inline

Stop playback.

◆ transportDescrCB()

static void tiny_dlna::DLNAMediaRenderer::transportDescrCB ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

Member Data Documentation

◆ base_url

const char* tiny_dlna::DLNADeviceInfo::base_url = "http://localhost:9876/dlna"
protectedinherited

◆ current_mime

tiny_dlna::Str tiny_dlna::DLNAMediaRenderer::current_mime
protected

◆ current_uri

tiny_dlna::Str tiny_dlna::DLNAMediaRenderer::current_uri
protected

◆ current_volume

uint8_t tiny_dlna::DLNAMediaRenderer::current_volume = 50
protected

◆ device_type

const char* tiny_dlna::DLNADeviceInfo::device_type = nullptr
protectedinherited

◆ device_url

Url tiny_dlna::DLNADeviceInfo::device_url
protectedinherited

◆ dlna_device

DLNADevice tiny_dlna::DLNAMediaRenderer::dlna_device
protected

◆ event_cb

MediaEventHandler tiny_dlna::DLNAMediaRenderer::event_cb = nullptr
protected

◆ friendly_name

const char* tiny_dlna::DLNADeviceInfo::friendly_name = nullptr
protectedinherited

◆ icon

Icon tiny_dlna::DLNADeviceInfo::icon
protectedinherited

◆ icons

Vector<Icon> tiny_dlna::DLNADeviceInfo::icons
protectedinherited

◆ is_active

bool tiny_dlna::DLNADeviceInfo::is_active = true
protectedinherited

◆ is_muted

bool tiny_dlna::DLNAMediaRenderer::is_muted = false
protected

◆ localhost

IPAddress tiny_dlna::DLNADeviceInfo::localhost
protectedinherited

◆ manufacturer

const char* tiny_dlna::DLNADeviceInfo::manufacturer = nullptr
protectedinherited

◆ manufacturer_url

const char* tiny_dlna::DLNADeviceInfo::manufacturer_url = nullptr
protectedinherited

◆ model_description

const char* tiny_dlna::DLNADeviceInfo::model_description = nullptr
protectedinherited

◆ model_name

const char* tiny_dlna::DLNADeviceInfo::model_name = nullptr
protectedinherited

◆ model_number

const char* tiny_dlna::DLNADeviceInfo::model_number = nullptr
protectedinherited

◆ model_url

const char* tiny_dlna::DLNADeviceInfo::model_url = nullptr
protectedinherited

◆ ns

const char* tiny_dlna::DLNADeviceInfo::ns = "xmlns=\"urn:schemas-upnp-org:device-1-0\""
protectedinherited

◆ p_server

HttpServer* tiny_dlna::DLNAMediaRenderer::p_server = nullptr
protected

◆ p_udp_member

IUDPService* tiny_dlna::DLNAMediaRenderer::p_udp_member = nullptr
protected

◆ ref_ctx

void* tiny_dlna::DLNAMediaRenderer::ref_ctx[1] = {nullptr}
protected

◆ rules

Vector<ActionRule> tiny_dlna::DLNAMediaRenderer::rules
protected

◆ serial_number

const char* tiny_dlna::DLNADeviceInfo::serial_number = nullptr
protectedinherited

◆ services

Vector<DLNAServiceInfo> tiny_dlna::DLNADeviceInfo::services
protectedinherited

◆ st

const char* tiny_dlna::DLNAMediaRenderer::st = "urn:schemas-upnp-org:device:MediaRenderer:1"
protected

◆ start_time

unsigned long tiny_dlna::DLNAMediaRenderer::start_time = 0
protected

◆ time_sum

unsigned long tiny_dlna::DLNAMediaRenderer::time_sum = 0
protected

◆ transport_state

tiny_dlna::Str tiny_dlna::DLNAMediaRenderer::transport_state = "NO_MEDIA_PRESENT"
protected

◆ udn

const char* tiny_dlna::DLNADeviceInfo::udn = "uuid:09349455-2941-4cf7-9847-0dd5ab210e97"
protectedinherited

◆ universal_product_code

const char* tiny_dlna::DLNADeviceInfo::universal_product_code = nullptr
protectedinherited

◆ url_str

Str tiny_dlna::DLNADeviceInfo::url_str
protectedinherited

◆ usn

const char* tiny_dlna::DLNAMediaRenderer::usn = "uuid:09349455-2941-4cf7-9847-1dd5ab210e97"
protected

◆ version_major

int tiny_dlna::DLNADeviceInfo::version_major = 1
protectedinherited

◆ version_minor

int tiny_dlna::DLNADeviceInfo::version_minor = 0
protectedinherited

◆ xml

XMLPrinter tiny_dlna::DLNADeviceInfo::xml
protectedinherited

The documentation for this class was generated from the following file: