OGMRip Reference Manual | ||||
---|---|---|---|---|
#include <ogmrip-plugin.h> OGMRipVideoPlugin; OGMRipAudioPlugin; OGMRipSubpPlugin; OGMRipContainerPlugin; void (*OGMRipPluginFunc) (GType type, const gchar *name, const gchar *description, gpointer data); gint (*OGMRipPluginCmpFunc) (GType type, const gchar *name, const gchar *description, gconstpointer data); enum OGMRipPluginError; void ogmrip_plugin_init (void); void ogmrip_plugin_uninit (void); gint ogmrip_plugin_get_n_containers (void); void ogmrip_plugin_foreach_container (OGMRipPluginFunc func, gpointer data); GType ogmrip_plugin_find_container (OGMRipPluginCmpFunc func, gconstpointer data); GType ogmrip_plugin_get_nth_container (guint n); gchar* ogmrip_plugin_get_container_name (GType container); gint ogmrip_plugin_get_container_index (GType container); gboolean ogmrip_plugin_get_container_bframes (GType container); GModule* ogmrip_plugin_get_container_module (GType container); gint ogmrip_plugin_get_container_max_audio (GType container); gint ogmrip_plugin_get_container_max_subp (GType container); GType ogmrip_plugin_get_container_by_name (const gchar *name); gint ogmrip_plugin_get_n_video_codecs (void); void ogmrip_plugin_foreach_video_codec (OGMRipPluginFunc func, gpointer data); GType ogmrip_plugin_find_video_codec (OGMRipPluginCmpFunc func, gconstpointer data); GType ogmrip_plugin_get_nth_video_codec (guint n); gchar* ogmrip_plugin_get_video_codec_name (GType codec); gint ogmrip_plugin_get_video_codec_index (GType codec); gint ogmrip_plugin_get_video_codec_format (GType codec); gint ogmrip_plugin_get_video_codec_passes (GType codec); gint ogmrip_plugin_get_video_codec_threads (GType codec); GModule* ogmrip_plugin_get_video_codec_module (GType codec); GType ogmrip_plugin_get_video_codec_by_name (const gchar *name); gint ogmrip_plugin_get_n_audio_codecs (void); void ogmrip_plugin_foreach_audio_codec (OGMRipPluginFunc func, gpointer data); GType ogmrip_plugin_find_audio_codec (OGMRipPluginCmpFunc func, gconstpointer data); GType ogmrip_plugin_get_nth_audio_codec (guint n); gchar* ogmrip_plugin_get_audio_codec_name (GType codec); gint ogmrip_plugin_get_audio_codec_index (GType codec); gint ogmrip_plugin_get_audio_codec_format (GType codec); GModule* ogmrip_plugin_get_audio_codec_module (GType codec); GType ogmrip_plugin_get_audio_codec_by_name (const gchar *name); gint ogmrip_plugin_get_n_subp_codecs (void); void ogmrip_plugin_foreach_subp_codec (OGMRipPluginFunc func, gpointer data); GType ogmrip_plugin_find_subp_codec (OGMRipPluginCmpFunc func, gconstpointer data); GType ogmrip_plugin_get_nth_subp_codec (guint n); gchar* ogmrip_plugin_get_subp_codec_name (GType codec); gint ogmrip_plugin_get_subp_codec_index (GType codec); gint ogmrip_plugin_get_subp_codec_format (GType codec); gboolean ogmrip_plugin_get_subp_codec_text (GType codec); GModule* ogmrip_plugin_get_subp_codec_module (GType codec); GType ogmrip_plugin_get_subp_codec_by_name (const gchar *name); gboolean ogmrip_plugin_can_contain_video (GType container, GType codec); gboolean ogmrip_plugin_can_contain_audio (GType container, GType codec); gboolean ogmrip_plugin_can_contain_subp (GType container, GType codec); gboolean ogmrip_plugin_can_contain_format (GType container, OGMRipFormatType format); gboolean ogmrip_plugin_can_contain_n_audio (GType container, guint ncodec); gboolean ogmrip_plugin_can_contain_n_subp (GType container, guint ncodec);
typedef struct { GModule *module; GType type; gchar *name; gchar *description; OGMRipFormatType format; gint passes; gint threads; } OGMRipVideoPlugin;
A structure describing a video codec plugin
GModule * |
For internal use only |
GType |
The type of the codec |
gchar * |
The name of the codec |
gchar * |
The description of the codec |
OGMRipFormatType |
The codec output format |
gint |
The number of passes supported by the codec |
gint |
The number of threads supported by the codec |
typedef struct { GModule *module; GType type; gchar *name; gchar *description; OGMRipFormatType format; } OGMRipAudioPlugin;
A structure describing an audio codec plugin
GModule * |
For internal use only |
GType |
The type of the codec |
gchar * |
The name of the codec |
gchar * |
The description of the codec |
OGMRipFormatType |
The codec output format |
typedef struct { GModule *module; GType type; gchar *name; gchar *description; OGMRipFormatType format; gboolean text; } OGMRipSubpPlugin;
A structure describing a subtitle codec plugin
typedef struct { GModule *module; GType type; gchar *name; gchar *description; gboolean video; gboolean bframes; gint max_audio; gint max_subp; gint *formats; } OGMRipContainerPlugin;
A structure describing a container plugin
GModule * |
For internal use only |
GType |
The type of the container |
gchar * |
The name of the container |
gchar * |
The description of the container |
gboolean |
Whether the container requires a video stream |
gboolean |
Whether the container supports B-frames |
gint |
The maximum number of audio streams that can be embedded in the container |
gint |
The maximum number of subtitle streams that can be embedded in the container |
gint * |
A NULL terminated array of OGMRipFormatType supported by the container |
void (*OGMRipPluginFunc) (GType type, const gchar *name, const gchar *description, gpointer data);
Specifies the type of functions passed to ogmrip_plugin_foreach_container()
,
ogmrip_plugin_foreach_video_codec()
, ogmrip_plugin_foreach_audio_codec()
,
and ogmrip_plugin_foreach_subp_codec()
.
|
The type of the plugin |
|
The name of the plugin |
|
The description of the plugin |
|
The user data |
gint (*OGMRipPluginCmpFunc) (GType type, const gchar *name, const gchar *description, gconstpointer data);
Specifieѕ the type of functions passed to ogmrip_plugin_find_container()
,
ogmrip_plugin_find_video_codec()
, ogmrip_plugin_find_audio_codec()
, and
ogmrip_plugin_find_subp_codec()
.
|
The type of the plugin |
|
The name of the plugin |
|
The description of the plugin |
|
The user data |
Returns : |
0 when the expected plugin is found |
typedef enum { OGMRIP_PLUGIN_ERROR_REQ } OGMRipPluginError;
Error codes returned by ogmrip_init_plugin()
.
gint ogmrip_plugin_get_n_containers (void);
Gets the number of container plugins.
Returns : |
the number of container plugins |
void ogmrip_plugin_foreach_container (OGMRipPluginFunc func, gpointer data);
Calls a function for each container plugin.
|
The function to call with each container plugin's data |
|
User data to pass to the function |
GType ogmrip_plugin_find_container (OGMRipPluginCmpFunc func, gconstpointer data);
Finds a container using the supplied function.
|
The function to call for each container plugin. It should return 0 when the desired container is found |
|
User data passed to the function |
Returns : |
The type of the container, or G_TYPE_NONE
|
GType ogmrip_plugin_get_nth_container (guint n);
Gets the container at the given position.
|
The index of the container |
Returns : |
The type of the container, or G_TYPE_NONE
|
gchar* ogmrip_plugin_get_container_name (GType container);
Gets the name of the given container.
|
A container type |
Returns : |
The name of the container, or NULL |
gint ogmrip_plugin_get_container_index (GType container);
Gets the position of the given container.
|
A container type |
Returns : |
The index of the container, or -1 |
gboolean ogmrip_plugin_get_container_bframes (GType container);
Gets whether the given container supports B-frames
|
A container type |
Returns : |
TRUE if the container supports B-frames
|
GModule* ogmrip_plugin_get_container_module (GType container);
Gets the GModule associated with container
.
|
A container type |
Returns : |
A GModule, or NULL |
gint ogmrip_plugin_get_container_max_audio (GType container);
Returns the number of audio streams the given container can contain.
|
A container type |
Returns : |
the number of audio streams, or -1 |
gint ogmrip_plugin_get_container_max_subp (GType container);
Returns the number of subtitle streams the given container can contain.
|
A container type |
Returns : |
the number of subtitle streams, or -1 |
GType ogmrip_plugin_get_container_by_name (const gchar *name);
Gets the container with the given name.
|
The name of the container |
Returns : |
The type of the container, or G_TYPE_NONE
|
gint ogmrip_plugin_get_n_video_codecs (void);
Gets the number of video codec plugins.
Returns : |
the number of video codec plugins |
void ogmrip_plugin_foreach_video_codec (OGMRipPluginFunc func, gpointer data);
Calls a function for each video codec plugin.
|
The function to call with each video codec plugin's data |
|
User data to pass to the function |
GType ogmrip_plugin_find_video_codec (OGMRipPluginCmpFunc func, gconstpointer data);
Finds a video codec using the supplied function.
|
The function to call for each video codec plugin. It should return 0 when the desired video codec is found |
|
User data passed to the function |
Returns : |
The type of the video codec, or G_TYPE_NONE
|
GType ogmrip_plugin_get_nth_video_codec (guint n);
Gets the video codec at the given position.
|
The index of the video codec |
Returns : |
The type of the video codec, or G_TYPE_NONE
|
gchar* ogmrip_plugin_get_video_codec_name (GType codec);
Gets the name of the given video codec.
|
A video codec type |
Returns : |
The name of the video codec, or NULL |
gint ogmrip_plugin_get_video_codec_index (GType codec);
Gets the position of the given video codec.
|
A video codec type |
Returns : |
The index of the video codec, or -1 |
gint ogmrip_plugin_get_video_codec_format (GType codec);
Gets the format of the given video codec.
|
A video codec type |
Returns : |
The format of the video codec, or NULL |
gint ogmrip_plugin_get_video_codec_passes (GType codec);
Gets the maximum number of passes the given video codec supports.
|
A video codec type |
Returns : |
The maximum number of passes, or -1 |
gint ogmrip_plugin_get_video_codec_threads (GType codec);
Gets the maximum number of threads the given video codec supports.
|
A video codec type |
Returns : |
The maximum number of threads, or -1 |
GModule* ogmrip_plugin_get_video_codec_module (GType codec);
Gets the GModule associated with codec
.
|
A video codec type |
Returns : |
A GModule, or NULL |
GType ogmrip_plugin_get_video_codec_by_name (const gchar *name);
Gets the video codec with the given name.
|
The name of the video codec |
Returns : |
The type of the video codec, or G_TYPE_NONE
|
gint ogmrip_plugin_get_n_audio_codecs (void);
Gets the number of audio codec plugins.
Returns : |
the number of audio codec plugins |
void ogmrip_plugin_foreach_audio_codec (OGMRipPluginFunc func, gpointer data);
Calls a function for each plugin.
|
The function to call with each plugin's data |
|
User data to pass to the function |
GType ogmrip_plugin_find_audio_codec (OGMRipPluginCmpFunc func, gconstpointer data);
Finds a audio codec using the supplied function.
|
The function to call for each audio codec plugin. It should return 0 when the desired audio codec is found |
|
User data passed to the function |
Returns : |
The type of the audio codec, or G_TYPE_NONE
|
GType ogmrip_plugin_get_nth_audio_codec (guint n);
Gets the audio codec at the given position.
|
The index of the audio codec |
Returns : |
The type of the audio codec, or G_TYPE_NONE
|
gchar* ogmrip_plugin_get_audio_codec_name (GType codec);
Gets the name of the given audio codec.
|
An audio codec type |
Returns : |
The name of the audio codec, or NULL |
gint ogmrip_plugin_get_audio_codec_index (GType codec);
Gets the position of the given audio codec.
|
An audio codec type |
Returns : |
The index of the audio codec, or -1 |
gint ogmrip_plugin_get_audio_codec_format (GType codec);
Gets the format of the given audio codec.
|
A audio codec type |
Returns : |
The format of the audio codec, or NULL |
GModule* ogmrip_plugin_get_audio_codec_module (GType codec);
Gets the GModule associated with codec
.
|
A audio codec type |
Returns : |
A GModule, or NULL |
GType ogmrip_plugin_get_audio_codec_by_name (const gchar *name);
Gets the audio codec with the given name.
|
The name of the audio codec |
Returns : |
The type of the audio codec, or G_TYPE_NONE
|
gint ogmrip_plugin_get_n_subp_codecs (void);
Gets the number of subtitle codec plugins.
Returns : |
the number of subtitle codec plugins |
void ogmrip_plugin_foreach_subp_codec (OGMRipPluginFunc func, gpointer data);
Calls a function for each plugin.
|
The function to call with each plugin's data |
|
User data to pass to the function |
GType ogmrip_plugin_find_subp_codec (OGMRipPluginCmpFunc func, gconstpointer data);
Finds a subtitle codec using the supplied function.
|
The function to call for each subtitle codec plugin. It should return 0 when the desired subtitle codec is found |
|
User data passed to the function |
Returns : |
The type of the subtitle codec, or G_TYPE_NONE
|
GType ogmrip_plugin_get_nth_subp_codec (guint n);
Gets the subtitle codec at the given position.
|
The index of the subtitle codec |
Returns : |
The type of the subtitle codec, or G_TYPE_NONE
|
gchar* ogmrip_plugin_get_subp_codec_name (GType codec);
Gets the name of the given subtitle codec.
|
A subtitle codec type |
Returns : |
The name of the subtitle codec, or NULL |
gint ogmrip_plugin_get_subp_codec_index (GType codec);
Gets the position of the given subtitle codec.
|
A subtitle codec type |
Returns : |
The index of the subtitle codec, or -1 |
gint ogmrip_plugin_get_subp_codec_format (GType codec);
Gets the format of the given subtitle codec.
|
A subtitle codec type |
Returns : |
The format of the subtitle codec, or NULL |
gboolean ogmrip_plugin_get_subp_codec_text (GType codec);
Gets whether the given codec outputs text subtitles.
|
A subtitle codec type |
Returns : |
TRUE if the codec output text subtitles
|
GModule* ogmrip_plugin_get_subp_codec_module (GType codec);
Gets the GModule associated with codec
.
|
A subp codec type |
Returns : |
A GModule, or NULL |
GType ogmrip_plugin_get_subp_codec_by_name (const gchar *name);
Gets the subp codec with the given name.
|
The name of the subp codec |
Returns : |
The type of the subp codec, or G_TYPE_NONE
|
gboolean ogmrip_plugin_can_contain_video (GType container, GType codec);
Returns whether container
supports the given video codec.
|
A container type |
|
A video codec type |
Returns : |
TRUE if container supports type
|
gboolean ogmrip_plugin_can_contain_audio (GType container, GType codec);
Returns whether container
supports the given audio codec.
|
A container type |
|
An audio codec type |
Returns : |
TRUE if container supports type
|
gboolean ogmrip_plugin_can_contain_subp (GType container, GType codec);
Returns whether container
supports the given subtitle codec.
|
A container type |
|
A subtitle codec type |
Returns : |
TRUE if container supports type
|
gboolean ogmrip_plugin_can_contain_format (GType container, OGMRipFormatType format);
Returns whether container
supports the given format.
|
A container type |
|
An OGMRipFormatType |
Returns : |
TRUE if container supports format
|
gboolean ogmrip_plugin_can_contain_n_audio (GType container, guint ncodec);
Returns whether container
can contain ncodec
audio streams.
|
A container type |
|
The number of audio codecs |
Returns : |
TRUE if container can contain ncodec audio streams
|
gboolean ogmrip_plugin_can_contain_n_subp (GType container, guint ncodec);
Returns whether container
can contain ncodec
subtitle streams.
|
A container type |
|
The number of subtitle codecs |
Returns : |
TRUE if container can contain ncodec subtitle streams
|