AVPKit
com::avpkit::core::IProperty Class Referenceabstract

Represents settable properties that effect how AVPKit objects operate. More...

#include <IProperty.h>

Inheritance diagram for com::avpkit::core::IProperty:
Collaboration diagram for com::avpkit::core::IProperty:

Public Types

enum  Type {
  PROPERTY_FLAGS , PROPERTY_INT , PROPERTY_INT64 , PROPERTY_DOUBLE ,
  PROPERTY_FLOAT , PROPERTY_STRING , PROPERTY_RATIONAL , PROPERTY_BINARY ,
  PROPERTY_DICT , PROPERTY_UINT64 , PROPERTY_CONST , PROPERTY_IMAGE_SIZE ,
  PROPERTY_PIXEL_FMT , PROPERTY_SAMPLE_FMT , PROPERTY_VIDEO_RATE , PROPERTY_DURATION ,
  PROPERTY_COLOR , PROPERTY_CHANNEL_LAYOUT , PROPERTY_BOOL , PROPERTY_UNKNOWN =-1
}
 The different type of options that are supported by AVPKit. More...
 
enum  Flags {
  FLAG_ENCODING_PARAM =1 , FLAG_DECODING_PARAM =2 , FLAG_METADATA =4 , FLAG_AUDIO_PARAM =8 ,
  FLAG_VIDEO_PARAM =16 , FLAG_SUBTITLE_PARAM =32 , FLAG_EXPORT =64 , FLAG_READONLY =128 ,
  FLAG_FILTERING_PARAM =(1<<16)
}
 
enum  Search { PROPERTY_SEARCH_DEFAULT =0x0000 , PROPERTY_SEARCH_CHILDREN =0x0001 }
 How to search options when looking for different values. More...
 

Public Member Functions

virtual const char * getName ()=0
 Get the name for this property. More...
 
virtual const char * getHelp ()=0
 Get the (English) help string for this property. More...
 
virtual const char * getUnit ()=0
 Get any sub-unit this option or constant belongs to. More...
 
virtual Type getType ()=0
 Get the underlying native type of this property. More...
 
virtual int32_t getFlags ()=0
 Get any set flags (a bitmask) for this option. More...
 
virtual int64_t getDefault ()=0
 Get the default setting this flag would have it not set. More...
 
virtual double getDefaultAsDouble ()=0
 Get the default setting this flag would have it not set. More...
 
virtual int32_t getNumFlagSettings ()=0
 If this IProperty is of the type Type#PROPERTY_FLAGS, this method will tell you how many different flag settings it takes. More...
 
virtual IPropertygetFlagConstant (int32_t position)=0
 If this IProperty is of the type Type#PROPERTY_FLAGS, this method will give you another IProperty representing a constant setting for that flag. More...
 
virtual IPropertygetFlagConstant (const char *name)=0
 If this IProperty is of the type Type#PROPERTY_FLAGS, this method will give you another IProperty representing a constant setting for that flag. More...
 
- Public Member Functions inherited from com::avpkit::ferry::RefCounted
virtual int32_t acquire ()
 Internal Only. More...
 
virtual int32_t release ()
 Internal Only. More...
 
virtual RefCountedcopyReference ()
 Create a new Java object that refers to the same native object. More...
 
virtual int32_t getCurrentRefCount ()
 Return the current reference count on this object. More...
 
void setJavaAllocator (void *allocator)
 This method is public but not part of the standard API. More...
 
void * getJavaAllocator ()
 This method is public but not part of the standard API. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com::avpkit::ferry::RefCounted
virtual void destroy ()
 This method is called by RefCounted objects when their Ref Count reaches zero and they are about to be destroyed.
 
- Protected Attributes inherited from com::avpkit::ferry::RefCounted
AtomicIntegermRefCount
 This is the internal reference count, represented as an AtomicInteger to make sure it is thread safe.
 
void * mAllocator
 Not part of public API.
 

Detailed Description

Represents settable properties that effect how AVPKit objects operate.

For example, setting the "b" property on an IStreamCoder sets the bit-rate the coder will attempt to encode at.

Definition at line 36 of file IProperty.h.

Member Enumeration Documentation

◆ Search

How to search options when looking for different values.

Enumerator
PROPERTY_SEARCH_DEFAULT 

Do not search child options.

PROPERTY_SEARCH_CHILDREN 

Search children first.

Definition at line 82 of file IProperty.h.

