codecs: allow it to be used without plugins
Not all codecs require the plugin infrastructure. For example, G.711U/A is a built-in codec. Allow such functionality to be registered even if plugin support is disabled. Change-Id: I2505cc9955e7953268ec0739531278921f70a771 Reviewed-on: https://code.wireshark.org/review/18977 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
054455683b
commit
98efddc6c2
|
@ -92,6 +92,7 @@ register_codec_plugin(gpointer data, gpointer user_data _U_)
|
|||
|
||||
(plugin->register_codec_module)();
|
||||
}
|
||||
#endif /* HAVE_PLUGINS */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -115,9 +116,11 @@ register_all_codecs(void)
|
|||
codec_sbc_get_channels, codec_sbc_get_frequency, codec_sbc_decode);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
g_slist_foreach(codec_plugins, register_codec_plugin, NULL);
|
||||
}
|
||||
#endif /* HAVE_PLUGINS */
|
||||
}
|
||||
|
||||
|
||||
struct codec_handle {
|
||||
const char *name;
|
||||
|
|
|
@ -34,9 +34,13 @@ extern "C" {
|
|||
|
||||
#ifdef HAVE_PLUGINS
|
||||
WS_DLL_PUBLIC void codec_register_plugin_types(void);
|
||||
WS_DLL_PUBLIC void register_all_codecs(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* For all built-in codecs and codec plugins, call their register routines.
|
||||
*/
|
||||
WS_DLL_PUBLIC void register_all_codecs(void);
|
||||
|
||||
struct codec_handle;
|
||||
typedef struct codec_handle *codec_handle_t;
|
||||
|
||||
|
|
|
@ -2299,10 +2299,10 @@ main(int argc, char *argv[])
|
|||
|
||||
/* Register all libwiretap plugin modules. */
|
||||
register_all_wiretap_modules();
|
||||
#endif
|
||||
|
||||
/* Register all audio codec plugins. */
|
||||
register_all_codecs();
|
||||
#endif
|
||||
|
||||
splash_update(RA_DISSECTORS, NULL, (gpointer)splash_win);
|
||||
|
||||
|
|
|
@ -63,9 +63,7 @@
|
|||
#include <epan/dissectors/packet-kerberos.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
#include <codecs/codecs.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXTCAP
|
||||
#include <extcap.h>
|
||||
|
@ -551,10 +549,10 @@ int main(int argc, char *qt_argv[])
|
|||
|
||||
/* Register all libwiretap plugin modules. */
|
||||
register_all_wiretap_modules();
|
||||
#endif
|
||||
|
||||
/* Register all audio codec plugins. */
|
||||
register_all_codecs();
|
||||
#endif
|
||||
|
||||
/* Register all dissectors; we must do this before checking for the
|
||||
"-G" flag, as the "-G" flag dumps information registered by the
|
||||
|
|
Loading…
Reference in New Issue