gatos-cvs Mailing List for GATOS (Page 7)
Status: Beta
Brought to you by:
volodya
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(35) |
Feb
(67) |
Mar
(41) |
Apr
(4) |
May
(7) |
Jun
(9) |
Jul
(7) |
Aug
(2) |
Sep
(9) |
Oct
(3) |
Nov
(5) |
Dec
(30) |
| 2004 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(6) |
Jul
(8) |
Aug
(3) |
Sep
(5) |
Oct
(15) |
Nov
(25) |
Dec
(14) |
| 2005 |
Jan
(11) |
Feb
(5) |
Mar
(8) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
|
| 2006 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(2) |
| 2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <gat...@li...> - 2004-01-05 21:03:52
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv11463
Modified Files:
avview.scp configure.in
Log Message:
Bump version number.
Fix problem with current_alsa_device1.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- avview.scp 2 Jan 2004 09:57:39 -0000 1.149
+++ avview.scp 5 Jan 2004 21:03:45 -0000 1.150
@@ -50,6 +50,7 @@
current_table_name "none"
current_channel "none"
current_connector "none"
+ current_alsa_device1 "none"
use_physical_screen_size "true"
aspect_ratio {4 3}
port_grabbed "false"
Index: configure.in
===================================================================
RCS file: /cvsroot/gatos/avview/configure.in,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- configure.in 2 Jan 2004 09:57:39 -0000 1.58
+++ configure.in 5 Jan 2004 21:03:47 -0000 1.59
@@ -4,7 +4,7 @@
# Note to self: always bump version number when there are changes
# in setup window or avview_shell
#
-AC_INIT([AVview], [0.80.2], [gat...@li...])
+AC_INIT([AVview], [0.80.3], [gat...@li...])
#
# For now I'll be happier without NEWS and Changelog files.
#
|
|
From: <gat...@li...> - 2004-01-05 20:58:39
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv10167
Modified Files:
v4l.scp
Log Message:
Fix problem with "current_alsa_capture_device" not being set.
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- v4l.scp 2 Jan 2004 09:57:39 -0000 1.58
+++ v4l.scp 5 Jan 2004 20:58:36 -0000 1.59
@@ -18,6 +18,7 @@
ffmpeg_audio_bitrate 64000
ffmpeg_audio_codec "MPEG-2"
ffmpeg_file_format "MPEG"
+ current_alsa_capture_device "none"
} {
global $variable
set $variable $value
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv21707
Modified Files:
README alsa.c ffmpeg.c linux.c main.c packet_stream.c
string_cache.c v4l.c vbi.c xmisc.c xv.c
Log Message:
Update copyright notices.
Index: README
===================================================================
RCS file: /cvsroot/gatos/avview/README,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- README 2 Mar 2003 04:59:46 -0000 1.17
+++ README 3 Jan 2004 18:21:18 -0000 1.18
@@ -1,7 +1,7 @@
AV viewer
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
A viewer for TV capable cards.
Index: alsa.c
===================================================================
RCS file: /cvsroot/gatos/avview/alsa.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- alsa.c 14 Dec 2003 21:55:45 -0000 1.37
+++ alsa.c 3 Jan 2004 18:21:19 -0000 1.38
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- ffmpeg.c 2 Jan 2004 09:57:39 -0000 1.84
+++ ffmpeg.c 3 Jan 2004 18:21:19 -0000 1.85
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: linux.c
===================================================================
RCS file: /cvsroot/gatos/avview/linux.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- linux.c 15 Feb 2003 01:20:00 -0000 1.4
+++ linux.c 3 Jan 2004 18:21:19 -0000 1.5
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: main.c
===================================================================
RCS file: /cvsroot/gatos/avview/main.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- main.c 3 Oct 2003 13:04:30 -0000 1.17
+++ main.c 3 Jan 2004 18:21:19 -0000 1.18
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: packet_stream.c
===================================================================
RCS file: /cvsroot/gatos/avview/packet_stream.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- packet_stream.c 3 Oct 2003 13:04:30 -0000 1.28
+++ packet_stream.c 3 Jan 2004 18:21:19 -0000 1.29
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: string_cache.c
===================================================================
RCS file: /cvsroot/gatos/avview/string_cache.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- string_cache.c 15 Feb 2003 01:20:00 -0000 1.4
+++ string_cache.c 3 Jan 2004 18:21:19 -0000 1.5
@@ -2,7 +2,7 @@
uC preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU public license
Index: v4l.c
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- v4l.c 18 Feb 2003 11:43:57 -0000 1.29
+++ v4l.c 3 Jan 2004 18:21:19 -0000 1.30
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: vbi.c
===================================================================
RCS file: /cvsroot/gatos/avview/vbi.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- vbi.c 23 Feb 2003 18:21:16 -0000 1.9
+++ vbi.c 3 Jan 2004 18:21:19 -0000 1.10
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: xmisc.c
===================================================================
RCS file: /cvsroot/gatos/avview/xmisc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- xmisc.c 8 Jun 2003 05:20:01 -0000 1.13
+++ xmisc.c 3 Jan 2004 18:21:19 -0000 1.14
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
Index: xv.c
===================================================================
RCS file: /cvsroot/gatos/avview/xv.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- xv.c 15 Feb 2003 01:20:00 -0000 1.9
+++ xv.c 3 Jan 2004 18:21:19 -0000 1.10
@@ -1,6 +1,6 @@
/* avview preliminary version
- (C) Vladimir Dergachev 2001-2003
+ (C) Vladimir Dergachev 2001-2004
GNU Public License
|
|
From: <gat...@li...> - 2004-01-02 09:57:42
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv3443
Modified Files:
avview.scp configure.in ffmpeg.c ffmpeg.scp setup.scp v4l.scp
video_device.scp
Log Message:
Implement support for for user-defined themes.
Adjustment of capture parameters is now done entirely by choosing a theme.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- avview.scp 21 Dec 2003 09:25:47 -0000 1.148
+++ avview.scp 2 Jan 2004 09:57:39 -0000 1.149
@@ -65,6 +65,7 @@
transparent_when_minimized "true"
transparency_ratio 200
is_minimized "false"
+ user_encoding_themes {}
} {
global $variable
set $variable $value
@@ -436,7 +437,7 @@
display_setup_window_on_startup file_save_path dpms_off_on_fullscreen_power_off
disable_fullscreen_switching use_physical_screen_size message_visible_secs
on_screen_cc_page save_settings_on_exit transparent_when_minimized mute_when_minimized
- transparency_ratio current_file_extension} {
+ transparency_ratio current_file_extension ffmpeg_encoding_theme user_encoding_themes } {
global $variable
puts $fileid "\nglobal $variable"
puts $fileid "set $variable \"[set $variable]\""
@@ -881,7 +882,6 @@
Tree:open .setup.tree "/Configuration"
Tree:open .setup.tree "/Configuration/User interface settings"
-replace_parameter_choices "/Configuration/Video device parameters" 0 a
regenerate_port_menu
proc set_default_settings {} {
@@ -898,11 +898,17 @@
}
proc set_ui_traces {} {
-global show_control_window attributes_window capture_window alsa_window theme_name
-trace variable show_control_window w "show_control_window_proc ; skip_args3"
-trace variable attributes_window w { generate_attributes_window .controlwin.allattributes ; skip_args3 }
-trace variable capture_window w { generate_capture_window .controlwin.capture ; skip_args3 }
-trace variable theme_name w { global theme_name ; reset_theme $theme_name ; skip_args3 }
+global show_control_window attributes_window capture_window alsa_window theme_name ffmpeg_encoding_theme
+foreach {var command} {
+ show_control_window {show_control_window_proc ; skip_args3 }
+ attributes_window { generate_attributes_window .controlwin.allattributes ; skip_args3 }
+ capture_window { generate_capture_window .controlwin.capture ; skip_args3 }
+ theme_name { global theme_name ; reset_theme $theme_name ; skip_args3 }
+ ffmpeg_encoding_theme { set_encoding_theme ; skip_args3 }
+ } {
+ global $var
+ trace variable $var w $command
+ }
if {[alsa_present] == "yes" } {
trace variable alsa_window w "generate_alsa_window .controlwin.alsamixer ; skip_args3"
}
@@ -924,7 +930,8 @@
assign_default_bindings
set_default_settings
read_settings
- switch_to_pane "/User interface settings"
+ rehash_themes
+ switch_to_pane "/Configuration/User interface settings"
if { $display_setup_window_on_startup } {
create_setup_window
}
Index: configure.in
===================================================================
RCS file: /cvsroot/gatos/avview/configure.in,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- configure.in 20 Dec 2003 18:34:59 -0000 1.57
+++ configure.in 2 Jan 2004 09:57:39 -0000 1.58
@@ -4,7 +4,7 @@
# Note to self: always bump version number when there are changes
# in setup window or avview_shell
#
-AC_INIT([AVview], [0.80.1], [gat...@li...])
+AC_INIT([AVview], [0.80.2], [gat...@li...])
#
# For now I'll be happier without NEWS and Changelog files.
#
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- ffmpeg.c 21 Dec 2003 09:06:11 -0000 1.83
+++ ffmpeg.c 2 Jan 2004 09:57:39 -0000 1.84
@@ -48,10 +48,15 @@
long width;
long height;
long stop;
+ /* statistics */
long frame_count;
long frames_encoded;
- int quality;
int64 encoded_stream_size;
+
+ /* values to write into picture struct for ffmpeg */
+ int quality;
+ int qscale_type;
+
V4L_DATA *v4l_device;
int fd_out;
AVCodec *video_codec;
@@ -129,6 +134,7 @@
picture->quality=sdata->quality;
picture->type=FF_BUFFER_TYPE_SHARED;
picture->qscale_table=NULL;
+picture->qscale_type=sdata->qscale_type;
}
void ffmpeg_v4l_encoding_thread(PACKET_STREAM *s)
@@ -409,12 +415,15 @@
const char *arg_step_frames;
const char *arg_video_quality;
const char *arg_video_bitrate_control;
+const char *arg_gop_size;
struct video_picture vpic;
double a,b;
+AVCodecContext *enc=&(sdata->video_codec_context);
int qmin=2;
arg_v4l_handle=get_value(argc, argv, "-v4l_handle");
+arg_gop_size=get_value(argc, argv, "-gop_size");
arg_video_codec=get_value(argc, argv, "-video_codec");
arg_v4l_mode=get_value(argc, argv, "-v4l_mode");
arg_v4l_rate=get_value(argc, argv, "-v4l_rate");
@@ -472,12 +481,14 @@
sdata->frame_count=1;
sdata->frames_encoded=0;
sdata->last_video_timestamp=0;
+sdata->qscale_type=FF_QSCALE_TYPE_MPEG2;
if(arg_video_codec==NULL){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
} else
if(!strcmp("MPEG-1", arg_video_codec)){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
+ sdata->qscale_type=FF_QSCALE_TYPE_MPEG1;
} else
if(!strcmp("MPEG-2", arg_video_codec)){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
@@ -512,23 +523,23 @@
}
memset(&(sdata->video_codec_context), 0, sizeof(AVCodecContext));
avcodec_get_context_defaults(&(sdata->audio_codec_context));
-sdata->video_codec_context.codec_id=sdata->video_codec->id;
-sdata->video_codec_context.codec_type=sdata->video_codec->type;
+enc->codec_id=sdata->video_codec->id;
+enc->codec_type=sdata->video_codec->type;
switch(data->mode){
case MODE_SINGLE_FRAME:
- sdata->video_codec_context.width=data->vwin.width;
- sdata->video_codec_context.height=data->vwin.height;
+ enc->width=data->vwin.width;
+ enc->height=data->vwin.height;
break;
case MODE_DOUBLE_INTERPOLATE:
case MODE_DEINTERLACE_BOB:
case MODE_DEINTERLACE_WEAVE:
- sdata->video_codec_context.width=data->vwin.width;
- sdata->video_codec_context.height=data->vwin.height*2;
+ enc->width=data->vwin.width;
+ enc->height=data->vwin.height*2;
break;
case MODE_DEINTERLACE_HALF_WIDTH:
- sdata->video_codec_context.width=data->vwin.width/2;
- sdata->video_codec_context.height=data->vwin.height;
+ enc->width=data->vwin.width/2;
+ enc->height=data->vwin.height;
break;
}
@@ -544,58 +555,65 @@
#endif
#endif
-sdata->video_codec_context.frame_rate=0;
-if(arg_v4l_rate!=NULL)sdata->video_codec_context.frame_rate=rint(atof(arg_v4l_rate)*FFMPEG_FRAME_RATE_BASE);
-if(sdata->video_codec_context.frame_rate<=0)sdata->video_codec_context.frame_rate=60*FFMPEG_FRAME_RATE_BASE;
-if(data->step_frames>0)sdata->video_codec_context.frame_rate=sdata->video_codec_context.frame_rate/data->step_frames;
-a=(((800000.0*data->vwin.width)*data->vwin.height)*sdata->video_codec_context.frame_rate);
+enc->frame_rate=0;
+if(arg_v4l_rate!=NULL)enc->frame_rate=rint(atof(arg_v4l_rate)*FFMPEG_FRAME_RATE_BASE);
+if(enc->frame_rate<=0)enc->frame_rate=60*FFMPEG_FRAME_RATE_BASE;
+if(data->step_frames>0)enc->frame_rate=enc->frame_rate/data->step_frames;
+a=(((800000.0*data->vwin.width)*data->vwin.height)*enc->frame_rate);
b=(352.0*288.0*25.0*FFMPEG_FRAME_RATE_BASE);
-sdata->video_codec_context.bit_rate=0;
-if(arg_video_bitrate!=NULL)sdata->video_codec_context.bit_rate=atol(arg_video_bitrate);
-if(sdata->video_codec_context.bit_rate< (sdata->video_codec_context.frame_rate/FFMPEG_FRAME_RATE_BASE+1))
- sdata->video_codec_context.bit_rate=rint(a/b);
-fprintf(stderr,"video: using bitrate=%d, frame_rate=%d\n", sdata->video_codec_context.bit_rate, sdata->video_codec_context.frame_rate);
-sdata->video_codec_context.pix_fmt=PIX_FMT_YUV420P;
-sdata->video_codec_context.flags=0;
+enc->bit_rate=0;
+if(arg_video_bitrate!=NULL)enc->bit_rate=atol(arg_video_bitrate);
+if(enc->bit_rate< (enc->frame_rate/FFMPEG_FRAME_RATE_BASE+1))
+ enc->bit_rate=rint(a/b);
+fprintf(stderr,"video: using bitrate=%d, frame_rate=%d\n", enc->bit_rate, enc->frame_rate);
+enc->pix_fmt=PIX_FMT_YUV420P;
+enc->flags=0;
if((arg_video_bitrate_control!=NULL)&&!strcmp(arg_video_bitrate_control, "Fix quality"))
- sdata->video_codec_context.flags=CODEC_FLAG_QSCALE;
-sdata->video_codec_context.qmin=qmin;
-sdata->video_codec_context.qmax=15;
+ enc->flags|=CODEC_FLAG_QSCALE;
+enc->qmin=qmin;
+enc->qmax=15;
if(arg_video_quality!=NULL)sdata->quality=atoi(arg_video_quality);
if(sdata->quality<qmin)sdata->quality=qmin;
-if(sdata->quality>sdata->video_codec_context.qmax)sdata->quality=sdata->video_codec_context.qmax;
+if(sdata->quality>enc->qmax)sdata->quality=enc->qmax;
-sdata->video_codec_context.frame_rate_base=FFMPEG_FRAME_RATE_BASE;
-sdata->video_codec_context.max_qdiff=3;
-sdata->video_codec_context.aspect_ratio=0.0; /* guess assuming square pixels */
-sdata->video_codec_context.me_method=ME_FULL;
-sdata->video_codec_context.qblur=0.5;
-sdata->video_codec_context.qcompress=0.5;
-sdata->video_codec_context.b_quant_factor=1.25;
-sdata->video_codec_context.b_quant_offset=1.25;
-sdata->video_codec_context.i_quant_factor=-0.8;
-sdata->video_codec_context.i_quant_offset=0.0;
-sdata->video_codec_context.gop_size=0;
-sdata->video_codec_context.get_buffer=avcodec_default_get_buffer;
-sdata->video_codec_context.release_buffer=avcodec_default_release_buffer;
-sdata->video_codec_context.pix_fmt=PIX_FMT_YUV420P;
-sdata->video_codec_context.rc_qsquish=1.0;
-sdata->video_codec_context.rc_max_rate = 0;
-sdata->video_codec_context.rc_min_rate = 0;
-sdata->video_codec_context.rc_buffer_size = 0;
-sdata->video_codec_context.rc_buffer_aggressivity= 1;
-sdata->video_codec_context.rc_initial_cplx= 0;
-sdata->video_codec_context.lumi_masking=0;
-sdata->video_codec_context.temporal_cplx_masking=0;
-sdata->video_codec_context.spatial_cplx_masking=0;
-sdata->video_codec_context.p_masking=0;
-sdata->video_codec_context.dark_masking=0;
-sdata->video_codec_context.mpeg_quant=1;
-sdata->video_codec_context.global_quality=sdata->quality;
+enc->frame_rate_base=FFMPEG_FRAME_RATE_BASE;
+enc->max_qdiff=3;
+enc->aspect_ratio=0.0; /* guess assuming square pixels */
+enc->me_method=ME_FULL;
+enc->qblur=0.5;
+enc->qcompress=0.5;
+enc->b_quant_factor=1.25;
+enc->b_quant_offset=1.25;
+enc->i_quant_factor=-0.8;
+enc->i_quant_offset=0.0;
+enc->get_buffer=avcodec_default_get_buffer;
+enc->release_buffer=avcodec_default_release_buffer;
+enc->pix_fmt=PIX_FMT_YUV420P;
+enc->rc_qsquish=1.0;
+enc->rc_max_rate = 0;
+enc->rc_min_rate = 0;
+enc->rc_buffer_size = 0;
+enc->rc_buffer_aggressivity= 1;
+enc->rc_initial_cplx= 0;
+enc->lumi_masking=0;
+enc->temporal_cplx_masking=0;
+enc->spatial_cplx_masking=0;
+enc->p_masking=0;
+enc->dark_masking=0;
+enc->global_quality=sdata->quality;
+enc->strict_std_compliance=0;
+if(enc->codec_id==CODEC_ID_MPEG1VIDEO ||
+ enc->codec_id==CODEC_ID_H264)
+ enc->flags|= CODEC_FLAG_TRUNCATED;
+
+enc->gop_size=0;
if((arg_video_codec!=NULL)&&(
!strcasecmp(arg_video_codec, "MPEG-4") ||
!strcasecmp(arg_video_codec, "MSMPEG-4")))
- sdata->video_codec_context.gop_size=12;
+ enc->gop_size=12;
+if(arg_gop_size!=NULL)enc->gop_size=atol(arg_gop_size);
+if(enc->gop_size<0)enc->gop_size=0;
+
if(sdata->video_codec->priv_data_size==0){
fprintf(stderr,"BUG: sdata->video_codec->priv_data_size==0, fixing it\n");
sdata->video_codec->priv_data_size=64*1024; /* 64K should be enough */
@@ -620,6 +638,7 @@
const char *arg_audio_codec;
const char *arg_audio_bitrate;
const char *arg_audio_rate;
+long endiannes_test;
if(alsa_setup_reader_thread(sdata->audio_s, argc, argv, &(sdata->alsa_param))<0){
return 0;
}
@@ -644,6 +663,14 @@
} else
if(!strcasecmp(arg_audio_codec,"AC-3")){
sdata->audio_codec=avcodec_find_encoder(CODEC_ID_AC3);
+ } else
+if(!strcasecmp(arg_audio_codec,"PCM")){
+ endiannes_test=1;
+ if(*((char *)&endiannes_test)){
+ sdata->audio_codec=avcodec_find_encoder(CODEC_ID_PCM_S16LE);
+ } else {
+ sdata->audio_codec=avcodec_find_encoder(CODEC_ID_PCM_S16BE);
+ }
}
if(sdata->audio_codec==NULL){
fprintf(stderr,"Could not find audio codec\n");
@@ -774,7 +801,6 @@
} else
if(!strcasecmp("vob", arg_av_format)){
sdata->format_context.oformat=guess_format("vob", NULL, NULL);
- fprintf(stderr,"**VOB\n");
} else
if(!strcasecmp("mpeg", arg_av_format)){
sdata->format_context.oformat=guess_format("mpeg", NULL, NULL);
Index: ffmpeg.scp
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.scp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ffmpeg.scp 20 Dec 2003 22:28:26 -0000 1.10
+++ ffmpeg.scp 2 Jan 2004 09:57:39 -0000 1.11
@@ -17,11 +17,11 @@
set encoding_themes {
"Very high quality MPEG-1"
"MPEG-1 VHQ"
- 300000
+ 600000
2
"Fix quality"
"MPEG-1"
- 64000
+ 128000
"MPEG-2"
"MPEG"
"double-interpolate"
@@ -30,11 +30,11 @@
"High quality MPEG-1"
"MPEG-1 HQ"
- 300000
+ 600000
5
"Fix quality"
"MPEG-1"
- 64000
+ 128000
"MPEG-2"
"MPEG"
"double-interpolate"
@@ -43,11 +43,11 @@
"VCR quality MPEG-1"
"MPEG-1 VCR"
- 300000
+ 600000
5
"Fix quality"
"MPEG-1"
- 64000
+ 128000
"MPEG-2"
"MPEG"
"half-width"
@@ -56,11 +56,11 @@
"Webcam quality MPEG-1"
"MPEG-1 Webcam"
- 300000
+ 600000
10
"Fix quality"
"MPEG-1"
- 64000
+ 128000
"MPEG-2"
"MPEG"
"half-width"
@@ -69,11 +69,11 @@
"Very high quality MPEG-4"
"MPEG-4 VHQ"
- 300000
+ 600000
2
"Fix quality"
"MPEG-4"
- 64000
+ 128000
"MPEG-2"
"AVI"
"double-interpolate"
@@ -82,11 +82,11 @@
"High quality MPEG-4"
"MPEG-4 HQ"
- 300000
+ 600000
5
"Fix quality"
"MPEG-4"
- 64000
+ 128000
"MPEG-2"
"AVI"
"double-interpolate"
@@ -95,11 +95,11 @@
"Very high quality DVD"
"DVD VHQ"
- 600000
+ 1200000
2
"Fix quality"
"MPEG-2"
- 64000
+ 128000
"MPEG-2"
"VOB"
"double-interpolate"
@@ -108,11 +108,11 @@
"High quality DVD"
"DVD HQ"
- 600000
+ 1200000
5
"Fix quality"
"MPEG-2"
- 64000
+ 128000
"MPEG-2"
"VOB"
"double-interpolate"
@@ -120,62 +120,32 @@
"vob"
}
-global encoding_themes_list encoding_themes_table
-set encoding_themes_list {}
-set i 0
-foreach $encoding_theme_template $encoding_themes {
- lappend encoding_themes_list $short_name
- set encoding_themes_table($short_name) $i
- incr i
- }
-
-add_parameter_pane "/Configuration/Encoding settings" "Encoding settings" \
- "Pre-configured themes" heading "" \
- "Encoding theme" choice [concat ffmpeg_encoding_theme $encoding_themes_list] \
- "" ro_entry ffmpeg_encoding_theme_detail \
- "Set parameters" command set_encoding_theme
-
-add_parameter_pane "/Configuration/Encoding settings/Capture parameters" "Capture parameters" \
- "V4L parameters" heading "" \
- "Deinterlacing method" choice [concat current_v4l_mode [get_deinterlacing_methods]] \
- "V4L recording rate" choice {current_v4l_rrate "as is" "one half" "one quarter"} \
- "Video frame rate" entry current_video_rate
-
-if { [ffmpeg_present] } {
- add_parameter_pane "/Configuration/Encoding settings/Compression parameters" "Compression parameters" \
- "Video codec parameters" heading "" \
- "Bitrate control" choice { ffmpeg_video_bitrate_control "Fix bitrate" "Fix quality" } \
- "Bitrate" entry ffmpeg_video_bitrate \
- "Quality (smaller is better)" scale { ffmpeg_video_quality 2 31 } \
- "Video codec" choice { ffmpeg_video_codec "H263" "H263I" "H263P" "MJPEG" "MPEG-1" "MPEG-4" "MSMPEG-4" "RV10" } \
- "Audio codec parameters" heading "" \
- "Audio sample rate" choice {ffmpeg_audio_sample_rate "48000" "44100" "32000" "24000" "22050" "16000" } \
- "Audio bitrate" choice {ffmpeg_audio_bitrate "384000" "320000" "256000" "224000" "192000" "160000" "128000" "112000" "96000" "80000" "64000" "56000" "48000" "32000" } \
- "Audio codec" choice {ffmpeg_audio_codec "PCM" "MPEG-2" "AC3" "MPEG-3" "VORBIS"} \
- "File format parameters" heading "" \
- "File format" choice {ffmpeg_file_format "none" "AVI" "ASF" "MPEG" "VOB" "DV" "RM"} \
- "Stop capture when fifo exceeds (MB)" entry ffmpeg_max_fifo_size
-# "Record in chunks of (MB)" entry ffmpeg_recording_chunk_size
- } {
- add_description_pane "/Configuration/Compression parameters" "Compression parameters" "AVview has not been compiled to include compression library"
- }
-
global ffmpeg_encoding_theme
trace variable ffmpeg_encoding_theme w {
- global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
- encoding_themes_table encoding_theme_template encoding_themes
- set ffmpeg_encoding_theme_detail [lindex $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]]]
skip_args3 }
set ffmpeg_encoding_theme [lindex $encoding_themes 1]
+proc get_encoding_theme { short_name } {
+global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
+ encoding_themes_table encoding_theme_template encoding_themes \
+ builtin_themes_count user_encoding_themes
+set theme_index $encoding_themes_table($short_name)
+if { $theme_index < $builtin_themes_count } {
+ set theme [lrange $encoding_themes [expr $theme_index*[llength $encoding_theme_template]] end]
+ set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
+ } {
+ set theme [lrange $user_encoding_themes [expr ($theme_index-$builtin_themes_count)*[llength $encoding_theme_template]] end]
+ set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
+ }
+return $theme
+}
+
proc set_encoding_theme {} {
global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
encoding_themes_table encoding_theme_template encoding_themes
-set theme [lrange $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]] end]
-set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
-foreach $encoding_theme_template $theme {
+foreach $encoding_theme_template [get_encoding_theme $ffmpeg_encoding_theme] {
foreach {var field} {
ffmpeg_video_bitrate_control q_control
ffmpeg_video_quality quality
@@ -192,6 +162,206 @@
set $var [set $field]
}
}
+
+set ffmpeg_encoding_theme_detail [lindex $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]]]
}
-set_encoding_theme
+proc create_new_theme {} {
+global custom_theme_name encoding_theme_template encoding_themes user_encoding_themes ffmpeg_encoding_theme
+if { $custom_theme_name == "" } {
+ tk_dialog .setup.theme_error "Cannot create theme" "Cannot create theme - please input new theme name" "" 0 "Acknowledged"
+ return
+ }
+foreach $encoding_theme_template $encoding_themes {
+ if { $custom_theme_name == $short_name } {
+ tk_dialog .setup.theme_error "Cannot create theme" "Theme \"$short_name\" already exists" "" 0 "Acknowledged"
+ return
+ }
+ }
+foreach $encoding_theme_template $user_encoding_themes {
+ if { $custom_theme_name == $short_name } {
+ tk_dialog .setup.theme_error "Cannot create theme" "Theme \"$short_name\" already exists" "" 0 "Acknowledged"
+ return
+ }
+ }
+set theme [get_encoding_theme $ffmpeg_encoding_theme]
+set short_name_index [lsearch -exact $encoding_theme_template "short_name"]
+if { $short_name_index < 0 } {
+ puts stderr "AVview internal error"
+ }
+lset theme $short_name_index $custom_theme_name
+foreach value $theme {
+ lappend user_encoding_themes $value
+ }
+rehash_themes
+Tree:open .setup.tree "/Configuration"
+Tree:open .setup.tree "/Configuration/Encoding settings"
+Tree:open .setup.tree "/Configuration/Encoding settings/Custom themes"
+switch_to_pane "/Configuration/Encoding settings/Custom themes/$custom_theme_name"
+}
+
+proc get_theme_var_name { short_name var } {
+return encoding_theme_${short_name}_$var
+}
+
+proc adjust_user_theme_var { theme_index short_name var } {
+global encoding_themes_table user_encoding_themes builtin_themes_count \
+ encoding_theme_template
+set short_name_index [lsearch $encoding_theme_template "short_name"]
+set start [expr ($theme_index-$builtin_themes_count)*[llength $encoding_theme_template]]
+set verify_short_name [lindex $user_encoding_themes [expr $start+$short_name_index]]
+if { $verify_short_name != $short_name } {
+ puts stderr "$verify_short_name!=$short_name for $theme_index $var"
+ return
+ }
+set var_index [lsearch $encoding_theme_template $var]
+if { $var_index < 0 } {
+ puts stderr "No such var $var for $theme_index $short_name"
+ return
+ }
+set var_name [get_theme_var_name $short_name $var]
+global $var_name
+lset user_encoding_themes [expr $start+$var_index] [set $var_name]
+}
+
+proc add_user_template_pane { template theme_index } {
+global encoding_theme_template
+foreach var $encoding_theme_template value $template {
+ set t_$var $value
+ }
+
+foreach var $encoding_theme_template value $template {
+ set var_name [get_theme_var_name $t_short_name $var]
+ global $var_name
+ catch {
+ unset $var_name
+ }
+ set $var_name $value
+ trace variable $var_name w "adjust_user_theme_var $theme_index $t_short_name $var ; skip_args3"
+ }
+
+add_parameter_pane "/Configuration/Encoding settings/Custom themes/${t_short_name}" $t_short_name \
+ "Description" entry [get_theme_var_name $t_short_name name] \
+ "Video codec parameters" heading "" \
+ "Bitrate control" choice [concat [get_theme_var_name $t_short_name q_control] { "Fix bitrate" "Fix quality" } ]\
+ "Bitrate" entry [get_theme_var_name $t_short_name video_bitrate] \
+ "Quality (smaller is better)" scale [concat [get_theme_var_name $t_short_name quality] { 2 31 } ] \
+ "Video codec" choice [concat [get_theme_var_name $t_short_name video_codec] { "H263" "H263I" "H263P" "MJPEG" "MPEG-1" "MPEG-4" "MSMPEG-4" "RV10" } ] \
+ "Audio codec parameters" heading "" \
+ "Audio bitrate" choice [concat [get_theme_var_name $t_short_name audio_bitrate] { "384000" "320000" "256000" "224000" "192000" "160000" "128000" "112000" "96000" "80000" "64000" "56000" "48000" "32000" } ] \
+ "Audio codec" choice [concat [get_theme_var_name $t_short_name audio_codec] { "PCM" "MPEG-2" "AC3" "MPEG-3" "VORBIS"} ] \
+ "File format parameters" heading "" \
+ "File format" choice [concat [get_theme_var_name $t_short_name file_format] { "none" "AVI" "ASF" "MPEG" "VOB" "MOV" "RM"} ] \
+ "File extension" entry [get_theme_var_name $t_short_name extension] \
+ "Capture mode" heading "" \
+ "Deinterlacing method" choice [concat [get_theme_var_name $t_short_name v4l_mode] [get_deinterlacing_methods] ] \
+ "Frame skipping" choice [concat [get_theme_var_name $t_short_name v4l_rate] {"as is" "one half" "one quarter"} ] \
+ "Delete theme" heading "" \
+ "Delete this theme" command "delete_user_encoding_theme $theme_index {$t_short_name}"
+}
+
+proc delete_user_encoding_theme { theme_index short_name } {
+global encoding_themes_table user_encoding_themes builtin_themes_count \
+ encoding_theme_template
+set short_name_index [lsearch $encoding_theme_template "short_name"]
+set start [expr ($theme_index-$builtin_themes_count)*[llength $encoding_theme_template]]
+set verify_short_name [lindex $user_encoding_themes [expr $start+$short_name_index]]
+if { $verify_short_name != $short_name } {
+ puts stderr "$verify_short_name!=$short_name for $theme_index"
+ return
+ }
+set end [expr $start+[llength $encoding_theme_template]-1]
+set user_encoding_themes [lreplace $user_encoding_themes $start $end]
+switch_to_pane "/Configuration/Encoding settings"
+rehash_themes
+}
+
+proc rehash_themes {} {
+global encoding_themes_list encoding_themes_table user_encoding_themes builtin_themes_count \
+ encoding_theme_template encoding_themes
+set encoding_themes_list {}
+set i 0
+foreach $encoding_theme_template $encoding_themes {
+ lappend encoding_themes_list $short_name
+ set encoding_themes_table($short_name) $i
+ incr i
+ }
+set builtin_themes_count $i
+foreach $encoding_theme_template $user_encoding_themes {
+ lappend encoding_themes_list $short_name
+ set encoding_themes_table($short_name) $i
+ incr i
+ }
+
+foreach key [get_pane_children "/Configuration/Encoding settings/Custom themes" ] {
+ delete_pane $key
+ }
+
+foreach theme [lsort -dictionary $encoding_themes_list] {
+ set index $encoding_themes_table($theme)
+ if { $index < $builtin_themes_count } { continue }
+ set start [expr ($index-$builtin_themes_count)*[llength $encoding_theme_template]]
+ set end [expr $start+[llength $encoding_theme_template]-1 ]
+ set template [lrange $user_encoding_themes $start $end]
+ puts "$index $template"
+ add_user_template_pane $template $index
+ }
+global SETUP_MAIN
+if { [winfo exists $SETUP_MAIN] && [winfo ismapped $SETUP_MAIN ] } {
+ resize_frames
+ }
+
+catch {
+ replace_parameter_choices "/Configuration/Encoding settings" 1 ffmpeg_encoding_theme $encoding_themes_list
+ }
+catch {
+ global panel_encoding_theme_menu
+ set menu $panel_encoding_theme_menu
+ $menu delete 0 end
+ foreach theme $encoding_themes_list {
+ $menu add radiobutton -label "$theme" -value "$theme" -variable ffmpeg_encoding_theme
+ }
+ }
+}
+
+rehash_themes
+
+add_parameter_pane "/Configuration/Encoding settings" "Encoding settings" \
+ "Pre-configured themes" heading "" \
+ "Encoding theme" choice [concat ffmpeg_encoding_theme $encoding_themes_list] \
+ "" ro_entry ffmpeg_encoding_theme_detail \
+ "Create custom theme" heading "" \
+ "Name" entry custom_theme_name \
+ "Create new theme based on current one" command create_new_theme
+
+add_description_pane "/Configuration/Encoding settings/Custom themes" "Custom themes" \
+{ You can create new custom encoding themes by
+duplicating an existing one. The newly created theme
+can then be changed to any supported combination of
+encoding parameters.}
+
+add_parameter_pane "/Configuration/Capture parameters" "Capture parameters" \
+ "V4L parameters" heading "" \
+ "Deinterlacing method" choice [concat current_v4l_mode [get_deinterlacing_methods]] \
+ "Frame skipping" choice {current_v4l_rrate "as is" "one half" "one quarter"} \
+ "Video frame rate" entry current_video_rate \
+ "Stop capture when fifo exceeds (MB)" entry ffmpeg_max_fifo_size
+
+if { [ffmpeg_present] } {
+# add_parameter_pane "/Configuration/Encoding settings/Compression parameters" "Compression parameters" \
+# "Video codec parameters" heading "" \
+# "Bitrate control" choice { ffmpeg_video_bitrate_control "Fix bitrate" "Fix quality" } \
+# "Bitrate" entry ffmpeg_video_bitrate \
+# "Quality (smaller is better)" scale { ffmpeg_video_quality 2 31 } \
+# "Video codec" choice { ffmpeg_video_codec "H263" "H263I" "H263P" "MJPEG" "MPEG-1" "MPEG-4" "MSMPEG-4" "RV10" } \
+# "Audio codec parameters" heading "" \
+# "Audio sample rate" choice {ffmpeg_audio_sample_rate "48000" "44100" "32000" "24000" "22050" "16000" } \
+# "Audio bitrate" choice {ffmpeg_audio_bitrate "384000" "320000" "256000" "224000" "192000" "160000" "128000" "112000" "96000" "80000" "64000" "56000" "48000" "32000" } \
+# "Audio codec" choice {ffmpeg_audio_codec "PCM" "MPEG-2" "AC3" "MPEG-3" "VORBIS"} \
+# "File format parameters" heading "" \
+# "File format" choice {ffmpeg_file_format "none" "AVI" "ASF" "MPEG" "VOB" "MOV" "RM"}
+
+ } {
+ add_description_pane "/Configuration/Compression parameters" "Compression parameters" "AVview has not been compiled to include compression library"
+ }
+
Index: setup.scp
===================================================================
RCS file: /cvsroot/gatos/avview/setup.scp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- setup.scp 3 Oct 2003 13:04:30 -0000 1.15
+++ setup.scp 2 Jan 2004 09:57:39 -0000 1.16
@@ -73,18 +73,41 @@
set L [grid bbox $SETUP_MAIN 2 1]
# $pane configure -width [$SETUP_MAIN.f cget -width] -height [$SETUP_MAIN.f cget -height]
$pane configure -width [lindex $L 2] -height [lindex $L 3]
+ } {
+ puts stderr "Could not find pane for key $key"
}
}
proc get_pane_frame {key } {
global SETUP_PANES
set a ""
-catch {
+if { [catch {
set a $SETUP_PANES($key:pane_frame)
+ } err ] } {
+ puts stderr "Cannot find pane frame for key $key: $err"
}
return "$a"
}
+proc get_pane_children { key } {
+global SETUP_PANES
+set A [array names SETUP_PANES -regexp "^$key/(\[^/\]*):pane_frame$"]
+set children {}
+foreach element $A {
+ regexp {^(.*):pane_frame$} $element {} child
+ lappend children $child
+ }
+return $children
+}
+
+proc delete_pane { key } {
+global SETUP_PANES SETUP_MAIN
+set pane_frame $SETUP_PANES($key:pane_frame)
+unset SETUP_PANES($key:pane_frame)
+Tree:delitem $SETUP_MAIN.tree $key
+destroy $pane_frame
+}
+
proc add_pane {key title} {
global SETUP_MAIN
global SETUP_PANES
@@ -232,11 +255,13 @@
}
-proc replace_parameter_choices {key parameter_index choices} {
-catch {
- set PANE_FRAME [get_pane_frame "$key"]
- set A $PANE_FRAME.f.canvas.f
- puts "[$A.optionmenu$parameter_index cget -menu]"
+proc replace_parameter_choices {key parameter_index variable choices} {
+set PANE_FRAME [get_pane_frame $key]
+set A $PANE_FRAME.f.canvas.f
+set menu [$A.optionmenu$parameter_index cget -menu]
+$menu delete 0 end
+foreach choice $choices {
+ $menu add radiobutton -label $choice -value $choice -variable $variable
}
}
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- v4l.scp 20 Dec 2003 22:28:26 -0000 1.57
+++ v4l.scp 2 Jan 2004 09:57:39 -0000 1.58
@@ -87,6 +87,8 @@
eval label $cw.encoding_themel -text "\"Encoding theme: \"" [get_settings $cw.encoding_themel label Capture V4L]
set menu [tk_optionMenu $cw.encoding_theme_optionmenu ffmpeg_encoding_theme None]
+global panel_encoding_theme_menu
+set panel_encoding_theme_menu $menu
$menu delete 0 end
global encoding_themes_list
foreach theme $encoding_themes_list {
Index: video_device.scp
===================================================================
RCS file: /cvsroot/gatos/avview/video_device.scp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- video_device.scp 19 Jul 2003 04:11:29 -0000 1.6
+++ video_device.scp 2 Jan 2004 09:57:39 -0000 1.7
@@ -29,3 +29,4 @@
}
}
+replace_parameter_choices "/Configuration/Video device parameters" 0 current_port a
|
|
From: <gat...@li...> - 2003-12-30 18:04:55
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv19446
Modified Files:
r128_video.c
Log Message:
Reintegrate chunk of code that went missing in 4.2.0->4.3.0 transition into rage128 driver.
This should fix "corrupted bitmaps on exit from avview" problems.
Index: r128_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/r128_video.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- r128_video.c 16 Sep 2003 13:45:03 -0000 1.40
+++ r128_video.c 30 Dec 2003 18:04:52 -0000 1.41
@@ -1539,6 +1539,15 @@
if (info->cursor_start)
xf86ForceHWCursor (pScrn->pScreen, FALSE);
}
+ if(pPriv->video_stream_active) {
+ R128WaitForFifo(pScrn, 8);
+ OUTPLL(R128_FCP_CNTL, 0x404);
+ OUTREG(R128_CAP0_TRIG_CNTL, 0x0);
+ R128ResetVideo(pScrn);
+ pPriv->video_stream_active = FALSE;
+ R128MuteAudio(pPriv, TRUE);
+ if(pPriv->i2c!=NULL) R128_board_setmisc(pPriv);
+ }
if(pPriv->linear) {
xf86FreeOffscreenLinear(pPriv->linear);
pPriv->linear = NULL;
|
|
From: <gat...@li...> - 2003-12-21 09:25:50
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv20068
Modified Files:
avview.scp
Log Message:
Get control window to appear all at once instead of being constructed after
it was mapped.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- avview.scp 20 Dec 2003 22:28:26 -0000 1.147
+++ avview.scp 21 Dec 2003 09:25:47 -0000 1.148
@@ -908,9 +908,11 @@
}
-foreach var {show_control_window attributes_window capture_window alsa_window theme_name} {
+foreach var {attributes_window capture_window alsa_window theme_name} {
set $var [set $var]
}
+update
+set show_control_window $show_control_window
}
after idle {
|
|
From: <gat...@li...> - 2003-12-21 09:06:14
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv16776
Modified Files:
ffmpeg.c
Log Message:
Start looking over ffmpeg structures for missed field changes.
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- ffmpeg.c 20 Dec 2003 22:28:26 -0000 1.82
+++ ffmpeg.c 21 Dec 2003 09:06:11 -0000 1.83
@@ -474,7 +474,7 @@
sdata->last_video_timestamp=0;
if(arg_video_codec==NULL){
- sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG4);
+ sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
} else
if(!strcmp("MPEG-1", arg_video_codec)){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
@@ -590,9 +590,11 @@
sdata->video_codec_context.spatial_cplx_masking=0;
sdata->video_codec_context.p_masking=0;
sdata->video_codec_context.dark_masking=0;
+sdata->video_codec_context.mpeg_quant=1;
+sdata->video_codec_context.global_quality=sdata->quality;
if((arg_video_codec!=NULL)&&(
- !strcmp(arg_video_codec, "MPEG-4") ||
- !strcmp(arg_video_codec, "MSMPEG-4")))
+ !strcasecmp(arg_video_codec, "MPEG-4") ||
+ !strcasecmp(arg_video_codec, "MSMPEG-4")))
sdata->video_codec_context.gop_size=12;
if(sdata->video_codec->priv_data_size==0){
fprintf(stderr,"BUG: sdata->video_codec->priv_data_size==0, fixing it\n");
|
|
From: <gat...@li...> - 2003-12-20 22:28:30
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv1337
Modified Files:
avview.scp ffmpeg.c ffmpeg.scp v4l.scp
Log Message:
Add support for recording to vob files.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- avview.scp 20 Dec 2003 17:59:15 -0000 1.146
+++ avview.scp 20 Dec 2003 22:28:26 -0000 1.147
@@ -436,7 +436,7 @@
display_setup_window_on_startup file_save_path dpms_off_on_fullscreen_power_off
disable_fullscreen_switching use_physical_screen_size message_visible_secs
on_screen_cc_page save_settings_on_exit transparent_when_minimized mute_when_minimized
- transparency_ratio} {
+ transparency_ratio current_file_extension} {
global $variable
puts $fileid "\nglobal $variable"
puts $fileid "set $variable \"[set $variable]\""
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- ffmpeg.c 17 Dec 2003 13:43:49 -0000 1.81
+++ ffmpeg.c 20 Dec 2003 22:28:26 -0000 1.82
@@ -479,6 +479,9 @@
if(!strcmp("MPEG-1", arg_video_codec)){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
} else
+if(!strcmp("MPEG-2", arg_video_codec)){
+ sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
+ } else
if(!strcmp("MPEG-4", arg_video_codec)){
sdata->video_codec=avcodec_find_encoder(CODEC_ID_MPEG4);
} else
@@ -766,6 +769,10 @@
} else
if(!strcasecmp("mpg", arg_av_format)){
sdata->format_context.oformat=guess_format("mpeg", NULL, NULL);
+ } else
+if(!strcasecmp("vob", arg_av_format)){
+ sdata->format_context.oformat=guess_format("vob", NULL, NULL);
+ fprintf(stderr,"**VOB\n");
} else
if(!strcasecmp("mpeg", arg_av_format)){
sdata->format_context.oformat=guess_format("mpeg", NULL, NULL);
Index: ffmpeg.scp
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.scp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ffmpeg.scp 17 Dec 2003 21:16:04 -0000 1.9
+++ ffmpeg.scp 20 Dec 2003 22:28:26 -0000 1.10
@@ -12,7 +12,8 @@
audio_codec
file_format
v4l_mode
- v4l_rate }
+ v4l_rate
+ extension }
set encoding_themes {
"Very high quality MPEG-1"
"MPEG-1 VHQ"
@@ -25,6 +26,7 @@
"MPEG"
"double-interpolate"
"one-half"
+ "mpg"
"High quality MPEG-1"
"MPEG-1 HQ"
@@ -37,6 +39,7 @@
"MPEG"
"double-interpolate"
"one-half"
+ "mpg"
"VCR quality MPEG-1"
"MPEG-1 VCR"
@@ -49,6 +52,7 @@
"MPEG"
"half-width"
"one-half"
+ "mpg"
"Webcam quality MPEG-1"
"MPEG-1 Webcam"
@@ -61,6 +65,7 @@
"MPEG"
"half-width"
"one-quarter"
+ "mpg"
"Very high quality MPEG-4"
"MPEG-4 VHQ"
@@ -73,6 +78,7 @@
"AVI"
"double-interpolate"
"one-half"
+ "avi"
"High quality MPEG-4"
"MPEG-4 HQ"
@@ -85,6 +91,33 @@
"AVI"
"double-interpolate"
"one-half"
+ "avi"
+
+ "Very high quality DVD"
+ "DVD VHQ"
+ 600000
+ 2
+ "Fix quality"
+ "MPEG-2"
+ 64000
+ "MPEG-2"
+ "VOB"
+ "double-interpolate"
+ "one-half"
+ "vob"
+
+ "High quality DVD"
+ "DVD HQ"
+ 600000
+ 5
+ "Fix quality"
+ "MPEG-2"
+ 64000
+ "MPEG-2"
+ "VOB"
+ "double-interpolate"
+ "one-half"
+ "vob"
}
global encoding_themes_list encoding_themes_table
@@ -120,7 +153,7 @@
"Audio bitrate" choice {ffmpeg_audio_bitrate "384000" "320000" "256000" "224000" "192000" "160000" "128000" "112000" "96000" "80000" "64000" "56000" "48000" "32000" } \
"Audio codec" choice {ffmpeg_audio_codec "PCM" "MPEG-2" "AC3" "MPEG-3" "VORBIS"} \
"File format parameters" heading "" \
- "File format" choice {ffmpeg_file_format "none" "AVI" "ASF" "MPEG" "DV" "RM"} \
+ "File format" choice {ffmpeg_file_format "none" "AVI" "ASF" "MPEG" "VOB" "DV" "RM"} \
"Stop capture when fifo exceeds (MB)" entry ffmpeg_max_fifo_size
# "Record in chunks of (MB)" entry ffmpeg_recording_chunk_size
@@ -139,7 +172,7 @@
proc set_encoding_theme {} {
global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
- encoding_themes_table encoding_theme_template encoding_themes
+ encoding_themes_table encoding_theme_template encoding_themes
set theme [lrange $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]] end]
set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
foreach $encoding_theme_template $theme {
@@ -153,6 +186,7 @@
ffmpeg_file_format file_format
current_v4l_mode v4l_mode
current_v4l_rate v4l_rate
+ current_file_extension extension
} {
global $var
set $var [set $field]
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- v4l.scp 20 Dec 2003 17:59:15 -0000 1.56
+++ v4l.scp 20 Dec 2003 22:28:26 -0000 1.57
@@ -693,3 +693,12 @@
.controlwin.capture.video_quality_value_label configure -text "$ffmpeg_video_quality (very low)"
}
skip_args3}
+
+global current_file_extension
+trace variable current_file_extension w {
+ global current_capture_filename current_file_extension
+ if { [regexp {^(.*)\.([^.]*)$} $current_capture_filename {} base ext] } {
+ set current_capture_filename "$base.$current_file_extension"
+ }
+ skip_args3 }
+
|
|
From: <gat...@li...> - 2003-12-20 18:35:02
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1:/tmp/cvs-serv32181 Modified Files: Makefile.am configure.in Log Message: Actually attempt to install AVview kdelnk file in KDE menu. Bump up version number due to recent rearrangement of the menus. Index: Makefile.am =================================================================== RCS file: /cvsroot/gatos/avview/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 22 Feb 2003 06:56:56 -0000 1.19 +++ Makefile.am 20 Dec 2003 18:34:59 -0000 1.20 @@ -48,6 +48,9 @@ echo 'Icon=$(datadir)/AVview/avview-48x48.png' >> start_avview.desktop install-data-hook: reminders + $(INSTALL_DATA) start_avview.desktop $(KDEDIR)/share/applnk/Multimedia/ || \ + $(INSTALL_DATA) start_avview.desktop $(KDEDIR)/share/apps/kappfinder/apps/Multimedia/ || \ + true @echo "" @echo " ************************************************" @echo "" Index: configure.in =================================================================== RCS file: /cvsroot/gatos/avview/configure.in,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- configure.in 17 Dec 2003 13:43:49 -0000 1.56 +++ configure.in 20 Dec 2003 18:34:59 -0000 1.57 @@ -4,7 +4,7 @@ # Note to self: always bump version number when there are changes # in setup window or avview_shell # -AC_INIT([AVview], [0.80.0], [gat...@li...]) +AC_INIT([AVview], [0.80.1], [gat...@li...]) # # For now I'll be happier without NEWS and Changelog files. # |
|
From: <gat...@li...> - 2003-12-20 17:59:19
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv26729
Modified Files:
alsa.scp avview.scp themes.scp v4l.scp xv.scp
Log Message:
Cleanup menus and play around with themes.
Index: alsa.scp
===================================================================
RCS file: /cvsroot/gatos/avview/alsa.scp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- alsa.scp 20 Dec 2003 16:22:46 -0000 1.20
+++ alsa.scp 20 Dec 2003 17:59:15 -0000 1.21
@@ -262,7 +262,7 @@
grid $cw.title - - -sticky news -pady 2 -padx 2 -row 0
grid columnconfigure $cw 1 -weight 1
label $cw.devicel -text "ALSA Audio device: "
-eval $cw.devicel configure [get_settings $cw.devicel ALSA]
+eval $cw.devicel configure [get_settings $cw.devicel label ALSA]
global alsa_device_menu
global current_alsa_device1
set save_alsa_device $current_alsa_device1
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- avview.scp 20 Dec 2003 16:22:46 -0000 1.145
+++ avview.scp 20 Dec 2003 17:59:15 -0000 1.146
@@ -218,7 +218,7 @@
global current_port_menu
global current_encoding_menu
-eval label $c.encodingl -text {{Encoding: }} [get_settings $c.encodingl AVview]
+eval label $c.encodingl -text {{Encoding: }} [get_settings $c.encodingl label AVview]
set current_encoding_menu [tk_optionMenu $c.encoding_optionmenu current_encoding_name none]
eval $c.encoding_optionmenu configure [get_settings $c.encoding_optionmenu AVview]
eval $current_encoding_menu configure [get_settings $current_encoding_menu AVview menu]
@@ -226,7 +226,7 @@
grid $c.encodingl $c.encoding_optionmenu -sticky news
grid configure $c.encodingl -sticky nws
-eval label $c.channell -text {{Channel: }} [get_settings $c.channell]
+eval label $c.channell -text {{Channel: }} [get_settings $c.channell label AVview]
set current_channel_menu [tk_optionMenu $c.channel_optionmenu current_channel none]
eval $c.channel_optionmenu configure [get_settings $c.channel_optionmenu AVview]
eval $current_channel_menu configure [get_settings $current_channel_menu AVview menu]
@@ -234,14 +234,14 @@
grid $c.channell $c.channel_optionmenu -sticky news
grid configure $c.channell -sticky nsw
-eval checkbutton $c.xv_attr -variable attributes_window -text {{Xv Attributes}} -indicatoron false -onvalue true -offvalue false
+eval checkbutton $c.xv_attr -variable attributes_window -text {{Xv Attributes}} -indicatoron false -onvalue true -offvalue false [get_settings $c.xv_attr checkbutton AVview]
grid $c.xv_attr -row 0 -column 2 -padx 2 -pady 2 -sticky ew
-eval checkbutton $c.capture_attr -variable capture_window -text {{Capture controls}} -indicatoron false -onvalue true -offvalue false
+eval checkbutton $c.capture_attr -variable capture_window -text {{Capture controls}} -indicatoron false -onvalue true -offvalue false [get_settings $c.capture_attr checkbutton AVview]
grid $c.capture_attr -row 0 -column 3 -padx 2 -pady 2
-eval checkbutton $c.alsa_attr -variable alsa_window -text {{ALSA mixer}} -indicatoron false -onvalue true -offvalue false
+eval checkbutton $c.alsa_attr -variable alsa_window -text {{ALSA mixer}} -indicatoron false -onvalue true -offvalue false [get_settings $c.alsa_attr checkbutton AVview]
grid $c.alsa_attr -row 0 -column 4 -padx 2 -pady 2
-eval button $c.setup_window -text {{Setup window}} -command create_setup_window
+eval button $c.setup_window -text {{Setup window}} -command create_setup_window [get_settings $c.setup_window button AVview]
grid $c.setup_window -row 1 -column 2 -padx 2 -pady 2
grid $c - - -sticky nw
@@ -733,8 +733,6 @@
menu .video_menu.aspect_menu -type normal -tearoff false
menu .video_menu.channel_menu -type normal -tearoff false
menu .video_menu.connector_menu -type normal -tearoff false
-menu .video_menu.interface_menu -type normal -tearoff false
-menu .video_menu.interface_menu.theme_menu -type normal -tearoff false
menu .video_menu.cc_menu -type normal -tearoff false
.video_menu add command -label "Toggle mute" -command toggle_mute
@@ -745,7 +743,8 @@
.video_menu add cascade -menu .video_menu.size_menu -label "Size"
.video_menu add cascade -menu .video_menu.aspect_menu -label "Aspect ratio"
.video_menu add separator
-.video_menu add cascade -menu .video_menu.interface_menu -label "User interface"
+.video_menu add checkbutton -label "Show control window" -variable show_control_window -onvalue true -offvalue false
+.video_menu add command -label "Open setup window" -command "create_setup_window"
.video_menu add separator
.video_menu add command -label "Exit AVview" -command exit_avview
.video_menu add separator
@@ -778,18 +777,6 @@
.video_menu.aspect_menu add radiobutton -label "Aspect ratio 16:9" -variable aspect_ratio -value [list 16 9]
.video_menu.aspect_menu add radiobutton -label "Aspect ratio 9:16" -variable aspect_ratio -value [list 9 16]
-.video_menu.interface_menu add command -label "Show setup window" -command "create_setup_window"
-.video_menu.interface_menu add command -label "Favorite channel editor" -command scan_channels
-.video_menu.interface_menu add separator
-.video_menu.interface_menu add checkbutton -label "Show control window" -variable show_control_window -onvalue true -offvalue false
-.video_menu.interface_menu add checkbutton -label "Show Xv attributes section" -variable attributes_window -onvalue true -offvalue false
-.video_menu.interface_menu add checkbutton -label "Show capture (V4L) section" -variable capture_window -onvalue true -offvalue false
-if { [alsa_present] == "yes" } {
- .video_menu.interface_menu add checkbutton -label "Show audio mixer (ALSA) section" -variable alsa_window -onvalue true -offvalue false
- }
-.video_menu.interface_menu add separator
-.video_menu.interface_menu add cascade -label "Theme" -menu .video_menu.interface_menu.theme_menu
-
bind .video_menu <Unmap> {
grab release .video_menu
grab -global .
@@ -857,21 +844,6 @@
wm title . "AVview"
wm title .controlwin "AV Control"
-#
-# Generate theme menu
-#
-#$c.interface_menubutton.menu.theme delete 0 end
-.video_menu.interface_menu.theme_menu delete 0 end
-foreach theme [lsort -ascii [array names theme_list]] {
-# $c.interface_menubutton.menu.theme add radiobutton -label "$theme" \
-# -value "$theme" -variable theme_name \
-# -command {global theme_name ; reset_theme $theme_name}
-
- .video_menu.interface_menu.theme_menu add radiobutton -label "$theme" \
- -value "$theme" -variable theme_name \
- -command {global theme_name ; reset_theme $theme_name}
- }
-
if { [alsa_present] } {
add_parameter_pane "/Configuration/User interface settings" "User interface settings" \
"Display setup window on startup" checkbutton display_setup_window_on_startup \
@@ -881,7 +853,8 @@
"Display mixer(ALSA) subsection" checkbutton alsa_window \
"Use physical screen size for aspect ratio" checkbutton use_physical_screen_size \
"On screen message stays visible for as long as (secs)" choice { message_visible_secs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 } \
- "Warn about missing km" checkbutton warn_about_missing_km
+ "Warn about missing km" checkbutton warn_about_missing_km \
+ "Color theme" choice [concat theme_name $theme_names]
} {
add_parameter_pane "/Configuration/User interface settings" "User interface settings" \
"Display setup window on startup" checkbutton display_setup_window_on_startup \
@@ -891,6 +864,7 @@
"Use physical screen size for aspect ratio" checkbutton use_physical_screen_size \
"Temporary message stays visible for as long as (secs)" choice { message_visible_secs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 } \
"Warn about missing km" checkbutton warn_about_missing_km
+ "Color theme" choice [concat theme_name $theme_names]
}
add_parameter_pane "/Configuration/User interface settings/Fullscreen behaviour" "Fullscreen behaviour" \
@@ -924,16 +898,17 @@
}
proc set_ui_traces {} {
-global show_control_window attributes_window capture_window alsa_window
+global show_control_window attributes_window capture_window alsa_window theme_name
trace variable show_control_window w "show_control_window_proc ; skip_args3"
trace variable attributes_window w { generate_attributes_window .controlwin.allattributes ; skip_args3 }
trace variable capture_window w { generate_capture_window .controlwin.capture ; skip_args3 }
+trace variable theme_name w { global theme_name ; reset_theme $theme_name ; skip_args3 }
if {[alsa_present] == "yes" } {
trace variable alsa_window w "generate_alsa_window .controlwin.alsamixer ; skip_args3"
}
-foreach var {show_control_window attributes_window capture_window alsa_window} {
+foreach var {show_control_window attributes_window capture_window alsa_window theme_name} {
set $var [set $var]
}
}
Index: themes.scp
===================================================================
RCS file: /cvsroot/gatos/avview/themes.scp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- themes.scp 30 Sep 2002 05:48:32 -0000 1.9
+++ themes.scp 20 Dec 2003 17:59:15 -0000 1.10
@@ -237,6 +237,173 @@
set theme_list(Pink) theme_pink
+proc theme_rainbow { widget args1 } {
+# uncomment to debug theme setting failures
+#puts "widget=$widget args=$args1"
+switch -glob -- "$widget $args1" \
+ .video*AVview {return "-background #102030" } \
+ *.title* { return "-background #000088 -foreground yellow" } \
+ *.c.f.*checkbutton*ALSA* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800 -activebackground #FFDDDD -selectcolor #FF4444 -highlightbackground #FFCCCC";
+ } {
+ return "-background #008800 -activebackground #FFDDDD -selectcolor #FF4444 -highlightbackground #FFAAAA";
+ }
+ } \
+ *.c.f.*scale*ALSA* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800 -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } {
+ return "-background #008800 -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFAAAA";
+ }
+ } \
+ *.c.f.*optionmenu*ALSA*menu* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } {
+ return "-background #008800 -activebackground #FFDDDD -highlightbackground #FFAAAA";
+ }
+ } \
+ *.c.f.*optionmenu*ALSA* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800 -activebackground #FFDDDD"
+ } {
+ return "-background #008800 -activebackground #FFDDDD"
+ }
+ } \
+ *.c.f.*label*ALSA* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800 -foreground #AAFFAA"
+ } {
+ return "-background #008800 -foreground #FFFFAA"
+ }
+ } \
+ *.c.f.*ALSA* { \
+ set i [lindex $args1 1]
+ if { [expr $i % 2] } {
+ return "-background #888800"
+ } {
+ return "-background #008800"
+ }
+ } \
+ *.allattributes.*checkbutton*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -activebackground #FFDDDD -selectcolor #FF4444 -highlightbackground #FFCCCC";
+ } {
+ return "-background #886644 -activebackground #FFDDDD -selectcolor #FF4444 -highlightbackground #FFAAAA";
+ }
+ } \
+ *.allattributes.*button*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -foreground #FFCCAA -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } {
+ return "-background #886644 -foreground #00FFFF -activebackground #FFDDDD -highlightbackground #FFAAAA";
+ }
+ } \
+ *.allattributes.*scale*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -foreground #FFCCAA -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } {
+ return "-background #886644 -foreground #00FFFF -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFAAAA";
+ }
+ } \
+ *.allattributes.*optionmenu*XVideo*attribute*menu* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } {
+ return "-background #886644 -activebackground #FFDDDD -highlightbackground #FFAAAA";
+ }
+ } \
+ *.allattributes.*optionmenu*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -activebackground #FFDDDD";
+ } {
+ return "-background #886644 -activebackground #FFDDDD";
+ }
+ } \
+ *.allattributes.*label*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888 -foreground #FFCCAA";
+ } {
+ return "-background #886644 -foreground #88FFFF";
+ }
+ } \
+ *.allattributes.*entry*XVideo*attribute* { \
+ return "-background #CCCCCC -foreground black"
+ } \
+ *.allattributes.*XVideo*attribute* { \
+ set i [lindex $args1 5]
+ if { [expr $i % 2] } {
+ return "-background #008888";
+ } {
+ return "-background #444444";
+ }
+ } \
+ *.sel*ChannelList* { \
+ set i [lindex $args1 2]
+ if { [expr ($i/2) % 2] } {
+ return "-background #FFCCCC";
+ } {
+ return "-background #FFAAAA";
+ }
+ } \
+ *.cch*ChannelList* { \
+ set i [lindex $args1 2]
+ if { [expr ($i/2) % 2] } {
+ return "-background #FFCCCC";
+ } {
+ return "-background #FFAAAA";
+ }
+ } \
+ *video_hist\ *Capture* {
+ return "-background #DDDDDD"
+ } \
+ *audio_level\ *Capture* {
+ return "-background #DDDDDD"
+ } \
+ *optionmenu*\ menu { \
+ return "-background #884444 -activebackground #FFDDDD -foreground white -selectcolor #FF4444";
+ } \
+ *optionmenu* { \
+ return "-background #884444 -activebackground #FFDDDD -highlightbackground #FFCCCC -foreground white";
+ } \
+ *button*.menu* { \
+ return "-background #884444 -activebackground #FFDDDD";
+ } \
+ *attr*checkbutton* { \
+ return "-background #884444 -foreground #AAFFFF ";
+ } \
+ *button* { \
+ return "-background #884444 -foreground #AAFFFF -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } \
+ *label* { \
+ return "-background #884488 -foreground #AAFFAA";
+ } \
+ *entry* { \
+ return "-background #DDDDDD -highlightbackground #FFCCCC";
+ } \
+ *scroll* {
+ return "-background #884444 -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } \
+ *scale* {
+ return "-background #884444 -troughcolor #FF8888 -activebackground #FFDDDD -highlightbackground #FFCCCC";
+ } \
+ default { return "-background #884488" }
+}
+
+set theme_list(Rainbow) theme_rainbow
+
proc theme_default { widget args1 } {
switch -glob -- "$widget $args1" \
.video*AVview {return "-background #102030" } \
@@ -341,4 +508,10 @@
set theme_list(Widget\ dump) theme_widget_dump
set_theme Default
+
+global theme_names
+set theme_names {}
+foreach theme [lsort -ascii [array names theme_list]] {
+ lappend theme_names $theme
+ }
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- v4l.scp 20 Dec 2003 16:22:46 -0000 1.55
+++ v4l.scp 20 Dec 2003 17:59:15 -0000 1.56
@@ -49,7 +49,7 @@
grid $cw.title - - -sticky news -pady 2 -padx 2
grid columnconfigure $cw 1 -weight 1
-eval label $cw.devicel -text "\"V4L device: \"" [get_settings $cw.devicel Capture V4L]
+eval label $cw.devicel -text "\"V4L device: \"" [get_settings $cw.devicel label Capture V4L]
global v4l_device_menu
set v4l_device_menu [tk_optionMenu $cw.device_optionmenu current_v4l_device none]
eval $cw.device_optionmenu configure [get_settings $cw.device_optionmenu Capture V4L]
@@ -60,7 +60,7 @@
grid configure $cw.devicel -sticky nws
if { [alsa_present] } {
- eval label $cw.alsadevicel -text "\"ALSA device: \"" [get_settings $cw.alsadevicel Capture V4L]
+ eval label $cw.alsadevicel -text "\"ALSA device: \"" [get_settings $cw.alsadevicel label Capture V4L]
global v4l_alsadevice_menu current_alsa_capture_device
set old_value $current_alsa_capture_device
set v4l_alsadevice_menu [tk_optionMenu $cw.alsadevice_optionmenu current_alsa_capture_device none]
@@ -77,29 +77,15 @@
} ]
}
-
-#set methods [get_deinterlacing_methods]
-#eval label $cw.model -text "\"Recording mode: \"" [get_settings $cw.model Capture V4L]
-#set menu [tk_optionMenu $cw.mode_optionmenu current_v4l_mode None]
-#$menu delete 0 end
-#foreach method $methods {
-# $menu add radiobutton -label "$method" -value "$method" -variable current_v4l_mode
-# }
-#eval $cw.mode_optionmenu configure [get_settings $cw.mode_optionmenu Capture V4L]
-#eval $menu configure [get_settings $menu Capture V4L menu]
-#grid $cw.model $cw.mode_optionmenu - -sticky news
-#grid configure $cw.model -sticky nws
-
-
-eval label $cw.windowl -text "\"Window: \"" [get_settings $cw.windowl Capture V4L]
-eval label $cw.window -text "\"N/A\"" [get_settings $cw.window Capture V4L]
+eval label $cw.windowl -text "\"Window: \"" [get_settings $cw.windowl label Capture V4L]
+eval label $cw.window -text "\"N/A\"" [get_settings $cw.window label Capture V4L]
eval button $cw.window_button -text "Change" -state disabled [get_settings $cw.window_button Capture V4L]
grid $cw.windowl $cw.window $cw.window_button
grid configure $cw.windowl -sticky nws
grid configure $cw.window_button -sticky news
-eval label $cw.encoding_themel -text "\"Encoding theme: \"" [get_settings $cw.encoding_themel Capture V4L]
+eval label $cw.encoding_themel -text "\"Encoding theme: \"" [get_settings $cw.encoding_themel label Capture V4L]
set menu [tk_optionMenu $cw.encoding_theme_optionmenu ffmpeg_encoding_theme None]
$menu delete 0 end
global encoding_themes_list
@@ -120,14 +106,14 @@
# grid $cw.rratel $cw.rrate_optionmenu - -sticky news
# grid configure $cw.rratel -sticky nws
- eval label $cw.video_ratel -text "\"V4L device framerate:\"" [get_settings $cw.video_ratel Capture V4L]
+ eval label $cw.video_ratel -text "\"V4L device framerate:\"" [get_settings $cw.video_ratel label Capture V4L]
entry $cw.video_rate_entry -textvariable current_video_rate
eval $cw.video_rate_entry configure [get_settings $cw.video_rate_entry Capture V4L]
grid $cw.video_ratel $cw.video_rate_entry
grid configure $cw.video_ratel -sticky nws
grid configure $cw.video_rate_entry -sticky news
- eval label $cw.filenamel -text "\"Save to file:\"" [get_settings $cw.filenamel Capture V4L]
+ eval label $cw.filenamel -text "\"Save to file:\"" [get_settings $cw.filenamel label Capture V4L]
eval entry $cw.filename_entry -textvariable current_capture_filename [get_settings $cw.filename_entry Capture V4L]
button $cw.filename_button -text "Change" -command {
global current_capture_filename;
@@ -342,14 +328,14 @@
#
button $sw.f.sab -text "Save as" -command "save_image_as $sw $image"
-eval $sw.f.sab configure [get_settings $sw.f.sab Capture V4L]
+eval $sw.f.sab configure [get_settings $sw.f.sab button Capture V4L]
set menu [tk_optionMenu $sw.f.type save_type Postscript PPM]
-eval $sw.f.type configure [get_settings $sw.f.type Capture V4L]
-eval $menu configure [get_settings $menu Capture V4L]
+eval $sw.f.type configure [get_settings $sw.f.type optionmenu menu Capture V4L]
+eval $menu configure [get_settings $menu menu Capture V4L]
grid $sw.f.sab $sw.f.type -padx 5
-eval $cw.c configure [get_settings $cw.c Capture V4L]
+eval $cw.c configure [get_settings $cw.c canvas Capture V4L]
eval $sw.vscroll configure [get_settings $sw.vscroll Capture V4L]
eval $sw.hscroll configure [get_settings $sw.hscroll Capture V4L]
}
@@ -520,15 +506,15 @@
proc make_video_stats { widget } {
label $widget.total_stream_length -text "Total stream length:"
label $widget.total_stream_length_value -text "0 Mb"
-eval $widget.total_stream_length configure [get_settings $widget.total_stream_length Capture V4L]
-eval $widget.total_stream_length_value configure [get_settings $widget.total_stream_length_value Capture V4L]
-grid $widget.total_stream_length $widget.total_stream_length_value -sticky nws
+eval $widget.total_stream_length configure [get_settings $widget.total_stream_length label Capture V4L]
+eval $widget.total_stream_length_value configure [get_settings $widget.total_stream_length_value label value Capture V4L]
+grid $widget.total_stream_length $widget.total_stream_length_value -sticky nws -padx 10
label $widget.frames_encoded -text "Video frames encoded:"
label $widget.frames_encoded_value -text "0"
-eval $widget.frames_encoded configure [get_settings $widget.frames_encoded Capture V4L]
-eval $widget.frames_encoded_value configure [get_settings $widget.frames_encoded_value Capture V4L]
-grid $widget.frames_encoded $widget.frames_encoded_value -sticky nws
+eval $widget.frames_encoded configure [get_settings $widget.frames_encoded label Capture V4L]
+eval $widget.frames_encoded_value configure [get_settings $widget.frames_encoded_value label value Capture V4L]
+grid $widget.frames_encoded $widget.frames_encoded_value -sticky nws -padx 10
label $widget.fifo_label -text "Fifo size: "
label $widget.fifo_value_label -text "0 Mb"
@@ -542,10 +528,10 @@
grid columnconfig $widget 3 -weight 1
label $widget.f.audio_levels_label -text "Audio levels"
-eval $widget.f.audio_levels_label configure [get_settings $widget.f.audio_levels Capture V4L]
+eval $widget.f.audio_levels_label configure [get_settings $widget.f.audio_levels_label Capture V4L]
label $widget.f.video_hist_label -text "Luminosity histogram"
-eval $widget.f.video_hist_label configure [get_settings $widget.f.video_hist Capture V4L]
+eval $widget.f.video_hist_label configure [get_settings $widget.f.video_hist_label Capture V4L]
grid $widget.f.audio_levels_label - $widget.f.video_hist_label
canvas $widget.f.left_audio_level -height 80 -width 20 -relief sunken -borderwidth 1
Index: xv.scp
===================================================================
RCS file: /cvsroot/gatos/avview/xv.scp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- xv.scp 20 Dec 2003 16:22:46 -0000 1.23
+++ xv.scp 20 Dec 2003 17:59:15 -0000 1.24
@@ -213,7 +213,7 @@
grid columnconfigure .controlwin 0 -weight 1
-label $af.title -text "Attributes" -background black -foreground white
+eval label $af.title -text {{Xv attributes}} -background black -foreground white [get_settings $af.title AVview XVideo]
grid $af.title - -sticky news -pady 2 -padx 2 -row 0
eval frame $af.f1 -relief groove -borderwidth 2 [get_settings $af.f1 AVview XVideo]
|
|
From: <gat...@li...> - 2003-12-20 16:22:50
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv11552
Modified Files:
alsa.scp avview.scp v4l.scp xv.scp
Log Message:
Simplify and speedup code controlling window behaviour.
Index: alsa.scp
===================================================================
RCS file: /cvsroot/gatos/avview/alsa.scp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- alsa.scp 3 Apr 2003 13:06:46 -0000 1.19
+++ alsa.scp 20 Dec 2003 16:22:46 -0000 1.20
@@ -221,9 +221,12 @@
incr i
}
-update
-set bbox [grid bbox $mw]
-$canvas configure -scrollregion "[grid bbox $mw]" -width [expr [lindex $bbox 2]+8]
+after idle [ subst -nocommands {
+ catch {
+ set bbox [grid bbox $mw]
+ $canvas configure -scrollregion "[grid bbox $mw]" -width [expr [lindex \$bbox 2]+8]
+ }
+ } ]
}
proc generate_alsa_window { cw } {
@@ -262,6 +265,7 @@
eval $cw.devicel configure [get_settings $cw.devicel ALSA]
global alsa_device_menu
global current_alsa_device1
+set save_alsa_device $current_alsa_device1
trace vdelete current_alsa_device1 w "set_alsa_device .controlwin.alsamixer ; skip_args3"
set alsa_device_menu [tk_optionMenu $cw.device_optionmenu current_alsa_device1 none]
eval $cw.device_optionmenu configure [get_settings $cw.device_optionmenu ALSA]
@@ -275,10 +279,13 @@
grid $cw.f - - -sticky news
-set save_alsa_device "$current_alsa_device"
-after idle "global current_alsa_device ; set current_alsa_device none ; rescan_alsa_devices $alsa_device_menu current_alsa_device1"
-global current_alsa_device1
-set current_alsa_device1 "$save_alsa_device"
+after idle [subst -nocommands {
+ global current_alsa_device
+ set current_alsa_device none
+ rescan_alsa_devices $alsa_device_menu current_alsa_device1
+ global current_alsa_device1
+ set current_alsa_device1 "$save_alsa_device"
+ } ]
frame $cw.f1 -relief groove -borderwidth 2
eval $cw.f1 configure [get_settings $cw.f1 ALSA]
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- avview.scp 19 Dec 2003 03:43:15 -0000 1.144
+++ avview.scp 20 Dec 2003 16:22:46 -0000 1.145
@@ -261,38 +261,24 @@
xmisc_hidecursor .
xmisc_hidecursor .video
-trace variable show_control_window w "show_control_window_proc ; skip_args3"
proc show_control_window_proc {} {
global show_control_window
if { $show_control_window } {
- after idle {
- global show_control_window
- if { $show_control_window } {
- wm deiconify .controlwin
- }
- }
+ wm deiconify .controlwin
} {
- after idle {
- global show_control_window
- if { [winfo screen .controlwin] != [winfo screen . ] } {
- set ans [tk_dialog .controlwin.withdraw_question "Hide main control window ?" \
- "The main control window is displayed on the monitor different from main viewer window. If you hide it you will only be able to restore it from the main viewer window. Perhaps you would prefer to iconify control window?" "" 0 "Iconify" "Hide" "Never mind" ]
- update
- update idletasks
- switch "$ans" \
- "0" { after idle {wm iconify .controlwin ; set show_control_window 1 } } \
- "1" { after idle { wm withdraw .controlwin } } \
- "2" { set show_control_window 1 }
- update
- } {
- after idle {
- global show_control_window
- if { ! $show_control_window } {
- wm withdraw .controlwin
- }
- }
- }
+ if { [winfo screen .controlwin] != [winfo screen . ] } {
+ set ans [tk_dialog .controlwin.withdraw_question "Hide main control window ?" \
+ "The main control window is displayed on the monitor different from main viewer window. If you hide it you will only be able to restore it from the main viewer window. Perhaps you would prefer to iconify control window?" "" 0 "Iconify" "Hide" "Never mind" ]
+ update
+ update idletasks
+ switch "$ans" \
+ "0" { after idle {wm iconify .controlwin ; set show_control_window 1 } } \
+ "1" { after idle { wm withdraw .controlwin } } \
+ "2" { set show_control_window 1 }
+ update
+ } {
+ wm withdraw .controlwin
}
}
}
@@ -828,10 +814,6 @@
trace variable current_channel w "set_channel"
global fullscreen_mode
trace variable fullscreen_mode w "set_fullscreen ; skip_args3"
-global attributes_window
-trace variable attributes_window w { generate_attributes_window .controlwin.allattributes ; skip_args3 }
-global capture_window
-trace variable capture_window w { generate_capture_window .controlwin.capture ; skip_args3 }
global current_v4l_device
trace variable current_v4l_device w "set_v4l_device .controlwin.capture"
global current_v4l_mode
@@ -843,10 +825,6 @@
global on_screen_cc_page
trace variable on_screen_cc_page w "vbi_set_cc_page_on_screen ; skip_args3"
-if {[alsa_present] == "yes" } {
- trace variable alsa_window w "generate_alsa_window .controlwin.alsamixer ; skip_args3"
- }
-
bind $VIDEO_WINDOW <Configure> {
global $VIDEO_WINDOW
display_video
@@ -945,6 +923,20 @@
set_encoding_theme
}
+proc set_ui_traces {} {
+global show_control_window attributes_window capture_window alsa_window
+trace variable show_control_window w "show_control_window_proc ; skip_args3"
+trace variable attributes_window w { generate_attributes_window .controlwin.allattributes ; skip_args3 }
+trace variable capture_window w { generate_capture_window .controlwin.capture ; skip_args3 }
+if {[alsa_present] == "yes" } {
+ trace variable alsa_window w "generate_alsa_window .controlwin.alsamixer ; skip_args3"
+ }
+
+
+foreach var {show_control_window attributes_window capture_window alsa_window} {
+ set $var [set $var]
+ }
+}
after idle {
avview_set_icon . "avview-16x16.ppm"
@@ -963,6 +955,7 @@
set fullscreen_mode true
}
xv_pick_defaults
+ set_ui_traces
global startup_script
eval $startup_script
}
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- v4l.scp 17 Dec 2003 21:16:04 -0000 1.54
+++ v4l.scp 20 Dec 2003 16:22:46 -0000 1.55
@@ -61,7 +61,8 @@
if { [alsa_present] } {
eval label $cw.alsadevicel -text "\"ALSA device: \"" [get_settings $cw.alsadevicel Capture V4L]
- global v4l_alsadevice_menu
+ global v4l_alsadevice_menu current_alsa_capture_device
+ set old_value $current_alsa_capture_device
set v4l_alsadevice_menu [tk_optionMenu $cw.alsadevice_optionmenu current_alsa_capture_device none]
eval $cw.alsadevice_optionmenu configure [get_settings $cw.alsadevice_optionmenu Capture V4L]
eval $v4l_alsadevice_menu configure [get_settings $v4l_alsadevice_menu Capture V4L menu]
@@ -69,7 +70,11 @@
$cw.rescan_ad_button configure -command "rescan_alsa_devices $v4l_alsadevice_menu current_alsa_capture_device"
grid $cw.alsadevicel $cw.alsadevice_optionmenu $cw.rescan_ad_button -sticky news
grid configure $cw.alsadevicel -sticky nws
- after idle "$cw.rescan_ad_button invoke"
+ after idle [subst -nocommands {
+ $cw.rescan_ad_button invoke
+ global current_alsa_capture_device
+ set current_alsa_capture_device "$old_value"
+ } ]
}
@@ -200,8 +205,6 @@
}
v4l_close_device rescan_handle
}
- update
- update idletasks
}
}
@@ -349,7 +352,6 @@
eval $cw.c configure [get_settings $cw.c Capture V4L]
eval $sw.vscroll configure [get_settings $sw.vscroll Capture V4L]
eval $sw.hscroll configure [get_settings $sw.hscroll Capture V4L]
-update
}
proc save_image_as { sw image } {
Index: xv.scp
===================================================================
RCS file: /cvsroot/gatos/avview/xv.scp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- xv.scp 1 Dec 2003 22:44:06 -0000 1.22
+++ xv.scp 20 Dec 2003 16:22:46 -0000 1.23
@@ -246,9 +246,12 @@
create_attribute_widget $af.f1.c.f $VIDEO_WINDOW $current_port $i
}
grid columnconfigure $af 1 -weight 1
-update
-set bbox [grid bbox $af.f1.c.f]
-$af.f1.c configure -scrollregion "[grid bbox $af.f1.c.f]" -width [expr [lindex $bbox 2]+8]
+after idle [subst -nocommands {
+ catch {
+ set bbox [grid bbox $af.f1.c.f]
+ $af.f1.c configure -scrollregion "[grid bbox $af.f1.c.f]" -width [expr [lindex \$bbox 2]+8]
+ }
+ } ]
}
|
|
From: <gat...@li...> - 2003-12-19 03:43:18
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv17142
Modified Files:
avview.scp
Log Message:
Get rid of "flicking control window during startup" bug.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- avview.scp 17 Dec 2003 21:05:56 -0000 1.143
+++ avview.scp 19 Dec 2003 03:43:15 -0000 1.144
@@ -266,11 +266,16 @@
proc show_control_window_proc {} {
global show_control_window
if { $show_control_window } {
- after idle { wm deiconify .controlwin }
+ after idle {
+ global show_control_window
+ if { $show_control_window } {
+ wm deiconify .controlwin
+ }
+ }
} {
after idle {
global show_control_window
- if { "[winfo screen .controlwin]" != "[winfo screen . ]" } {
+ if { [winfo screen .controlwin] != [winfo screen . ] } {
set ans [tk_dialog .controlwin.withdraw_question "Hide main control window ?" \
"The main control window is displayed on the monitor different from main viewer window. If you hide it you will only be able to restore it from the main viewer window. Perhaps you would prefer to iconify control window?" "" 0 "Iconify" "Hide" "Never mind" ]
update
@@ -281,11 +286,16 @@
"2" { set show_control_window 1 }
update
} {
- after idle { wm withdraw .controlwin }
+ after idle {
+ global show_control_window
+ if { ! $show_control_window } {
+ wm withdraw .controlwin
+ }
+ }
}
}
}
-}
+}
proc hide_cursor_timer { window } {
global hct_$window
@@ -434,9 +444,9 @@
# The order these come in is really important
#
-foreach variable {warn_about_missing_km current_port current_encoding_name current_table_name
- current_channel attributes_window capture_window alsa_window
- show_control_window always_start_fullscreen remember_fullscreen_state
+foreach variable {show_control_window warn_about_missing_km current_port current_encoding_name current_table_name
+ current_channel attributes_window capture_window alsa_window
+ always_start_fullscreen remember_fullscreen_state
display_setup_window_on_startup file_save_path dpms_off_on_fullscreen_power_off
disable_fullscreen_switching use_physical_screen_size message_visible_secs
on_screen_cc_page save_settings_on_exit transparent_when_minimized mute_when_minimized
|
|
From: <gat...@li...> - 2003-12-17 21:21:53
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv16449
Modified Files:
km.scp
Log Message:
Remove outdated statement.
Index: km.scp
===================================================================
RCS file: /cvsroot/gatos/avview/km.scp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- km.scp 12 Apr 2003 04:17:31 -0000 1.6
+++ km.scp 17 Dec 2003 21:21:50 -0000 1.7
@@ -1,7 +1,5 @@
#!tclsh
-puts "This only works with km from CVS at the moment"
-
proc get_km_status { km_control } {
set file [open "$km_control" "w+"]
puts $file "STATUS"
|
|
From: <gat...@li...> - 2003-12-17 21:16:07
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv15636
Modified Files:
ffmpeg.scp v4l.scp
Log Message:
Cleanup debugging messages.
Fix bug that prevented setting stored settings properly.
Index: ffmpeg.scp
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.scp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ffmpeg.scp 17 Dec 2003 21:05:56 -0000 1.8
+++ ffmpeg.scp 17 Dec 2003 21:16:04 -0000 1.9
@@ -102,14 +102,11 @@
"" ro_entry ffmpeg_encoding_theme_detail \
"Set parameters" command set_encoding_theme
-catch {
add_parameter_pane "/Configuration/Encoding settings/Capture parameters" "Capture parameters" \
"V4L parameters" heading "" \
"Deinterlacing method" choice [concat current_v4l_mode [get_deinterlacing_methods]] \
"V4L recording rate" choice {current_v4l_rrate "as is" "one half" "one quarter"} \
"Video frame rate" entry current_video_rate
-} err
-puts "err2=$err"
if { [ffmpeg_present] } {
add_parameter_pane "/Configuration/Encoding settings/Compression parameters" "Compression parameters" \
@@ -145,7 +142,6 @@
encoding_themes_table encoding_theme_template encoding_themes
set theme [lrange $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]] end]
set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
-puts "theme=$theme"
foreach $encoding_theme_template $theme {
foreach {var field} {
ffmpeg_video_bitrate_control q_control
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- v4l.scp 17 Dec 2003 20:49:59 -0000 1.53
+++ v4l.scp 17 Dec 2003 21:16:04 -0000 1.54
@@ -159,8 +159,8 @@
button $cw.snapshot_button -text "Snapshot" -command capture_snapshot
eval $cw.snapshot_button configure [get_settings $cw.snapshot_button Capture V4L]
- button $cw.monitor_button -text "Monitor" -command "create_monitor_window $cw"
- eval $cw.monitor_button configure [get_settings $cw.monitor_button Capture V4L]
+# button $cw.monitor_button -text "Monitor" -command "create_monitor_window $cw"
+# eval $cw.monitor_button configure [get_settings $cw.monitor_button Capture V4L]
checkbutton $cw.record_button -text "Record" -variable v4l_capture_on \
-indicatoron false
eval $cw.record_button configure [get_settings $cw.record_button Capture V4L]
|
|
From: <gat...@li...> - 2003-12-17 21:08:02
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1:/tmp/cvs-serv14328 Modified Files: INSTALL Log Message: Bring INSTALL file up to date. Index: INSTALL =================================================================== RCS file: /cvsroot/gatos/avview/INSTALL,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- INSTALL 24 Mar 2003 06:32:32 -0000 1.10 +++ INSTALL 17 Dec 2003 21:07:59 -0000 1.11 @@ -1,12 +1,12 @@ *** INSTALLATION **** Requirements: - Tcl/Tk 8.3 or 8.4 + Tcl/Tk 8.4 libzvbi 0.2.3 (http://zapping.sf.net/) - Alsa 0.9.0 drivers and library (optional) (http://www.alsa-project.org/) - FFmpeg 0.4.6 (optional, http://ffmpeg.sf.net/) + Alsa 1.0.0 drivers and library (optional) (http://www.alsa-project.org/) + FFmpeg 0.4.8 (optional, http://ffmpeg.sf.net/) autoconf 2.57 or later (if compiling from CVS) (http://www.gnu.org/) - automake 1.6.3 (if compiling from CVS) (http://www.gnu.org) + automake 1.7.8 (if compiling from CVS) (http://www.gnu.org) To compile: |
|
From: <gat...@li...> - 2003-12-17 21:05:59
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv13934
Modified Files:
avview.scp ffmpeg.scp
Log Message:
Set more reasonable defaults when AVview is first run.
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- avview.scp 14 Dec 2003 04:38:52 -0000 1.142
+++ avview.scp 17 Dec 2003 21:05:56 -0000 1.143
@@ -922,6 +922,20 @@
replace_parameter_choices "/Configuration/Video device parameters" 0 a
regenerate_port_menu
+proc set_default_settings {} {
+foreach {var value} {
+ capture_window "true"
+ alsa_window "true"
+ show_control_window "true"
+ ffmpeg_encoding_theme "MPEG-1 HQ"
+ } {
+ global $var
+ set $var $value
+ }
+set_encoding_theme
+}
+
+
after idle {
avview_set_icon . "avview-16x16.ppm"
avview_set_icon .controlwin "avview-control-16x16.ppm"
@@ -929,6 +943,7 @@
after 100 {
assign_default_bindings
+ set_default_settings
read_settings
switch_to_pane "/User interface settings"
if { $display_setup_window_on_startup } {
Index: ffmpeg.scp
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.scp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ffmpeg.scp 17 Dec 2003 20:49:59 -0000 1.7
+++ ffmpeg.scp 17 Dec 2003 21:05:56 -0000 1.8
@@ -27,7 +27,7 @@
"one-half"
"High quality MPEG-1"
- "MPEG-1 MQ"
+ "MPEG-1 HQ"
300000
5
"Fix quality"
@@ -102,11 +102,14 @@
"" ro_entry ffmpeg_encoding_theme_detail \
"Set parameters" command set_encoding_theme
-add_parameter_pane "/Configuration/Encoding settings/Capture parameters" \
- "Capture parameters" heading "" \
+catch {
+add_parameter_pane "/Configuration/Encoding settings/Capture parameters" "Capture parameters" \
+ "V4L parameters" heading "" \
"Deinterlacing method" choice [concat current_v4l_mode [get_deinterlacing_methods]] \
"V4L recording rate" choice {current_v4l_rrate "as is" "one half" "one quarter"} \
"Video frame rate" entry current_video_rate
+} err
+puts "err2=$err"
if { [ffmpeg_present] } {
add_parameter_pane "/Configuration/Encoding settings/Compression parameters" "Compression parameters" \
|
|
From: <gat...@li...> - 2003-12-17 20:50:03
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv10611
Modified Files:
ffmpeg.scp v4l.scp
Log Message:
Add support for encoding themes.
Index: ffmpeg.scp
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.scp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ffmpeg.scp 19 Jul 2003 04:11:29 -0000 1.6
+++ ffmpeg.scp 17 Dec 2003 20:49:59 -0000 1.7
@@ -1,7 +1,115 @@
#!./avview_shell
+global encoding_theme_template encoding_theme
+set encoding_theme_template {
+ name
+ short_name
+ video_bitrate
+ quality
+ q_control
+ video_codec
+ audio_bitrate
+ audio_codec
+ file_format
+ v4l_mode
+ v4l_rate }
+set encoding_themes {
+ "Very high quality MPEG-1"
+ "MPEG-1 VHQ"
+ 300000
+ 2
+ "Fix quality"
+ "MPEG-1"
+ 64000
+ "MPEG-2"
+ "MPEG"
+ "double-interpolate"
+ "one-half"
+
+ "High quality MPEG-1"
+ "MPEG-1 MQ"
+ 300000
+ 5
+ "Fix quality"
+ "MPEG-1"
+ 64000
+ "MPEG-2"
+ "MPEG"
+ "double-interpolate"
+ "one-half"
+
+ "VCR quality MPEG-1"
+ "MPEG-1 VCR"
+ 300000
+ 5
+ "Fix quality"
+ "MPEG-1"
+ 64000
+ "MPEG-2"
+ "MPEG"
+ "half-width"
+ "one-half"
+
+ "Webcam quality MPEG-1"
+ "MPEG-1 Webcam"
+ 300000
+ 10
+ "Fix quality"
+ "MPEG-1"
+ 64000
+ "MPEG-2"
+ "MPEG"
+ "half-width"
+ "one-quarter"
+
+ "Very high quality MPEG-4"
+ "MPEG-4 VHQ"
+ 300000
+ 2
+ "Fix quality"
+ "MPEG-4"
+ 64000
+ "MPEG-2"
+ "AVI"
+ "double-interpolate"
+ "one-half"
+
+ "High quality MPEG-4"
+ "MPEG-4 HQ"
+ 300000
+ 5
+ "Fix quality"
+ "MPEG-4"
+ 64000
+ "MPEG-2"
+ "AVI"
+ "double-interpolate"
+ "one-half"
+ }
+
+global encoding_themes_list encoding_themes_table
+set encoding_themes_list {}
+set i 0
+foreach $encoding_theme_template $encoding_themes {
+ lappend encoding_themes_list $short_name
+ set encoding_themes_table($short_name) $i
+ incr i
+ }
+
+add_parameter_pane "/Configuration/Encoding settings" "Encoding settings" \
+ "Pre-configured themes" heading "" \
+ "Encoding theme" choice [concat ffmpeg_encoding_theme $encoding_themes_list] \
+ "" ro_entry ffmpeg_encoding_theme_detail \
+ "Set parameters" command set_encoding_theme
+
+add_parameter_pane "/Configuration/Encoding settings/Capture parameters" \
+ "Capture parameters" heading "" \
+ "Deinterlacing method" choice [concat current_v4l_mode [get_deinterlacing_methods]] \
+ "V4L recording rate" choice {current_v4l_rrate "as is" "one half" "one quarter"} \
+ "Video frame rate" entry current_video_rate
+
if { [ffmpeg_present] } {
- add_parameter_pane "/Configuration/Compression parameters" "Compression parameters" \
+ add_parameter_pane "/Configuration/Encoding settings/Compression parameters" "Compression parameters" \
"Video codec parameters" heading "" \
"Bitrate control" choice { ffmpeg_video_bitrate_control "Fix bitrate" "Fix quality" } \
"Bitrate" entry ffmpeg_video_bitrate \
@@ -19,3 +127,38 @@
} {
add_description_pane "/Configuration/Compression parameters" "Compression parameters" "AVview has not been compiled to include compression library"
}
+
+global ffmpeg_encoding_theme
+trace variable ffmpeg_encoding_theme w {
+ global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
+ encoding_themes_table encoding_theme_template encoding_themes
+ set ffmpeg_encoding_theme_detail [lindex $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]]]
+ skip_args3 }
+
+set ffmpeg_encoding_theme [lindex $encoding_themes 1]
+
+proc set_encoding_theme {} {
+global ffmpeg_encoding_theme ffmpeg_encoding_theme_detail \
+ encoding_themes_table encoding_theme_template encoding_themes
+set theme [lrange $encoding_themes [expr $encoding_themes_table($ffmpeg_encoding_theme)*[llength $encoding_theme_template]] end]
+set theme [lrange $theme 0 [expr [llength $encoding_theme_template]-1] ]
+puts "theme=$theme"
+foreach $encoding_theme_template $theme {
+ foreach {var field} {
+ ffmpeg_video_bitrate_control q_control
+ ffmpeg_video_quality quality
+ ffmpeg_video_bitrate video_bitrate
+ ffmpeg_video_codec video_codec
+ ffmpeg_audio_bitrate audio_bitrate
+ ffmpeg_audio_codec audio_codec
+ ffmpeg_file_format file_format
+ current_v4l_mode v4l_mode
+ current_v4l_rate v4l_rate
+ } {
+ global $var
+ set $var [set $field]
+ }
+ }
+}
+
+set_encoding_theme
Index: v4l.scp
===================================================================
RCS file: /cvsroot/gatos/avview/v4l.scp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- v4l.scp 24 Mar 2003 06:24:58 -0000 1.52
+++ v4l.scp 17 Dec 2003 20:49:59 -0000 1.53
@@ -17,11 +17,13 @@
ffmpeg_audio_sample_rate 48000
ffmpeg_audio_bitrate 64000
ffmpeg_audio_codec "MPEG-2"
+ ffmpeg_file_format "MPEG"
} {
global $variable
set $variable $value
}
+
#
#
# Heuristic to figure out a good ffmpeg_max_fifo_size
@@ -71,17 +73,18 @@
}
-set methods [get_deinterlacing_methods]
-eval label $cw.model -text "\"Recording mode: \"" [get_settings $cw.model Capture V4L]
-set menu [tk_optionMenu $cw.mode_optionmenu current_v4l_mode None]
-$menu delete 0 end
-foreach method $methods {
- $menu add radiobutton -label "$method" -value "$method" -variable current_v4l_mode
- }
-eval $cw.mode_optionmenu configure [get_settings $cw.mode_optionmenu Capture V4L]
-eval $menu configure [get_settings $menu Capture V4L menu]
-grid $cw.model $cw.mode_optionmenu - -sticky news
-grid configure $cw.model -sticky nws
+#set methods [get_deinterlacing_methods]
+#eval label $cw.model -text "\"Recording mode: \"" [get_settings $cw.model Capture V4L]
+#set menu [tk_optionMenu $cw.mode_optionmenu current_v4l_mode None]
+#$menu delete 0 end
+#foreach method $methods {
+# $menu add radiobutton -label "$method" -value "$method" -variable current_v4l_mode
+# }
+#eval $cw.mode_optionmenu configure [get_settings $cw.mode_optionmenu Capture V4L]
+#eval $menu configure [get_settings $menu Capture V4L menu]
+#grid $cw.model $cw.mode_optionmenu - -sticky news
+#grid configure $cw.model -sticky nws
+
eval label $cw.windowl -text "\"Window: \"" [get_settings $cw.windowl Capture V4L]
eval label $cw.window -text "\"N/A\"" [get_settings $cw.window Capture V4L]
@@ -90,13 +93,27 @@
grid configure $cw.windowl -sticky nws
grid configure $cw.window_button -sticky news
+
+eval label $cw.encoding_themel -text "\"Encoding theme: \"" [get_settings $cw.encoding_themel Capture V4L]
+set menu [tk_optionMenu $cw.encoding_theme_optionmenu ffmpeg_encoding_theme None]
+$menu delete 0 end
+global encoding_themes_list
+foreach theme $encoding_themes_list {
+ $menu add radiobutton -label "$theme" -value "$theme" -variable ffmpeg_encoding_theme
+ }
+eval $cw.encoding_theme_optionmenu configure [get_settings $cw.encoding_theme_optionmenu Capture V4L]
+eval $menu configure [get_settings $menu Capture V4L menu]
+eval button $cw.encoding_theme_button -text "Set" -command set_encoding_theme [get_settings $cw.window_button Capture V4L]
+grid $cw.encoding_themel $cw.encoding_theme_optionmenu $cw.encoding_theme_button -sticky news
+grid configure $cw.encoding_themel $cw.encoding_theme_button -sticky nws
+
if {[ffmpeg_present] == "yes"} {
- eval label $cw.rratel -text "\"Recording framerate: \"" [get_settings $cw.rratel Capture V4L]
- set menu [tk_optionMenu $cw.rrate_optionmenu current_v4l_rrate "as is" "one half" "one quarter"]
- eval $cw.rrate_optionmenu configure [get_settings $cw.rrate_optionmenu Capture V4L]
- eval $menu configure [get_settings $menu Capture V4L menu]
- grid $cw.rratel $cw.rrate_optionmenu - -sticky news
- grid configure $cw.rratel -sticky nws
+# eval label $cw.rratel -text "\"Recording framerate: \"" [get_settings $cw.rratel Capture V4L]
+# set menu [tk_optionMenu $cw.rrate_optionmenu current_v4l_rrate "as is" "one half" "one quarter"]
+# eval $cw.rrate_optionmenu configure [get_settings $cw.rrate_optionmenu Capture V4L]
+# eval $menu configure [get_settings $menu Capture V4L menu]
+# grid $cw.rratel $cw.rrate_optionmenu - -sticky news
+# grid configure $cw.rratel -sticky nws
eval label $cw.video_ratel -text "\"V4L device framerate:\"" [get_settings $cw.video_ratel Capture V4L]
entry $cw.video_rate_entry -textvariable current_video_rate
|
|
From: <gat...@li...> - 2003-12-17 13:43:52
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv14005
Modified Files:
configure.in ffmpeg.c
Log Message:
Bump avview version number.
Switch to using ffmpeg 0.4.8 - requires more testing.
Index: configure.in
===================================================================
RCS file: /cvsroot/gatos/avview/configure.in,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- configure.in 14 Dec 2003 22:02:09 -0000 1.55
+++ configure.in 17 Dec 2003 13:43:49 -0000 1.56
@@ -4,7 +4,7 @@
# Note to self: always bump version number when there are changes
# in setup window or avview_shell
#
-AC_INIT([AVview], [0.12.7], [gat...@li...])
+AC_INIT([AVview], [0.80.0], [gat...@li...])
#
# For now I'll be happier without NEWS and Changelog files.
#
@@ -103,6 +103,8 @@
AC_SUBST(USE_XINERAMA)
+LDFLAGS="$LDFLAGS $X_LIBS"
+
AC_CHECK_LIB([X11], [XCreateSimpleWindow],,,[$X_LIBS])
AC_CHECK_LIB([Xext], [XInitExtension],,,[$X_LIBS])
AC_CHECK_LIB([Xv], [XvPutVideo],,,[$X_LIBS -lX11 -lXext])
@@ -135,8 +137,47 @@
if ! test "$with_ffmpeg" = "" ; then
AC_DEFINE(USE_FFMPEG, 1, [use ffmpeg libraries])
-FFMPEG_LIBS="-L$with_ffmpeg/libavformat -L$with_ffmpeg/libavcodec -lavformat -lavcodec -lpthread"
+FFMPEG_LIBS="$with_ffmpeg/libavformat/libavformat.a $with_ffmpeg/libavcodec/libavcodec.a"
FFMPEG_CFLAGS="-I$with_ffmpeg/libavformat -I$with_ffmpeg/libavcodec"
+echo -n "checking ffmpeg version..."
+CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
+#LDFLAGS="$LDFLAGS $FFMPEG_LIBS"
+LIBS="$LIBS $FFMPEG_LIBS"
+AC_RUN_IFELSE([
+ #include <stdio.h>
+ #include "avcodec.h"
+ #include "avformat.h"
+
+ #if LIBAVCODEC_VERSION_INT != LIBAVFORMAT_VERSION_INT
+ #error "FFMPEG libraries mismatch"
+ #endif
+
+ #if LIBAVCODEC_VERSION_INT != 0x000408
+ #error "AVview now requires ffmpeg 0.4.8"
+ #endif
+
+ int main(void)
+ {
+ if(avcodec_version()!=LIBAVCODEC_VERSION_INT){
+ fprintf(stderr,"AVcodec header and library mismatch detected\n");
+ exit(-1);
+ }
+ #if 0
+ /* no check for avformat version yet */
+ if(avformat_version()!=LIBAVFORMAT_VERSION_INT){
+ fprintf(stderr,"AVcodec header and library mismatch detected\n");
+ exit(-1);
+ }
+ #endif
+ exit(0);
+ }
+ ],,[
+ echo
+ echo
+ echo "*** AVview requires ffmpeg 0.4.8"
+ echo "If you are sure you are using correct version of ffmpeg check config.log for details"
+ exit])
+echo " ok"
else
FFMPEG_LIBS=
FFMPEG_CFLAGS=
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/gatos/avview/ffmpeg.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- ffmpeg.c 17 Jul 2003 07:01:05 -0000 1.80
+++ ffmpeg.c 17 Dec 2003 13:43:49 -0000 1.81
@@ -180,6 +180,7 @@
frames++;
picture.age=frames;
ob_free=avcodec_encode_video(&(sdata->video_codec_context), output_buf, ob_size, &picture);
+
if(ob_free>0)sdata->encoded_stream_size+=ob_free;
/* write out data */
ob_written=0;
@@ -561,8 +562,9 @@
if(sdata->quality<qmin)sdata->quality=qmin;
if(sdata->quality>sdata->video_codec_context.qmax)sdata->quality=sdata->video_codec_context.qmax;
+sdata->video_codec_context.frame_rate_base=FFMPEG_FRAME_RATE_BASE;
sdata->video_codec_context.max_qdiff=3;
-sdata->video_codec_context.aspect_ratio=FF_ASPECT_4_3_625;
+sdata->video_codec_context.aspect_ratio=0.0; /* guess assuming square pixels */
sdata->video_codec_context.me_method=ME_FULL;
sdata->video_codec_context.qblur=0.5;
sdata->video_codec_context.qcompress=0.5;
@@ -573,6 +575,18 @@
sdata->video_codec_context.gop_size=0;
sdata->video_codec_context.get_buffer=avcodec_default_get_buffer;
sdata->video_codec_context.release_buffer=avcodec_default_release_buffer;
+sdata->video_codec_context.pix_fmt=PIX_FMT_YUV420P;
+sdata->video_codec_context.rc_qsquish=1.0;
+sdata->video_codec_context.rc_max_rate = 0;
+sdata->video_codec_context.rc_min_rate = 0;
+sdata->video_codec_context.rc_buffer_size = 0;
+sdata->video_codec_context.rc_buffer_aggressivity= 1;
+sdata->video_codec_context.rc_initial_cplx= 0;
+sdata->video_codec_context.lumi_masking=0;
+sdata->video_codec_context.temporal_cplx_masking=0;
+sdata->video_codec_context.spatial_cplx_masking=0;
+sdata->video_codec_context.p_masking=0;
+sdata->video_codec_context.dark_masking=0;
if((arg_video_codec!=NULL)&&(
!strcmp(arg_video_codec, "MPEG-4") ||
!strcmp(arg_video_codec, "MSMPEG-4")))
@@ -663,6 +677,7 @@
int i,k;
const char *arg_filename;
const char *arg_av_format;
+AVFormatParameters avfp;
Tcl_ResetResult(interp);
@@ -783,7 +798,23 @@
sdata->format_context.copyright[0]=0;
sdata->format_context.author[0]=0;
sdata->format_context.comment[0]=0;
- av_write_header(&(sdata->format_context));
+
+ memset(&avfp, 0, sizeof(avfp));
+
+ avfp.frame_rate=sdata->video_codec_context.frame_rate;
+ avfp.frame_rate_base=sdata->video_codec_context.frame_rate_base;
+ avfp.width=sdata->video_codec_context.width;
+ avfp.height=sdata->video_codec_context.height;
+ avfp.sample_rate=sdata->audio_codec_context.sample_rate;
+ avfp.channels=sdata->audio_codec_context.channels;
+ avfp.pix_fmt=sdata->video_codec_context.pix_fmt;
+
+ av_set_parameters(&(sdata->format_context), &avfp);
+
+ if(av_write_header(&(sdata->format_context))<0){
+ Tcl_AppendResult(interp,"Could not write header (incorrect codec parameters?)", NULL);
+ return TCL_OK;
+ }
} else {
fprintf(stderr,"Warning: sdata->format_context.oformat==NULL, report to vo...@mi... if you did choose a valid file format\n");
}
@@ -804,7 +835,7 @@
Tcl_AppendResult(interp,"ERROR: ffmpeg_switch_file requires one argument\n");
return TCL_ERROR;
}
-fprintf(stderr, "Switching recording to file \"%s\"\n", argv[1]);
+fprintf(stderr, "Switching recording to file \"%s\" [NOT IMPLEMENTED]\n", argv[1]);
return TCL_OK;
}
@@ -1062,7 +1093,7 @@
#if USE_FFMPEG
av_register_all();
-avcodec_register_all();
+//avcodec_register_all();
if((LIBAVCODEC_VERSION_INT!=avcodec_version())||(LIBAVFORMAT_VERSION_INT!=LIBAVCODEC_VERSION_INT)){
fprintf(stderr, "Detected mismatch between ffmpeg library headers and/or binaries. This error can only occur if somehow avview compilation used headers and/or binaries from different version of ffmpeg.\n");
fprintf(stderr,"avcodec.h version:0x%06x\n", LIBAVCODEC_VERSION_INT);
@@ -1070,6 +1101,7 @@
fprintf(stderr,"libavcodec version:0x%06x\n", avcodec_version());
exit(-1);
}
+
#endif
for(i=0;ffmpeg_commands[i].name!=NULL;i++)
|
|
From: <gat...@li...> - 2003-12-14 22:17:14
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs1:/tmp/cvs-serv3336 Modified Files: km_api.h Log Message: Bump version number in the header file. Index: km_api.h =================================================================== RCS file: /cvsroot/gatos/km/km_api.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- km_api.h 14 Dec 2003 21:57:05 -0000 1.24 +++ km_api.h 14 Dec 2003 22:17:10 -0000 1.25 @@ -11,7 +11,7 @@ #include <linux/spinlock.h> -#define KM_API_VERSION "alpha-3.0" +#define KM_API_VERSION "alpha-5.0" #define KM_FIELD_TYPE_EOL 0 /* end of list marker */ #define KM_FIELD_TYPE_STATIC 1 /* static string */ |
|
From: <gat...@li...> - 2003-12-14 22:02:12
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1:/tmp/cvs-serv32076 Modified Files: configure.in Log Message: Bump version number before release. Index: configure.in =================================================================== RCS file: /cvsroot/gatos/avview/configure.in,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- configure.in 1 Dec 2003 22:44:06 -0000 1.54 +++ configure.in 14 Dec 2003 22:02:09 -0000 1.55 @@ -4,7 +4,7 @@ # Note to self: always bump version number when there are changes # in setup window or avview_shell # -AC_INIT([AVview], [0.12.6], [gat...@li...]) +AC_INIT([AVview], [0.12.7], [gat...@li...]) # # For now I'll be happier without NEWS and Changelog files. # |
|
From: <gat...@li...> - 2003-12-14 21:57:09
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv30855
Modified Files:
km.c km_api.c km_api.h km_v4l.c
Log Message:
km_v4l.c is now only using km_api calls. I.e. it does *not* call functions from km.c
and hardware specific files directly.
Index: km.c
===================================================================
RCS file: /cvsroot/gatos/km/km.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- km.c 14 Dec 2003 19:27:03 -0000 1.88
+++ km.c 14 Dec 2003 21:57:05 -0000 1.89
@@ -697,8 +697,8 @@
FIELD("V4L_DEVICE").data.i.field=&(kms->vd.minor);
-FIELD("VIDEO_STREAM_ACTIVE").data.t.zero2one=video_stream_on;
-FIELD("VIDEO_STREAM_ACTIVE").data.t.one2zero=video_stream_off;
+FIELD("VIDEO_STREAM_ACTIVE").data.t.zero2one=start_video_capture;
+FIELD("VIDEO_STREAM_ACTIVE").data.t.one2zero=stop_video_capture;
FIELD("VIDEO_STREAM_ACTIVE").data.t.priv=kms;
FIELD("VIDEO_STREAM_DATA_UNIT").data.i.field=&(kms->capture.du);
@@ -711,8 +711,8 @@
FIELD("VBI_STREAM_INFO_DATA_UNIT").data.i.field=&(kms->vbi.info_du);
-FIELD("VBI_STREAM_ACTIVE").data.t.zero2one=vbi_stream_on;
-FIELD("VBI_STREAM_ACTIVE").data.t.one2zero=vbi_stream_off;
+FIELD("VBI_STREAM_ACTIVE").data.t.zero2one=start_video_capture;
+FIELD("VBI_STREAM_ACTIVE").data.t.one2zero=stop_video_capture;
FIELD("VBI_STREAM_ACTIVE").data.t.priv=kms;
kms->kmd=add_km_device(kms->kmfl, kms);
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- km_api.c 14 Dec 2003 19:27:03 -0000 1.37
+++ km_api.c 14 Dec 2003 21:57:05 -0000 1.38
@@ -342,7 +342,7 @@
/* for now only process one command per string */
-void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count)
+int km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count)
{
KM_DEVICE *kmd=kmfpd->kmd;
int i,j;
@@ -352,6 +352,7 @@
KM_FIELD *kf;
KM_FIELD_DATA *kfd;
u32 int_value;
+int result=0;
spin_lock(&(kmd->lock));
hash=km_command_hash(command, count);
@@ -411,14 +412,11 @@
if(kfd->t.requested){ goto exit; /* redundant */ }
/* the zero2one transition checks for success before
increasing count first */
- if(!kf->data.t.count && !kf->data.t.zero2one(kf->data.t.priv)){
- kfd->t.requested=1;
- kf->data.t.count++;
- } else
- if(kf->data.t.count){
- kfd->t.requested=1;
- kf->data.t.count++;
- }
+ if(!kf->data.t.count && (result=kf->data.t.zero2one(kf->data.t.priv))){
+ goto exit;
+ }
+ kfd->t.requested=1;
+ kf->data.t.count++;
}
break;
}
@@ -426,6 +424,7 @@
exit:
spin_unlock(&(kmd->lock));
+return result;
}
static ssize_t km_fo_control_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- km_api.h 14 Dec 2003 19:27:03 -0000 1.23
+++ km_api.h 14 Dec 2003 21:57:05 -0000 1.24
@@ -146,7 +146,7 @@
int num_km_devices(void);
KM_FILE_PRIVATE_DATA *open_km_device(int number);
void close_km_device(KM_FILE_PRIVATE_DATA *kmfpd);
-void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count);
+int km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count);
#if 1
Index: km_v4l.c
===================================================================
RCS file: /cvsroot/gatos/km/km_v4l.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- km_v4l.c 14 Dec 2003 19:27:03 -0000 1.44
+++ km_v4l.c 14 Dec 2003 21:57:05 -0000 1.45
@@ -35,12 +35,17 @@
kms->kmfpd=open_km_device(kms->kmd);
if(kms->kmfpd==NULL)return -EINVAL;
-if((result=start_video_capture(kms))<0)return result;
+if((result=km_fo_control_perform_command(kms->kmfpd,"VIDEO_STREAM_ACTIVE=1", 1000))!=0){
+ close_km_device(kms->kmfpd);
+ kms->kmfpd=NULL;
+ return result;
+ }
kms->v4l_buf_parity=0;
kms->v4l_kdufpd=km_data_create_kdufpd(kms->capture.du);
if(kms->v4l_kdufpd==NULL){
- stop_video_capture(kms);
+ close_km_device(kms->kmfpd);
+ kms->kmfpd=NULL;
return -EINVAL;
}
return 0;
@@ -53,7 +58,6 @@
km_data_destroy_kdufpd(kms->v4l_kdufpd);
kms->v4l_kdufpd=NULL;
-stop_video_capture(kms);
close_km_device(kms->kmfpd);
kms->kmfpd=NULL;
|
|
From: <gat...@li...> - 2003-12-14 21:55:49
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv30643
Modified Files:
aclocal.m4 alsa.c frequencies.c
Log Message:
Fix breakage of audio recording that came from upgrade to alsa-1.0.0 library.
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/gatos/avview/aclocal.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- aclocal.m4 3 Oct 2003 13:04:30 -0000 1.4
+++ aclocal.m4 14 Dec 2003 21:55:45 -0000 1.5
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.7.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.7.8 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
@@ -16,7 +16,7 @@
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -34,14 +34,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 9
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
+# serial 10
AC_PREREQ([2.54])
@@ -170,7 +163,7 @@
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.7.3])])
+ [AM_AUTOMAKE_VERSION([1.7.8])])
# Helper functions for option handling. -*- Autoconf -*-
@@ -552,18 +545,32 @@
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -581,11 +588,12 @@
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# (even with -Werror). So we grep stderr for any message
@@ -720,7 +728,7 @@
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -745,8 +753,9 @@
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
@@ -774,9 +783,9 @@
_am_result=BSD
fi
fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
Index: alsa.c
===================================================================
RCS file: /cvsroot/gatos/avview/alsa.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- alsa.c 1 Dec 2003 22:44:06 -0000 1.36
+++ alsa.c 14 Dec 2003 21:55:45 -0000 1.37
@@ -579,12 +579,13 @@
return -1;
}
/* set the stream rate */
-a=snd_pcm_hw_params_set_rate_near(ad->recording_handle, hwparams, rate, 0);
+dir=0;
+a=snd_pcm_hw_params_set_rate_near(ad->recording_handle, hwparams, &rate, &dir);
if(a<0){
fprintf(stderr,"Rate %ldHz not available for recording: %s\n", rate, snd_strerror(a));
return -1;
}
-param->sample_rate=a;
+param->sample_rate=rate;
param->channels=2;
ad->param=param;
fprintf(stderr,"Using sample rate %ld Hz frame_size=%ld\n", param->sample_rate, ad->frame_size);
Index: frequencies.c
===================================================================
RCS file: /cvsroot/gatos/avview/frequencies.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- frequencies.c 10 Jan 2003 07:06:03 -0000 1.6
+++ frequencies.c 14 Dec 2003 21:55:45 -0000 1.7
@@ -11,6 +11,7 @@
#define __FREQUENCIES_C__
#include <stdlib.h>
+#include <string.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <tcl.h>
|
|
From: <gat...@li...> - 2003-12-14 19:27:07
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv1622
Modified Files:
km.c km.h km_api.c km_api.h km_v4l.c
Log Message:
Refine semantics of LEVEL_TRIGGER fields to allow failure to raise level during
0->1 transition.
Index: km.c
===================================================================
RCS file: /cvsroot/gatos/km/km.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- km.c 14 Dec 2003 04:11:54 -0000 1.87
+++ km.c 14 Dec 2003 19:27:03 -0000 1.88
@@ -534,22 +534,22 @@
}
};
-void video_stream_on(KM_FIELD *kf)
+int video_stream_on(KM_STRUCT *kms)
{
printk("Video stream on\n");
}
-void video_stream_off(KM_FIELD *kf)
+int video_stream_off(KM_STRUCT *kms)
{
printk("Video stream off\n");
}
-void vbi_stream_on(KM_FIELD *kf)
+int vbi_stream_on(KM_STRUCT *kms)
{
printk("VBI stream on\n");
}
-void vbi_stream_off(KM_FIELD *kf)
+int vbi_stream_off(KM_STRUCT *kms)
{
printk("VBI stream off\n");
}
@@ -699,6 +699,7 @@
FIELD("VIDEO_STREAM_ACTIVE").data.t.zero2one=video_stream_on;
FIELD("VIDEO_STREAM_ACTIVE").data.t.one2zero=video_stream_off;
+FIELD("VIDEO_STREAM_ACTIVE").data.t.priv=kms;
FIELD("VIDEO_STREAM_DATA_UNIT").data.i.field=&(kms->capture.du);
@@ -712,6 +713,7 @@
FIELD("VBI_STREAM_ACTIVE").data.t.zero2one=vbi_stream_on;
FIELD("VBI_STREAM_ACTIVE").data.t.one2zero=vbi_stream_off;
+FIELD("VBI_STREAM_ACTIVE").data.t.priv=kms;
kms->kmd=add_km_device(kms->kmfl, kms);
printk("Device %s %s (0x%04x:0x%04x) corresponds to /dev/video%d\n",
Index: km.h
===================================================================
RCS file: /cvsroot/gatos/km/km.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- km.h 5 Mar 2003 17:13:26 -0000 1.49
+++ km.h 14 Dec 2003 19:27:03 -0000 1.50
@@ -95,6 +95,7 @@
atomic_t recursion_count;
+ KM_FILE_PRIVATE_DATA *kmfpd;
KDU_FILE_PRIVATE_DATA *v4l_kdufpd;
KDU_FILE_PRIVATE_DATA *vbi_kdufpd;
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- km_api.c 14 Dec 2003 18:56:48 -0000 1.36
+++ km_api.c 14 Dec 2003 19:27:03 -0000 1.37
@@ -249,7 +249,7 @@
case KM_FIELD_TYPE_LEVEL_TRIGGER:
if(kmfpd->kfd[i].t.requested){
kmd->fields[i].data.t.count--;
- if(!kmd->fields[i].data.t.count)kmd->fields[i].data.t.one2zero(&(kmd->fields[i]));
+ if(!kmd->fields[i].data.t.count)kmd->fields[i].data.t.one2zero(kmd->fields[i].data.t.priv);
}
break;
}
@@ -405,13 +405,20 @@
if(!kfd->t.requested){ goto exit; /* redundant */ }
kfd->t.requested=0;
kf->data.t.count--;
- if(!kf->data.t.count)kf->data.t.one2zero(kf);
+ if(!kf->data.t.count)kf->data.t.one2zero(kf->data.t.priv);
} else {
/* trigger raised */
if(kfd->t.requested){ goto exit; /* redundant */ }
- kfd->t.requested=1;
- kf->data.t.count++;
- if(kf->data.t.count)kf->data.t.zero2one(kf);
+ /* the zero2one transition checks for success before
+ increasing count first */
+ if(!kf->data.t.count && !kf->data.t.zero2one(kf->data.t.priv)){
+ kfd->t.requested=1;
+ kf->data.t.count++;
+ } else
+ if(kf->data.t.count){
+ kfd->t.requested=1;
+ kf->data.t.count++;
+ }
}
break;
}
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- km_api.h 14 Dec 2003 18:56:49 -0000 1.22
+++ km_api.h 14 Dec 2003 19:27:03 -0000 1.23
@@ -68,8 +68,13 @@
typedef struct {
u32 count;
- void (*zero2one)(struct S_KM_FIELD *kmf);
- void (*one2zero)(struct S_KM_FIELD *kmf);
+ /* this function returns zero value if operation was
+ successful */
+ int (*zero2one)(void *priv);
+ /* this function is supposed to always succeed, as it
+ can be called when the device is closed */
+ void (*one2zero)(void *priv);
+ void *priv;
} KM_FIELD_LEVEL_TRIGGER;
typedef struct S_KM_FIELD {
Index: km_v4l.c
===================================================================
RCS file: /cvsroot/gatos/km/km_v4l.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- km_v4l.c 14 Feb 2003 22:31:52 -0000 1.43
+++ km_v4l.c 14 Dec 2003 19:27:03 -0000 1.44
@@ -32,6 +32,9 @@
KM_STRUCT *kms=(KM_STRUCT *)dev->priv;
int result;
+kms->kmfpd=open_km_device(kms->kmd);
+if(kms->kmfpd==NULL)return -EINVAL;
+
if((result=start_video_capture(kms))<0)return result;
kms->v4l_buf_parity=0;
@@ -51,6 +54,9 @@
km_data_destroy_kdufpd(kms->v4l_kdufpd);
kms->v4l_kdufpd=NULL;
stop_video_capture(kms);
+
+close_km_device(kms->kmfpd);
+kms->kmfpd=NULL;
}
static long km_v4l_write(struct video_device *v, const char *buf, unsigned long count, int nonblock)
|
|
From: <gat...@li...> - 2003-12-14 18:56:52
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv28260
Modified Files:
km_api.c km_api.h
Log Message:
Beginning of the kernel-side interface to km devices.
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- km_api.c 14 Dec 2003 04:31:31 -0000 1.35
+++ km_api.c 14 Dec 2003 18:56:48 -0000 1.36
@@ -49,6 +49,9 @@
EXPORT_SYMBOL(km_data_generic_stream_read);
EXPORT_SYMBOL(km_data_generic_stream_poll);
EXPORT_SYMBOL(km_fo_control_perform_command);
+EXPORT_SYMBOL(num_km_devices);
+EXPORT_SYMBOL(open_km_device);
+EXPORT_SYMBOL(close_km_device);
#define KM_MODULUS 255
#define KM_MULTIPLE 23
@@ -167,21 +170,21 @@
}
}
-static int km_fo_control_open(struct inode * inode, struct file * file)
+int num_km_devices(void)
+{
+return devices_free;
+}
+
+KM_FILE_PRIVATE_DATA *open_km_device(int number)
{
-char *filename;
-KM_DEVICE *kmd=NULL;
KM_FILE_PRIVATE_DATA *kmfpd=NULL;
+KM_DEVICE *kmd=NULL;
int i;
-filename=file->f_dentry->d_iname;
-if(strncmp(filename, "control", 7)){
- return -EINVAL;
- }
-i=simple_strtol(filename+7, NULL, 10);
-if(i<0)return -EINVAL;
-if(i>=devices_free)return -EINVAL;
-kmd=(devices[i]);
-if((kmd==NULL)||(kmd->fields==NULL))return -EINVAL;
+
+if(number<0)return NULL;
+if(number>=devices_free)return NULL;
+kmd=(devices[number]);
+if((kmd==NULL)||(kmd->fields==NULL))return NULL;
MOD_INC_USE_COUNT;
@@ -212,17 +215,30 @@
spin_lock_init(&(kmfpd->lock));
-file->private_data=kmfpd;
kmd->use_count++;
spin_unlock(&(kmd->lock));
+return kmfpd;
+}
+static int km_fo_control_open(struct inode * inode, struct file * file)
+{
+char *filename;
+KM_FILE_PRIVATE_DATA *kmfpd=NULL;
+int i;
+filename=file->f_dentry->d_iname;
+if(strncmp(filename, "control", 7)){
+ return -EINVAL;
+ }
+i=simple_strtol(filename+7, NULL, 10);
+kmfpd=open_km_device(i);
+if(kmfpd==NULL)return -EINVAL;
+file->private_data=kmfpd;
return 0;
}
-static int km_fo_control_release(struct inode * inode, struct file * file)
+void close_km_device(KM_FILE_PRIVATE_DATA *kmfpd)
{
char temp[32];
-KM_FILE_PRIVATE_DATA *kmfpd=file->private_data;
KM_DEVICE *kmd=kmfpd->kmd;
int i;
@@ -247,7 +263,6 @@
kmfpd->buffer_read=NULL;
kfree(kmfpd);
kmfpd=NULL;
-file->private_data=NULL;
kmd->use_count--;
if(kmd->use_count<=0){
devices[kmd->number]=NULL;
@@ -259,7 +274,14 @@
spin_unlock(&(kmd->lock));
MOD_DEC_USE_COUNT;
+}
+static int km_fo_control_release(struct inode * inode, struct file * file)
+{
+KM_FILE_PRIVATE_DATA *kmfpd=file->private_data;
+
+close_km_device(kmfpd);
+file->private_data=NULL;
return 0;
}
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- km_api.h 14 Dec 2003 03:18:32 -0000 1.21
+++ km_api.h 14 Dec 2003 18:56:49 -0000 1.22
@@ -136,6 +136,11 @@
int add_km_device(KM_FIELD *kmfl, void *priv);
int remove_km_device(int num);
void kmd_signal_state_change(int num);
+
+/* functions for in-kernel access to km devices */
+int num_km_devices(void);
+KM_FILE_PRIVATE_DATA *open_km_device(int number);
+void close_km_device(KM_FILE_PRIVATE_DATA *kmfpd);
void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count);
|
|
From: <gat...@li...> - 2003-12-14 09:43:44
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv20187
Modified Files:
km.c
Log Message:
Made test code for LEVEL_TRIGGER fields in km.c
Index: km.c
===================================================================
RCS file: /cvsroot/gatos/km/km.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- km.c 16 Sep 2003 13:24:54 -0000 1.86
+++ km.c 14 Dec 2003 04:11:54 -0000 1.87
@@ -481,6 +481,13 @@
priv: NULL,
read_complete: NULL,
},
+ { type: KM_FIELD_TYPE_LEVEL_TRIGGER,
+ name: "VIDEO_STREAM_ACTIVE",
+ changed: 0,
+ lock: NULL,
+ priv: NULL,
+ read_complete: NULL,
+ },
{ type: KM_FIELD_TYPE_DYNAMIC_INT,
name: "VIDEO_STREAM_DATA_UNIT",
changed: 0,
@@ -516,10 +523,37 @@
priv: NULL,
read_complete: NULL,
},
+ { type: KM_FIELD_TYPE_LEVEL_TRIGGER,
+ name: "VBI_STREAM_ACTIVE",
+ changed: 0,
+ lock: NULL,
+ priv: NULL,
+ read_complete: NULL,
+ },
{ type: KM_FIELD_TYPE_EOL
}
};
+void video_stream_on(KM_FIELD *kf)
+{
+printk("Video stream on\n");
+}
+
+void video_stream_off(KM_FIELD *kf)
+{
+printk("Video stream off\n");
+}
+
+void vbi_stream_on(KM_FIELD *kf)
+{
+printk("VBI stream on\n");
+}
+
+void vbi_stream_off(KM_FIELD *kf)
+{
+printk("VBI stream off\n");
+}
+
static int __devinit km_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
{
KM_STRUCT *kms;
@@ -663,6 +697,9 @@
FIELD("V4L_DEVICE").data.i.field=&(kms->vd.minor);
+FIELD("VIDEO_STREAM_ACTIVE").data.t.zero2one=video_stream_on;
+FIELD("VIDEO_STREAM_ACTIVE").data.t.one2zero=video_stream_off;
+
FIELD("VIDEO_STREAM_DATA_UNIT").data.i.field=&(kms->capture.du);
FIELD("VIDEO_STREAM_INFO_DATA_UNIT").data.i.field=&(kms->capture.info_du);
@@ -672,6 +709,9 @@
FIELD("VBI_STREAM_DATA_UNIT").data.i.field=&(kms->vbi.du);
FIELD("VBI_STREAM_INFO_DATA_UNIT").data.i.field=&(kms->vbi.info_du);
+
+FIELD("VBI_STREAM_ACTIVE").data.t.zero2one=vbi_stream_on;
+FIELD("VBI_STREAM_ACTIVE").data.t.one2zero=vbi_stream_off;
kms->kmd=add_km_device(kms->kmfl, kms);
printk("Device %s %s (0x%04x:0x%04x) corresponds to /dev/video%d\n",
|