Public Member Functions | List of all members
pp::MediaSource_Samsung Class Referenceabstract

#include <media_source_samsung.h>

Inheritance diagram for pp::MediaSource_Samsung:
Inheritance graph
Collaboration diagram for pp::MediaSource_Samsung:
Collaboration graph

Public Member Functions

 MediaSource_Samsung ()
 MediaSource_Samsung (const InstanceHandle &instance)
 Cretes MediaSource_Samsung resource for given |instance|. More...
virtual ~MediaSource_Samsung ()
 Destructor. More...
bool BindToHTMLPlayer (const Var &id)
 PPB_MediaSource_Samsung API. More...
PP_SourceAddStatus AddSource (const Var &type, const Var &codecs, Var *out_id)
bool IsSourceActive (const Var &id)
void RemoveSource (const Var &id)
 Removes source of given |id| and frees associated resources with it. More...
void Append (const Var &id, const Resource &data)
void Abort (const Var &id)
 Aborts given data source. More...
void SetDuration (PP_MicrosecondsDelta duration)
PP_MicrosecondsDelta GetDuration ()
 Gets duration in microseconds of currently played stream. More...
void SetEndOfStream (PP_MediaError error)
bool SetTimestampOffset (const Var &id, PP_MicrosecondsDelta offset)
bool ReadTimeRanges (const Var &id, PP_ArrayOutput output)
PP_MicrosecondsDelta GetMediaTime ()
 Gets a current time of media. More...
PP_MediaReadyState GetReadyState ()
 Gets a ReadyState of media. More...
virtual void Error (const Var &id, PP_SourceError reason)=0
 PPP_MediaSource_Samsung API. More...
virtual void SourceOpen ()=0
 Signals activation of given data source. More...
virtual void SourceEnded ()=0
virtual void SourceClose ()=0
 Signals unaatached data source to a media elemenet. More...
virtual void AppendEnd (const Var &id)=0
- Public Member Functions inherited from pp::MediaControl_Samsung
virtual ~MediaControl_Samsung ()
 Destructor. More...
virtual void Play (PP_MicrosecondsDelta timestamp)=0
virtual void Pause ()=0
virtual void Ended (PP_MediaError error)=0
virtual void Seeking (PP_MicrosecondsDelta seekTime)=0
 Method called when played media playback time has been changed explicitly. More...
virtual void DurationChange (PP_MicrosecondsDelta duration)=0
virtual void TimeUpdate (PP_MicrosecondsDelta media_time)=0
virtual void RateChange (float playback_rate)=0
 Method called when media playback rate is changed. More...
- Public Member Functions inherited from pp::Resource
 Resource ()
 The default constructor. More...
 Resource (const Resource &other)
virtual ~Resource ()
 Destructor. More...
Resourceoperator= (const Resource &other)
bool is_null () const
PP_Resource pp_resource () const
PP_Resource detach ()

Additional Inherited Members

- Protected Member Functions inherited from pp::MediaControl_Samsung
 MediaControl_Samsung ()
- Protected Member Functions inherited from pp::Resource
 Resource (PP_Resource resource)
 Resource (PassRef, PP_Resource resource)
void PassRefFromConstructor (PP_Resource resource)

Detailed Description

Interface used by PNaCl appliction to provide chunks of multimedia data to the platform. Those chunks will be decoded and played by the platform.

This interface inherits from PPB_MediaControl_Samsung.

API is similar to one defined in JavaScript's Media Source Extensions

Definition at line 24 of file media_source_samsung.h.

Constructor & Destructor Documentation

pp::MediaSource_Samsung::MediaSource_Samsung ( )

Definition at line 27 of file media_source_samsung.h.

pp::MediaSource_Samsung::MediaSource_Samsung ( const InstanceHandle instance)

Cretes MediaSource_Samsung resource for given |instance|.

virtual pp::MediaSource_Samsung::~MediaSource_Samsung ( )


Definition at line 33 of file media_source_samsung.h.

Member Function Documentation

void pp::MediaSource_Samsung::Abort ( const Var id)

Aborts given data source.

PP_SourceAddStatus pp::MediaSource_Samsung::AddSource ( const Var type,
const Var codecs,
Var out_id 

Adds source for which data are appended using Append method. Added source is container of type |type| encoded using codecs on |codecs| list.

Returns status - PP_SourceAddStatus and |id| if status is OK.

void pp::MediaSource_Samsung::Append ( const Var id,
const Resource data 

Appends data to given buffer (identified by |id|). |data| argument must be a handle to PPB_Buffer_Dev_0_4 instance.

virtual void pp::MediaSource_Samsung::AppendEnd ( const Var id)
pure virtual
bool pp::MediaSource_Samsung::BindToHTMLPlayer ( const Var id)

PPB_MediaSource_Samsung API.

Binds given MediaSource to vide/audio object of given |id| present on HTML page on which given module is embedded.

virtual void pp::MediaSource_Samsung::Error ( const Var id,
PP_SourceError  reason 
pure virtual

PPP_MediaSource_Samsung API.

Signals error during processing given data source (e.g. decoding error).

PP_MicrosecondsDelta pp::MediaSource_Samsung::GetDuration ( )

Gets duration in microseconds of currently played stream.

PP_MicrosecondsDelta pp::MediaSource_Samsung::GetMediaTime ( )

Gets a current time of media.

PP_MediaReadyState pp::MediaSource_Samsung::GetReadyState ( )

Gets a ReadyState of media.

bool pp::MediaSource_Samsung::IsSourceActive ( const Var id)

Checks if given source is active i.e. it contains video, audio or text (subtitle) track being played

bool pp::MediaSource_Samsung::ReadTimeRanges ( const Var id,
PP_ArrayOutput  output 

|output| - An output array which will receive PP_TimeRange structures on success.

The browser can not allocate memory on behalf of the plugin becaues the plugin and browser may have different allocators. A PP_ArrayOutput must be provided so that output will be stored in its allocated buffer.

void pp::MediaSource_Samsung::RemoveSource ( const Var id)

Removes source of given |id| and frees associated resources with it.

void pp::MediaSource_Samsung::SetDuration ( PP_MicrosecondsDelta  duration)

Sets duration in microseconds of currently played stream duration is given in microseconds

void pp::MediaSource_Samsung::SetEndOfStream ( PP_MediaError  error)

Sets end of stream. |error| argument represents whether it is just end of the stream (PP_MEDIAERROR_NO_ERROR) or some kind of error occured.

bool pp::MediaSource_Samsung::SetTimestampOffset ( const Var id,
PP_MicrosecondsDelta  offset 

Sets a time offset (in microseconds) to be applied to subsequent buffers appended to the given buffer.

virtual void pp::MediaSource_Samsung::SourceClose ( )
pure virtual

Signals unaatached data source to a media elemenet.

virtual void pp::MediaSource_Samsung::SourceEnded ( )
pure virtual

Called when source is still attached to a media element, but endOfStream() has been called.

virtual void pp::MediaSource_Samsung::SourceOpen ( )
pure virtual

Signals activation of given data source.

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