Differenze tra le versioni di "Ottenere informazioni generali da un flusso web audio-video con le risorse del API di VLC"
Da Gambas-it.org - Wikipedia.
(Creata pagina con "Con le risorse del API di VLC è possibile ottenere alcune informazioni generali di un video trasmesso da una web-TV.") |
|||
Riga 1: | Riga 1: | ||
Con le risorse del API di VLC è possibile ottenere alcune informazioni generali di un video trasmesso da una web-TV. | Con le risorse del API di VLC è possibile ottenere alcune informazioni generali di un video trasmesso da una web-TV. | ||
+ | |||
+ | Mostriamo un esempio pratico: | ||
+ | Library "libvlc:5.6.1" | ||
+ | |||
+ | Public Struct video_track_t | ||
+ | i_height As Integer | ||
+ | i_width As Integer | ||
+ | i_sar_num As Integer | ||
+ | i_sar_den As Integer | ||
+ | i_frame_rate_num As Integer | ||
+ | i_frame_rate_den As Integer | ||
+ | i_orientation As Integer | ||
+ | i_projection As Integer | ||
+ | f_yaw As Single | ||
+ | f_pitch As Single | ||
+ | f_roll As Single | ||
+ | f_field_of_view As Single | ||
+ | i_multiview As Byte | ||
+ | End Struct | ||
+ | |||
+ | <FONT Color=gray>' ''libvlc_instance_t * libvlc_new (int argc, const char *const *argv)'' | ||
+ | ' ''Create And initialize a libvlc instance.''</font> | ||
+ | Private Extern libvlc_new(argc As Integer, argv As String[]) As Pointer | ||
+ | |||
+ | <FONT Color=gray>' ''libvlc_media_t * libvlc_media_new_location (libvlc_instance_t *p_instance, const char *psz_mrl)'' | ||
+ | ' ''Create a media with a certain given media resource location.''</font> | ||
+ | Private Extern libvlc_media_new_location(p_instance As Pointer, psz_mrl As String) As Pointer | ||
+ | |||
+ | <FONT Color=gray>' ''libvlc_media_player_t * libvlc_media_player_new_from_media (libvlc_media_t *p_md)'' | ||
+ | ' ''Create a Media Player object from a Media.''</font> | ||
+ | Private Extern libvlc_media_player_new_from_media(p_md As Pointer) As Pointer | ||
+ | |||
+ | <FONT Color=gray>' ''char* libvlc_media_get_meta (libvlc_media_t * p_md, libvlc_meta_t e_meta)'' | ||
+ | ' ''Read the meta of the media.''</font> | ||
+ | Private Extern libvlc_media_get_meta(p_md As Pointer, e_meta As Integer) As String | ||
+ | |||
+ | <FONT Color=gray>' ''int libvlc_media_player_play (libvlc_media_player_t * p_mi)'' | ||
+ | ' ''Play the video file.''</font> | ||
+ | Private Extern libvlc_media_player_play(p_mi As Pointer) As Integer | ||
+ | |||
+ | <FONT Color=gray>' ''unsigned libvlc_media_tracks_get (libvlc_media_t * p_md, libvlc_media_track_t *** tracks)'' | ||
+ | ' ''Get media descriptor's elementary streams description.''</font> | ||
+ | Private Extern libvlc_media_tracks_get(p_md As Pointer, tracks As Pointer) As Integer | ||
+ | |||
+ | <FONT Color=gray>' ''const char * libvlc_media_get_codec_description (libvlc_track_type_t i_type, uint32_t i_codec)'' | ||
+ | ' ''Get codec description from media elementary stream.''</font> | ||
+ | Private Extern libvlc_media_get_codec_description(i_type As Integer, i_codec As Integer) As String | ||
+ | |||
+ | <FONT Color=gray>' ''void libvlc_media_release (libvlc_media_t *p_md)'' | ||
+ | ' ''Decrement the reference count of a media descriptor object.''</font> | ||
+ | Private Extern libvlc_media_release(p_md As Pointer) | ||
+ | |||
+ | <FONT Color=gray>' ''libvlc_release (libvlc_instance_t * p_instance)'' | ||
+ | ' ''Decrement the reference count of a libvlc instance, and destroy it if it reaches zero.''</font> | ||
+ | Private Extern libvlc_release(p_instance As Pointer) |
Versione delle 05:40, 11 ago 2024
Con le risorse del API di VLC è possibile ottenere alcune informazioni generali di un video trasmesso da una web-TV.
Mostriamo un esempio pratico:
Library "libvlc:5.6.1" Public Struct video_track_t i_height As Integer i_width As Integer i_sar_num As Integer i_sar_den As Integer i_frame_rate_num As Integer i_frame_rate_den As Integer i_orientation As Integer i_projection As Integer f_yaw As Single f_pitch As Single f_roll As Single f_field_of_view As Single i_multiview As Byte End Struct ' libvlc_instance_t * libvlc_new (int argc, const char *const *argv) ' Create And initialize a libvlc instance. Private Extern libvlc_new(argc As Integer, argv As String[]) As Pointer ' libvlc_media_t * libvlc_media_new_location (libvlc_instance_t *p_instance, const char *psz_mrl) ' Create a media with a certain given media resource location. Private Extern libvlc_media_new_location(p_instance As Pointer, psz_mrl As String) As Pointer ' libvlc_media_player_t * libvlc_media_player_new_from_media (libvlc_media_t *p_md) ' Create a Media Player object from a Media. Private Extern libvlc_media_player_new_from_media(p_md As Pointer) As Pointer ' char* libvlc_media_get_meta (libvlc_media_t * p_md, libvlc_meta_t e_meta) ' Read the meta of the media. Private Extern libvlc_media_get_meta(p_md As Pointer, e_meta As Integer) As String ' int libvlc_media_player_play (libvlc_media_player_t * p_mi) ' Play the video file. Private Extern libvlc_media_player_play(p_mi As Pointer) As Integer ' unsigned libvlc_media_tracks_get (libvlc_media_t * p_md, libvlc_media_track_t *** tracks) ' Get media descriptor's elementary streams description. Private Extern libvlc_media_tracks_get(p_md As Pointer, tracks As Pointer) As Integer ' const char * libvlc_media_get_codec_description (libvlc_track_type_t i_type, uint32_t i_codec) ' Get codec description from media elementary stream. Private Extern libvlc_media_get_codec_description(i_type As Integer, i_codec As Integer) As String ' void libvlc_media_release (libvlc_media_t *p_md) ' Decrement the reference count of a media descriptor object. Private Extern libvlc_media_release(p_md As Pointer) ' libvlc_release (libvlc_instance_t * p_instance) ' Decrement the reference count of a libvlc instance, and destroy it if it reaches zero. Private Extern libvlc_release(p_instance As Pointer)