82  {
87  } Search;
Search
How to search options when looking for different values.
Definition: IProperty.h:82
@ PROPERTY_SEARCH_DEFAULT
Do not search child options.
Definition: IProperty.h:84
@ PROPERTY_SEARCH_CHILDREN
Search children first.
Definition: IProperty.h:86

◆ Type

The different type of options that are supported by AVPKit.

Well, actually by FFMPEG, but you get the idea. see opt.h

Enumerator
PROPERTY_BINARY 

offset must point to a pointer immediately followed by an int for the length

PROPERTY_IMAGE_SIZE 

offset must point to two consecutive integers

PROPERTY_VIDEO_RATE 

offset must point to AVRational

Definition at line 44 of file IProperty.h.

44  {
45  PROPERTY_FLAGS,
46  PROPERTY_INT,
47  PROPERTY_INT64,
48  PROPERTY_DOUBLE,
49  PROPERTY_FLOAT,
50  PROPERTY_STRING,
51  PROPERTY_RATIONAL,
53  PROPERTY_DICT,
54  PROPERTY_UINT64,
55  PROPERTY_CONST,
57  PROPERTY_PIXEL_FMT,
58  PROPERTY_SAMPLE_FMT,
60  PROPERTY_DURATION,
61  PROPERTY_COLOR,
62  PROPERTY_CHANNEL_LAYOUT,
63  PROPERTY_BOOL,
64  PROPERTY_UNKNOWN=-1,
65  } Type;
Type
The different type of options that are supported by AVPKit.
Definition: IProperty.h:44
@ PROPERTY_IMAGE_SIZE
offset must point to two consecutive integers
Definition: IProperty.h:56
@ PROPERTY_BINARY
offset must point to a pointer immediately followed by an int for the length
Definition: IProperty.h:52
@ PROPERTY_VIDEO_RATE
offset must point to AVRational
Definition: IProperty.h:59

Member Function Documentation

◆ getDefault()

virtual int64_t com::avpkit::core::IProperty::getDefault ( )
pure virtual

Get the default setting this flag would have it not set.

Returns
the default

Implemented in com::avpkit::core::Property.

◆ getDefaultAsDouble()

virtual double com::avpkit::core::IProperty::getDefaultAsDouble ( )
pure virtual

Get the default setting this flag would have it not set.

Returns
the default

Implemented in com::avpkit::core::Property.

◆ getFlagConstant() [1/2]

virtual IProperty* com::avpkit::core::IProperty::getFlagConstant ( const char *  name)
pure virtual

If this IProperty is of the type Type#PROPERTY_FLAGS, this method will give you another IProperty representing a constant setting for that flag.

Parameters
nameThe name of the constant.
Returns
An IProperty object for the flag setting, or null if not available.

Implemented in com::avpkit::core::Property.

◆ getFlagConstant() [2/2]

virtual IProperty* com::avpkit::core::IProperty::getFlagConstant ( int32_t  position)
pure virtual

If this IProperty is of the type Type#PROPERTY_FLAGS, this method will give you another IProperty representing a constant setting for that flag.

Parameters
positionThe position number for the flag; Must be in range 0 <= position <= getNumFlagSettings().
Returns
An IProperty object for the flag setting, or null if not available.

Implemented in com::avpkit::core::Property.

◆ getFlags()

virtual int32_t com::avpkit::core::IProperty::getFlags ( )
pure virtual

Get any set flags (a bitmask) for this option.

Returns
the flags

Implemented in com::avpkit::core::Property.

◆ getHelp()

virtual const char* com::avpkit::core::IProperty::getHelp ( )
pure virtual

Get the (English) help string for this property.

Returns
the help string

Implemented in com::avpkit::core::Property.

◆ getName()

virtual const char* com::avpkit::core::IProperty::getName ( )
pure virtual

Get the name for this property.

Returns
the name.

Implemented in com::avpkit::core::Property.

◆ getNumFlagSettings()

virtual int32_t com::avpkit::core::IProperty::getNumFlagSettings ( )
pure virtual

If this IProperty is of the type Type#PROPERTY_FLAGS, this method will tell you how many different flag settings it takes.

Returns
Number of flag settings, or <0 if not a FLAGS value

Implemented in com::avpkit::core::Property.

◆ getType()

virtual Type com::avpkit::core::IProperty::getType ( )
pure virtual

Get the underlying native type of this property.

Returns
the type

Implemented in com::avpkit::core::Property.

◆ getUnit()

virtual const char* com::avpkit::core::IProperty::getUnit ( )
pure virtual

Get any sub-unit this option or constant belongs to.

Returns
the unit, or null if none.

Implemented in com::avpkit::core::Property.


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