![]() |
![]() |
![]() |
OGMRip Reference Manual | ![]() |
---|---|---|---|---|
#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); 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); 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.
#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.
file : |
an OGMRipFile |
void ogmrip_file_unref (OGMRipFile *file);
Decrements the reference count of an OGMRipFile.
file : |
an OGMRipFile |
gint ogmrip_file_get_type (OGMRipFile *file);
Gets the type of a file.
file : |
An OGMRipFile |
Returns : | An OGMRipFileType, or -1 |
gint ogmrip_file_get_format (OGMRipFile *file);
Gets the format of a file.
file : |
An OGMRipFile |
Returns : | An OGMRipFormatType, or -1 |
gint64 ogmrip_file_get_size (OGMRipFile *file);
Gets the size of a file in bytes.
file : |
An OGMRipFile |
Returns : | The file size, or -1 |
gchar* ogmrip_file_get_filename (OGMRipFile *file);
Gets the filename of a file.
file : |
An OGMRipFile |
Returns : | The filename, or NULL |
void ogmrip_file_set_language (OGMRipFile *file, gint lang);
Sets the language of a file.
file : |
An OGMRipFile |
lang : |
A language code |
gint ogmrip_file_get_language (OGMRipFile *file);
Gets the language of a file.
file : |
An OGMRipFile |
Returns : | A language code, or -1 |
OGMRipFile* ogmrip_video_file_new (const gchar *filename, GError **error);
Creates a new OGMRipVideoFile from a video file.
filename : |
A filename |
error : |
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.
video : |
An OGMRipVideoFile |
Returns : | The bitrate, or -1 |
gdouble ogmrip_video_file_get_length (OGMRipVideoFile *video);
Gets the length in seconds of a video file.
video : |
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.
video : |
An OGMRipVideoFile |
width : |
A pointer to store the width, or NULL |
height : |
A pointer to store the height, or NULL |
gdouble ogmrip_video_file_get_framerate (OGMRipVideoFile *video);
Gets the framerate of a video file.
video : |
An OGMRipVideoFile |
Returns : | The framerate, or -1 |
gdouble ogmrip_video_file_get_aspect_ratio (OGMRipVideoFile *video);
Gets the aspect ratio of a video file.
video : |
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.
filename : |
A filename |
error : |
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.
audio : |
An OGMRipAudioFile |
Returns : | The bitrate, or -1 |
gdouble ogmrip_audio_file_get_length (OGMRipAudioFile *audio);
Gets the length in seconds of an audio file.
audio : |
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.
audio : |
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.
audio : |
An OGMRipAudioFile |
Returns : | The number of samples per frame, or -1 |
OGMRipFile* ogmrip_subp_file_new (const gchar *filename, GError **error);
Creates a new OGMRipSubpFile from a subtitle file.
filename : |
A filename |
error : |
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.
subp : |
An OGMRipSubpFile |
Returns : | The OGMRipCharset, or -1 |