changeset 4767:8d4208df7c15

Options registration for mencoder
author albeu
date Wed, 20 Feb 2002 17:02:31 +0000
parents 2bf9749cb7c2
children a64075b4970a
files Makefile me-opt-reg.c mencoder.c
diffstat 3 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 20 17:00:32 2002 +0000
+++ b/Makefile	Wed Feb 20 17:02:31 2002 +0000
@@ -28,7 +28,7 @@
 INSTALL = install
 
 SRCS_COMMON = cyuv.c adpcm.c xacodec.c cpudetect.c mp_msg.c ac3-iec958.c dec_audio.c dec_video.c msvidc.c cinepak.c fli.c qtrle.c codec-cfg.c cfgparser.c my_profile.c RTjpegN.c minilzo.c nuppelvideo.c spudec.c playtree.c playtreeparser.c asxparser.c qtsmc.c ducktm1.c roqav.c qtrpza.c
-SRCS_MENCODER = mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/img_format.c libvo/osd.c
+SRCS_MENCODER = mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/img_format.c libvo/osd.c me-opt-reg.c
 SRCS_MPLAYER = mplayer.c $(SRCS_COMMON) find_sub.c subreader.c lirc_mp.c mixer.c vobsub.c mp-opt-reg.c
 
 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/me-opt-reg.c	Wed Feb 20 17:02:31 2002 +0000
@@ -0,0 +1,14 @@
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include "cfgparser.h"
+
+extern void libmpdemux_register_options(m_config_t* cfg);
+
+void
+me_register_options(m_config_t* cfg) {
+
+  libmpdemux_register_options(cfg);
+
+}
--- a/mencoder.c	Wed Feb 20 17:00:32 2002 +0000
+++ b/mencoder.c	Wed Feb 20 17:02:31 2002 +0000
@@ -341,6 +341,8 @@
     return size;
 }
 
+extern void me_register_options(m_config_t* cfg);
+
 //---------------------------------------------------------------------------
 
 static int eof=0;
@@ -443,7 +445,7 @@
   playtree = play_tree_new();
   mconfig = m_config_new(playtree);
   m_config_register_options(mconfig,mencoder_opts);
-  // TODO : add something to let modules register their options
+  me_register_options(mconfig);
   parse_cfgfiles(mconfig);
 
   if(m_config_parse_command_line(mconfig, argc, argv, envp) < 0) mencoder_exit(1, "error parsing cmdline");