rb-gst-media-types

## rb-gst-media-types rb-gst-media-types |

## Synopsis

    #define             RB_GST_MEDIA_TYPE_MP3
    #define             RB_GST_MEDIA_TYPE_OGG_VORBIS
    #define             RB_GST_MEDIA_TYPE_FLAC
    #define             RB_GST_MEDIA_TYPE_AAC
    enum                RBGstMediaType;
    char *              rb_gst_caps_to_media_type           (const GstCaps *caps);
    GstCaps *           rb_gst_media_type_to_caps           (const char *media_type);
    const char *        rb_gst_media_type_to_extension      (const char *media_type);
    const char *        rb_gst_mime_type_to_media_type      (const char *mime_type);
    const char *        rb_gst_media_type_to_mime_type      (const char *media_type);
    RBGstMediaType      rb_gst_get_missing_plugin_type      (const GstStructure *structure);
    GstEncodingTarget * rb_gst_get_default_encoding_target  (void);
    GstEncodingProfile * rb_gst_get_encoding_profile        (const char *media_type);
    gboolean            rb_gst_media_type_matches_profile   (GstEncodingProfile *profile,
                                                             const char *media_type);
    char *              rb_gst_encoding_profile_get_media_type
                                                            (GstEncodingProfile *profile);
    gboolean            rb_gst_media_type_is_lossless       (const char *media_type);
    char **             rb_gst_encoding_profile_get_settings
                                                            (GstEncodingProfile *profile,
                                                             const char *style);
    char **             rb_gst_encoding_profile_get_presets (GstEncodingProfile *profile);
    void                rb_gst_encoding_profile_set_preset  (GstEncodingProfile *profile,
                                                             const char *preset);
    GstElement *        rb_gst_encoding_profile_get_encoder (GstEncodingProfile *profile);

## Description

## Details

### RB_GST_MEDIA_TYPE_MP3

    #define RB_GST_MEDIA_TYPE_MP3		"audio/mpeg"

### RB_GST_MEDIA_TYPE_OGG_VORBIS

    #define RB_GST_MEDIA_TYPE_OGG_VORBIS 	"audio/x-vorbis"

### RB_GST_MEDIA_TYPE_FLAC

    #define RB_GST_MEDIA_TYPE_FLAC 		"audio/x-flac"

### RB_GST_MEDIA_TYPE_AAC

    #define RB_GST_MEDIA_TYPE_AAC 		"audio/x-aac"

### enum RBGstMediaType

    typedef enum {
    	MEDIA_TYPE_NONE = 0,
    	MEDIA_TYPE_CONTAINER,
    	MEDIA_TYPE_AUDIO,
    	MEDIA_TYPE_VIDEO,
    	MEDIA_TYPE_OTHER
    } RBGstMediaType;

`MEDIA_TYPE_NONE` |
`MEDIA_TYPE_CONTAINER` |
`MEDIA_TYPE_AUDIO` |
`MEDIA_TYPE_VIDEO` |
`MEDIA_TYPE_OTHER` |

### rb_gst_caps_to_media_type ()

    char *              rb_gst_caps_to_media_type           (const GstCaps *caps);

### rb_gst_media_type_to_caps ()

    GstCaps *           rb_gst_media_type_to_caps           (const char *media_type);

### rb_gst_media_type_to_extension ()

    const char *        rb_gst_media_type_to_extension      (const char *media_type);

### rb_gst_mime_type_to_media_type ()

    const char *        rb_gst_mime_type_to_media_type      (const char *mime_type);

### rb_gst_media_type_to_mime_type ()

    const char *        rb_gst_media_type_to_mime_type      (const char *media_type);

### rb_gst_get_missing_plugin_type ()

    RBGstMediaType      rb_gst_get_missing_plugin_type      (const GstStructure *structure);

### rb_gst_get_default_encoding_target ()

    GstEncodingTarget * rb_gst_get_default_encoding_target  (void);

### rb_gst_get_encoding_profile ()

    GstEncodingProfile * rb_gst_get_encoding_profile        (const char *media_type);

### rb_gst_media_type_matches_profile ()

    gboolean            rb_gst_media_type_matches_profile   (GstEncodingProfile *profile,
                                                             const char *media_type);

### rb_gst_encoding_profile_get_media_type ()

    char *              rb_gst_encoding_profile_get_media_type
                                                            (GstEncodingProfile *profile);

### rb_gst_media_type_is_lossless ()

    gboolean            rb_gst_media_type_is_lossless       (const char *media_type);

### rb_gst_encoding_profile_get_settings ()

    char **             rb_gst_encoding_profile_get_settings
                                                            (GstEncodingProfile *profile,
                                                             const char *style);

Returns a list of settings for the profile `profile` that can usefully be exposed to a user. This usually means just bitrate/quality settings. This works by finding the name of the encoder element for the profile and retrieving a list specific to that encoder.

`profile` : | a GstEncodingProfile
`style` : | encoding style (NULL or "cbr" or "vbr")
Returns : | list of settings. [transfer full]

### rb_gst_encoding_profile_get_presets ()

    char **             rb_gst_encoding_profile_get_presets (GstEncodingProfile *profile);

### rb_gst_encoding_profile_set_preset ()

    void                rb_gst_encoding_profile_set_preset  (GstEncodingProfile *profile,
                                                             const char *preset);

Applies the preset `preset` to the audio encoding profile within `profile`.

`profile` : | a GstEncodingProfile
`preset` : | preset to apply

### rb_gst_encoding_profile_get_encoder ()

    GstElement *        rb_gst_encoding_profile_get_encoder (GstEncodingProfile *profile);