![]() |
![]() |
![]() |
OGMRip Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <ogmrip-file.h> OGMRipFile; OGMRipVideoFile; OGMRipAudioFile; OGMRipSubpFile; enum OGMRipFileType; enum OGMRipFileError; #define OGMRIP_FILE_ERROR void ogmrip_file_ref (OGMRipFile *file
); void ogmrip_file_unref (OGMRipFile *file
); gint ogmrip_file_get_type (OGMRipFile *file
); gint ogmrip_file_get_format (OGMRipFile *file
); gint64 ogmrip_file_get_size (OGMRipFile *file
); gchar * ogmrip_file_get_filename (OGMRipFile *file
); void ogmrip_file_set_language (OGMRipFile *file
,gint lang
); gint ogmrip_file_get_language (OGMRipFile *file
); void ogmrip_file_set_unlink_on_unref (OGMRipFile *file
,gboolean do_unlink
); gboolean ogmrip_file_get_unlink_on_unref (OGMRipFile *file
); OGMRipFile * ogmrip_video_file_new (const gchar *filename
,GError **error
); gint ogmrip_video_file_get_bitrate (OGMRipVideoFile *video
); gdouble ogmrip_video_file_get_length (OGMRipVideoFile *video
); void ogmrip_video_file_get_size (OGMRipVideoFile *video
,guint *width
,guint *height
); gdouble ogmrip_video_file_get_framerate (OGMRipVideoFile *video
); gdouble ogmrip_video_file_get_aspect_ratio (OGMRipVideoFile *video
); OGMRipFile * ogmrip_audio_file_new (const gchar *filename
,GError **error
); gint ogmrip_audio_file_get_bitrate (OGMRipAudioFile *audio
); gdouble ogmrip_audio_file_get_length (OGMRipAudioFile *audio
); gint ogmrip_audio_file_get_sample_rate (OGMRipAudioFile *audio
); gint ogmrip_audio_file_get_samples_per_frame (OGMRipAudioFile *audio
); gint ogmrip_audio_file_get_channels (OGMRipAudioFile *audio
); OGMRipFile * ogmrip_subp_file_new (const gchar *filename
,GError **error
); gint ogmrip_subp_file_get_charset (OGMRipSubpFile *subp
);
typedef enum { OGMRIP_FILE_TYPE_VIDEO, OGMRIP_FILE_TYPE_AUDIO, OGMRIP_FILE_TYPE_SUBP } OGMRipFileType;
The stream type of the file.
typedef enum { OGMRIP_FILE_ERROR_UNKNOWN, OGMRIP_FILE_ERROR_RANGE, OGMRIP_FILE_ERROR_BITRATE, OGMRIP_FILE_ERROR_RATE, OGMRIP_FILE_ERROR_LENGTH, OGMRIP_FILE_ERROR_FORMAT, OGMRIP_FILE_ERROR_WIDTH, OGMRIP_FILE_ERROR_HEIGHT, OGMRIP_FILE_ERROR_ASPECT, OGMRIP_FILE_ERROR_FPS } OGMRipFileError;
Error codes returned by OGMRipFile functions.
Unknown error | |
Range error | |
Impossible to get bitrate | |
Impossible to get rate | |
Impossible to get length | |
Impossible to get format | |
Impossible to get width | |
Impossible to get height | |
Impossible to get aspect | |
Impossible to get fps |
#define OGMRIP_FILE_ERROR ogmrip_file_error_quark ()
Error domain for file operations. Errors in this domain will be from the OGMRipFileError enumeration. See GError for information on error domains.
void ogmrip_file_ref (OGMRipFile *file
);
Increments the reference count of an OGMRipFile.
|
an OGMRipFile |
void ogmrip_file_unref (OGMRipFile *file
);
Decrements the reference count of an OGMRipFile.
|
an OGMRipFile |
gint ogmrip_file_get_type (OGMRipFile *file
);
Gets the type of a file.
|
An OGMRipFile |
Returns : |
An OGMRipFileType, or -1 |
gint ogmrip_file_get_format (OGMRipFile *file
);
Gets the format of a file.
|
An OGMRipFile |
Returns : |
An OGMRipFormatType, or -1 |
gint64 ogmrip_file_get_size (OGMRipFile *file
);
Gets the size of a file in bytes.
|
An OGMRipFile |
Returns : |
The file size, or -1 |
gchar * ogmrip_file_get_filename (OGMRipFile *file
);
Gets the filename of a file.
|
An OGMRipFile |
Returns : |
The filename, or NULL |
void ogmrip_file_set_language (OGMRipFile *file
,gint lang
);
Sets the language of a file.
|
An OGMRipFile |
|
A language code |
gint ogmrip_file_get_language (OGMRipFile *file
);
Gets the language of a file.
|
An OGMRipFile |
Returns : |
A language code, or -1 |
void ogmrip_file_set_unlink_on_unref (OGMRipFile *file
,gboolean do_unlink
);
Sets whether the file will be unlinked when file
receives its final unref
and is destroyed.
|
An OGMRipFile |
|
Whether the file will be closed on the final unref of file
|
gboolean ogmrip_file_get_unlink_on_unref (OGMRipFile *file
);
Gets whether the file will be unlinked when file
receives its final unref
and is destroyed.
|
An OGMRipFile |
Returns : |
Whether the channel will be closed on the final unref |
OGMRipFile * ogmrip_video_file_new (const gchar *filename
,GError **error
);
Creates a new OGMRipVideoFile from a video file.
|
A filename |
|
A location to return an error of type OGMRIP_FILE_ERROR |
Returns : |
The new OGMRipVideoFile |
gint ogmrip_video_file_get_bitrate (OGMRipVideoFile *video
);
Gets the bitrate of a video file.
|
An OGMRipVideoFile |
Returns : |
The bitrate, or -1 |
gdouble ogmrip_video_file_get_length (OGMRipVideoFile *video
);
Gets the length in seconds of a video file.
|
An OGMRipVideoFile |
Returns : |
The length, or -1.0 |
void ogmrip_video_file_get_size (OGMRipVideoFile *video
,guint *width
,guint *height
);
Gets the dimension of a video file.
|
An OGMRipVideoFile |
|
A pointer to store the width, or NULL |
|
A pointer to store the height, or NULL |
gdouble ogmrip_video_file_get_framerate (OGMRipVideoFile *video
);
Gets the framerate of a video file.
|
An OGMRipVideoFile |
Returns : |
The framerate, or -1 |
gdouble ogmrip_video_file_get_aspect_ratio (OGMRipVideoFile *video
);
Gets the aspect ratio of a video file.
|
An OGMRipVideoFile |
Returns : |
The aspect ratio, or -1 |
OGMRipFile * ogmrip_audio_file_new (const gchar *filename
,GError **error
);
Creates a new OGMRipAudioFile from au audio file.
|
A filename |
|
A location to return an error of type OGMRIP_FILE_ERROR |
Returns : |
The new OGMRipAudioFile |
gint ogmrip_audio_file_get_bitrate (OGMRipAudioFile *audio
);
Gets the bitrate of an audio file.
|
An OGMRipAudioFile |
Returns : |
The bitrate, or -1 |
gdouble ogmrip_audio_file_get_length (OGMRipAudioFile *audio
);
Gets the length in seconds of an audio file.
|
An OGMRipAudioFile |
Returns : |
The length, or -1.0 |
gint ogmrip_audio_file_get_sample_rate (OGMRipAudioFile *audio
);
Gets the sample rate of an audio file.
|
An OGMRipAudioFile |
Returns : |
The sample rate, or -1 |
gint ogmrip_audio_file_get_samples_per_frame
(OGMRipAudioFile *audio
);
Gets the number of samples per frame of an audio file.
|
An OGMRipAudioFile |
Returns : |
The number of samples per frame, or -1 |
gint ogmrip_audio_file_get_channels (OGMRipAudioFile *audio
);
Gets the number of channels of an audio file.
|
An OGMRipAudioFile |
Returns : |
an OGMDvdAudioChannels, or -1 |
OGMRipFile * ogmrip_subp_file_new (const gchar *filename
,GError **error
);
Creates a new OGMRipSubpFile from a subtitle file.
|
A filename |
|
A location to return an error of type OGMRIP_FILE_ERROR |
Returns : |
The new OGMRipSubpFile |
gint ogmrip_subp_file_get_charset (OGMRipSubpFile *subp
);
Gets the character set of a subtitle file.
|
An OGMRipSubpFile |
Returns : |
The OGMRipCharset, or -1 |