FMX.Media.TMediaCodecManager.CreateFromFile

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function CreateFromFile(const AFileName: string): TMedia;

C++

__classmethod TMedia* __fastcall CreateFromFile(const System::UnicodeString AFileName);

Properties

Type Visibility Source Unit Parent
function public
FMX.Media.pas
FMX.Media.hpp
FMX.Media TMediaCodecManager

Description

Creates a TMedia from a given file.

The AFileName parameter specifies the name of the file from which to create the TMedia.

If no codec is found to support the AFileName extension, then CreateFromFile returns nil for Delphi and NULL for C++.

Use CreateFromFile instead of explicitly calling a TMedia constructor.

See Also