Difference between revisions of "Media Plugin"

From LinuxMCE
Jump to: navigation, search
m (Parameters: Add table border)
(StartMedia: Function signatures)
Line 96: Line 96:
 
== API ==
 
== API ==
 
=== StartMedia ===
 
=== StartMedia ===
 +
This function has four signatures:
 +
==== Signature 1 ====
 +
<u>void</u>
 +
Media_Plugin::StartMedia(
 +
    <u>int</u>                                            iPK_MediaType,
 +
    <u>int</u>                                            iPK_MediaProvider,
 +
    <u>unsigned int</u>                                    iPK_Device_Orbiter,
 +
    <u>vector<EntertainArea *></u>                        &vectEntertainArea,
 +
    <u>int</u>                                            iPK_Device,
 +
    <u>int</u>                                            iPK_DeviceTemplate,
 +
    <u>deque<MediaFile *></u>                            *p_dequeMediaFile,
 +
    <u>bool</u>                                            bQueue,
 +
    <u>bool</u>                                            bResume,
 +
    <u>int</u>                                            iRepeat,
 +
    <u>string</u>                                          sStartingPosition,
 +
    <u>vector<MediaStream *></u>                          *p_vectMediaStream = NULL
 +
)
 +
 +
==== Signature 2 ====
 +
<u>MediaStream *</u>
 +
Media_Plugin::StartMedia(
 +
    <u>MediaHandlerInfo</u>                              *pMediaHandlerInfo,
 +
    <u>int</u>                                            iPK_MediaProvider,
 +
    <u>unsigned int</u>                                    PK_Device_Orbiter,
 +
    <u>vector<EntertainArea *></u>                        &vectEntertainArea,
 +
    <u>int</u>                                            PK_Device_Source,
 +
    <u>deque<MediaFile *></u>                            *dequeMediaFile,
 +
    <u>bool</u>                                            bQueue,
 +
    <u>bool</u>                                            bResume,
 +
    <u>int</u>                                            iRepeat,
 +
    <u>string</u>                                          sStartingPosition,
 +
    <u>int</u>                                            iPK_Playlist = 0,
 +
    <u>map<int, pair<MediaDevice *,MediaDevice *> ></u>  *p_mapEntertainmentArea_OutputZone = NULL
 +
)
 +
 +
==== Signature 3 ====
 +
bool
 +
Media_Plugin::StartMedia(
 +
    <u>MediaStream</u>                                    *pMediaStream,
 +
    <u>map<int, pair<MediaDevice *,MediaDevice *> ></u>  *p_mapEntertainmentArea_OutputZone
 +
)
 +
 +
==== Signature 4 ====
 +
bool
 +
Media_Plugin::StartMedia(
 +
    <u>MediaStream</u>                                    *pMediaStream
 +
)
 +
 
=== RegisterMediaPlugin ===
 
=== RegisterMediaPlugin ===

Revision as of 18:05, 26 July 2011


This Page still needs to be written with appropriate information as of --Tschak909 04:56, 10 February 2011 (CET) --Uplink 00:09, 26 July 2011 (CEST)

TODO

Provide a technical explanation of the Media Plugin, its purpose, and how to use it to extend and add additional media types to LinuxMCE.

Description

Media Plugin is a plug-in in the DCE Router that is responsible for media management in LinuxMCE. Extension plug-ins can register with it to provide control for media types that Media Plugin doesn't handle itself.

Events

Media Plugin handles the following events:

Media Inserted

Playback Completed

Playback Started

Description

When playback of a media stream starts, this event is emitted by the player. When this event is received by the Media Plugin, it updates the playback status of the corresponding stream. If the stream is a DVD, it also updates the section descriptions.

Parameters

Name Description
Stream ID The ID of the stream this message refers to.
MRL The MRL of the stream. Not used.
SectionDescription If the stream is a DVD, this parameter should contain the description for the DVD sections.

Each section description is given on a separate line ended with LF (\n).
The format of each line is as follows:

Description tab ChapterNumber tab TitleNumber

Follow Me Media

Device OnOff

AV Input Changed

Media Description Changed

Description

This event specified new details for an existing stream.

Parameters

Name Description
Text The description of the stream. This is used by the Orbiter where the stream description is needed. As an example, watching TV on a STB that provides data about the current channel/program over a serial connection would update the description on your remote when the show changes or you change the channel.

Volume Changed

Commands

Intercepted

Set Volume

Mute

Normal DCE

MH Play Media

MH Stop Media

MH Move Media

MH Set Volume

Save playlist

Load Playlist

Remove playlist

Move Playlist entry Up

Move Playlist entry Down

Remove playlist entry

Jump Position In Playlist

Shuffle

Add Media Attribute

Set Media Attribute Text

Get Attribute

Get Attributes For Media

Save Bookmark

Delete Bookmark

Rename Bookmark

Rip Disk

Get Default Ripping Info

Update Ripping Status

Abort Task

Get Ripping Status

Bind to Media Remote

Get EntAreas For Device

Set Media Private

Set Media Position

Set Auto Resume Options

Media Identified

Get ID from Filename

Specify Media Provider

Specify Capture Card Port

Refresh List of Online Devices

Check For New Files

Delete File

Make Thumbnail

Live AV Path

Retransmit AV Commands

API

StartMedia

This function has four signatures:

Signature 1

void
Media_Plugin::StartMedia(
    int                                             iPK_MediaType,
    int                                             iPK_MediaProvider,
    unsigned int                                    iPK_Device_Orbiter,
    vector<EntertainArea *>                        &vectEntertainArea,
    int                                             iPK_Device,
    int                                             iPK_DeviceTemplate,
    deque<MediaFile *>                             *p_dequeMediaFile,
    bool                                            bQueue,
    bool                                            bResume,
    int                                             iRepeat,
    string                                          sStartingPosition,
    vector<MediaStream *>                          *p_vectMediaStream = NULL
)

Signature 2

MediaStream *
Media_Plugin::StartMedia(
    MediaHandlerInfo                               *pMediaHandlerInfo,
    int                                             iPK_MediaProvider,
    unsigned int                                    PK_Device_Orbiter,
    vector<EntertainArea *>                        &vectEntertainArea,
    int                                             PK_Device_Source,
    deque<MediaFile *>                             *dequeMediaFile,
    bool                                            bQueue,
    bool                                            bResume,
    int                                             iRepeat,
    string                                          sStartingPosition,
    int                                             iPK_Playlist = 0,
    map<int, pair<MediaDevice *,MediaDevice *> >   *p_mapEntertainmentArea_OutputZone = NULL
)

Signature 3

bool
Media_Plugin::StartMedia(
    MediaStream                                    *pMediaStream,
    map<int, pair<MediaDevice *,MediaDevice *> >   *p_mapEntertainmentArea_OutputZone
)

Signature 4

bool
Media_Plugin::StartMedia(
    MediaStream                                    *pMediaStream
)

RegisterMediaPlugin