You.i Engine
CYIAssetVideo Class Reference

Detailed Description

Asset representing a video.

Contains an URL to a video. This URL can be either local (using a file:// URL), or remote.

See also

#include <asset/YiAssetVideo.h>

Inheritance diagram for CYIAssetVideo:

Public Member Functions

 CYIAssetVideo ()
 CYIAssetVideo (const CYIString &path, PathType pathType=PathType::Relative)
virtual ~CYIAssetVideo ()
void SetUrl (const CYIString &path)
void SetUrl (const CYIUrl &url)
const CYIUrlGetUrl () const
- Public Member Functions inherited from CYIAsset
virtual ~CYIAsset ()
const CYIStringGetPath () const
CYIAssetLoadParamsGetLoadParameters () const
bool SetName (const CYIString &name)
const CYIStringGetName () const
bool Load ()
void Unload ()
bool IsLoaded () const
bool Equals (const std::shared_ptr< CYIAsset > &pAsset)
virtual bool Prepare ()

Protected Member Functions

virtual std::pair< size_t, size_tGetApproximateSize () const override
- Protected Member Functions inherited from CYIAsset
 CYIAsset ()
ssize_t GetID () const
void SetPath (const CYIString &path, PathType pathType)
void SetApproximateSize (size_t size)
void SetLoaded (bool assetLoaded)
void SetLoadParameters (std::unique_ptr< CYIAssetLoadParams > pParams)
virtual void OnLoad ()
virtual void OnUnload ()

Additional Inherited Members

- Public Types inherited from CYIAsset
enum  PathType {
  PathType::Absolute = 0,
- Static Protected Attributes inherited from CYIAsset
static ssize_t INVALID_ID

Constructor & Destructor Documentation

◆ CYIAssetVideo() [1/2]

CYIAssetVideo::CYIAssetVideo ( )

◆ CYIAssetVideo() [2/2]

CYIAssetVideo::CYIAssetVideo ( const CYIString path,
PathType  pathType = PathType::Relative 

◆ ~CYIAssetVideo()

virtual CYIAssetVideo::~CYIAssetVideo ( )

Member Function Documentation

◆ GetApproximateSize()

virtual std::pair<size_t, size_t> CYIAssetVideo::GetApproximateSize ( ) const

Calculates and returns the approximate number of bytes currently used by this asset. The first item of the returned pair object represents the memory currently taken in the CPU main memory, and the second item of the returned pair object represents the memory currently taken in the GPU memory.

This function only returns an approximate memory consumption as the exact memory consumption changes depending on the used C++ libraries and on the specific GPU infrastructure and drivers used by the system.

Reimplemented from CYIAsset.

◆ GetUrl()

const CYIUrl& CYIAssetVideo::GetUrl ( ) const

Returns the URL associated with this video asset.

◆ SetUrl() [1/2]

void CYIAssetVideo::SetUrl ( const CYIString path)

Sets the URL for this video to one created from the path path. The path must be absolute. The assigned URL will use the file:// scheme.

◆ SetUrl() [2/2]

void CYIAssetVideo::SetUrl ( const CYIUrl url)

Sets the URL for this video to url.

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