*/
VLC_PUBLIC_API const char * libvlc_get_changeset(void);
+/**
+ * Frees an heap allocation returned by a LibVLC function.
+ * If you know you're using the same underlying C run-time as the LibVLC
+ * implementation, then you can call ANSI C free() directly instead.
+ *
+ * \param ptr the pointer
+ */
+VLC_PUBLIC_API void libvlc_free( void *ptr );
/** \defgroup libvlc_event LibVLC asynchronous events
* LibVLC emits asynchronous events.
*
* \param p_mi the media player
* \return the video aspect ratio or NULL if unspecified
- * (the result must be released with free()).
+ * (the result must be released with free() or libvlc_free()).
*/
VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi );
block_Release (block);
}
-
static void *stream_init (demux_t *demux, const char *name)
{
return stream_DemuxNew (demux, name, demux->out);
(void)demux;
}
+static void *demux_init (demux_t *demux)
+{
+ return stream_init (demux, demux->psz_demux);
+}
+
/*
* Static payload types handler
*/
break;
default:
- return -1;
+ /*
+ * If the rtp payload type is unknown then check demux if it is specified
+ */
+ if ((strcmp(demux->psz_demux, "h264") == 0) || (strcmp(demux->psz_demux, "ts") == 0))
+ {
+ msg_Dbg (demux, "rtp autodetect specified demux=%s", demux->psz_demux);
+ pt.init = demux_init;
+ pt.destroy = stream_destroy;
+ pt.decode = stream_decode;
+ pt.frequency = 90000;
+ break;
+ }
+ else
+ {
+ return -1;
+ }
}
rtp_add_type (demux, session, &pt);
return 0;
extern const char psz_vlc_changeset[];
return psz_vlc_changeset;
}
+
+void libvlc_free( void *ptr )
+{
+ free( ptr );
+}
libvlc_event_manager_release
libvlc_event_send
libvlc_event_type_name
+libvlc_free
libvlc_get_changeset
libvlc_get_compiler
libvlc_get_fullscreen