summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-07-20 10:54:32 +0000
committerphintuka <phintuka>2008-07-20 10:54:32 +0000
commit290de806e10b1d1f5f89dd97e0b47c7bae5e0a93 (patch)
tree1fd1bab9886567d41ebbb0998990573c92982916
parent67c8d5d4c3c1db2c986412c68b868adbad4f5f15 (diff)
downloadxineliboutput-290de806e10b1d1f5f89dd97e0b47c7bae5e0a93.tar.gz
xineliboutput-290de806e10b1d1f5f89dd97e0b47c7bae5e0a93.tar.bz2
Config entries for video decoder selection
-rw-r--r--config.c21
-rw-r--r--config.h18
-rw-r--r--setup_menu.c4
3 files changed, 40 insertions, 3 deletions
diff --git a/config.c b/config.c
index 18b26448..1b4abc7c 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.67 2008-07-20 10:44:02 phintuka Exp $
+ * $Id: config.c,v 1.68 2008-07-20 10:54:32 phintuka Exp $
*
*/
@@ -234,6 +234,20 @@ const char * const config_t::s_osdScalings[] = {
NULL
};
+const char * const config_t::s_decoders_MPEG2[] = {
+ trNOOP("automatic"),
+ "libmpeg2",
+ "FFmpeg",
+ NULL
+};
+
+const char * const config_t::s_decoders_H264[] = {
+ trNOOP("automatic"),
+ "FFmpeg",
+ "CoreAVC",
+ NULL
+};
+
static const char exts_playlist[][4] = {
"asx",
"m3u",
@@ -551,6 +565,9 @@ config_t::config_t() {
scr_tunning = 0; // Fine-tune xine egine SCR (to sync video to graphics output)
scr_hz = 90000; // Current SCR speed (Hz), default is 90000
+ decoder_mpeg2 = DECODER_MPEG2_auto;
+ decoder_h264 = DECODER_H264_auto;
+
strn0cpy(browse_files_dir, VideoDirectory, sizeof(browse_files_dir));
strn0cpy(browse_music_dir, VideoDirectory, sizeof(browse_music_dir));
strn0cpy(browse_images_dir, VideoDirectory, sizeof(browse_images_dir));
@@ -777,6 +794,8 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Video.IBPTrickSpeed")) ibp_trickspeed = atoi(Value);
else if (!strcasecmp(Name, "Video.MaxTrickSpeed")) max_trickspeed = atoi(Value);
else if (!strcasecmp(Name, "Video.AspectRatio")) vo_aspect_ratio = atoi(Value);
+ else if (!strcasecmp(Name, "Video.Decoder.MPEG2")) decoder_mpeg2 = strstra(Value, s_decoders_MPEG2, 0);
+ else if (!strcasecmp(Name, "Video.Decoder.H264")) decoder_h264 = strstra(Value, s_decoders_H264, 0);
else if (!strcasecmp(Name, "Post.pp.Enable")) ffmpeg_pp = atoi(Value);
else if (!strcasecmp(Name, "Post.pp.Quality")) ffmpeg_pp_quality = atoi(Value);
diff --git a/config.h b/config.h
index 68d1eda8..8b52363f 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h,v 1.50 2008-07-20 10:48:04 phintuka Exp $
+ * $Id: config.h,v 1.51 2008-07-20 10:54:32 phintuka Exp $
*
*/
@@ -153,6 +153,17 @@
#define OSD_SCALING_BILINEAR 2
#define OSD_SCALING_count 3
+// Video decoder
+#define DECODER_MPEG2_auto 0
+#define DECODER_MPEG2_LIBMPEG2 1
+#define DECODER_MPEG2_FFMPEG 2
+#define DECODER_MPEG2_count 3
+
+#define DECODER_H264_auto 0
+#define DECODER_H264_FFMPEG 1
+#define DECODER_H264_COREAVC 2
+#define DECODER_H264_count 3
+
#if VDRVERSNUM >= 10510
# define DEVICE_SUPPORTS_IBP_TRICKSPEED
@@ -200,6 +211,8 @@ class config_t {
static const char * const s_osdBlendingMethods [OSD_BLENDING_count + 1];
static const char * const s_osdMixers [OSD_MIXER_count + 1];
static const char * const s_osdScalings [OSD_SCALING_count + 1];
+ static const char * const s_decoders_MPEG2 [DECODER_MPEG2_count + 1];
+ static const char * const s_decoders_H264 [DECODER_H264_count + 1];
static const char * const s_subExts[];
@@ -354,6 +367,9 @@ class config_t {
int scr_tunning; /* Fine-tune xine egine SCR (to sync video to graphics output) */
int scr_hz; /* Current SCR speed (Hz), default is 90000 */
+ int decoder_mpeg2; /* DECODER_MPEG2_... */
+ int decoder_h264; /* DECODER_H264_... */
+
config_t();
bool SetupParse(const char *Name, const char *Value);
diff --git a/setup_menu.c b/setup_menu.c
index 48081a34..24f5d5a5 100644
--- a/setup_menu.c
+++ b/setup_menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: setup_menu.c,v 1.60 2008-07-20 10:44:02 phintuka Exp $
+ * $Id: setup_menu.c,v 1.61 2008-07-20 10:54:32 phintuka Exp $
*
*/
@@ -827,6 +827,8 @@ void cMenuSetupVideo::Store(void)
SetupStore("Post.denoise3d.luma", xc.denoise3d_luma);
SetupStore("Post.denoise3d.chroma", xc.denoise3d_chroma);
SetupStore("Post.denoise3d.time", xc.denoise3d_time);
+ SetupStore("Video.Decoder.MPEG2", xc.s_decoders_MPEG2[xc.decoder_mpeg2]);
+ SetupStore("Video.Decoder.H264", xc.s_decoders_H264[xc.decoder_h264]);
#if 1
// delete old keys (<1.0.0)
SetupStore("Video.AutoScale");