summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2015-08-13 18:48:41 (GMT)
committer niels <niels@dyne.org>2015-08-13 18:48:41 (GMT)
commit07c190930cb3c60c309f8036115e6dced4092042 (patch)
treea419dea0a553916cf51d42f308aecd8408b1c7ef
parent3f601e3669bddd794ab1a954a8a54ab21d656bde (diff)
dont allow DV format to be set when resolution is invalid (recording)
-rw-r--r--veejay-current/veejay-server/veejay/vj-event.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/veejay-current/veejay-server/veejay/vj-event.c b/veejay-current/veejay-server/veejay/vj-event.c
index 2851ef0..04b7786 100644
--- a/veejay-current/veejay-server/veejay/vj-event.c
+++ b/veejay-current/veejay-server/veejay/vj-event.c
@@ -7413,7 +7413,11 @@ void vj_event_tag_set_format(void *ptr, const char format[], va_list ap)
return;
}
+ int old_format = _recorder_format;
+ veejay_msg(VEEJAY_MSG_DEBUG,"Current recording format is %s",
+ vj_avcodec_get_encoder_name( old_format ));
+
for( i = 0; recorder_formats[i].name != NULL ; i ++ ) {
if(strncasecmp( str, recorder_formats[i].name, strlen(recorder_formats[i].name) ) == 0 ) {
_recorder_format = recorder_formats[i].id;
@@ -7430,13 +7434,17 @@ void vj_event_tag_set_format(void *ptr, const char format[], va_list ap)
if(strncasecmp(str,"dvvideo",7)==0||strncasecmp(str,"dvsd",4)==0)
{
- if(vj_el_is_dv(v->current_edit_list)) {
+ if(vj_el_is_dv(v->current_edit_list))
+ {
_recorder_format = ENCODER_DVVIDEO;
}
else
{
- veejay_msg(VEEJAY_MSG_ERROR, "Not working in a valid DV resolution");
+ veejay_msg(VEEJAY_MSG_ERROR, "Cannot set DVVideo format (invalid DV resolution)");
+ _recorder_format = old_format;
}
+
+ veejay_msg(VEEJAY_MSG_INFO, "Selected recording format %s" , vj_avcodec_get_encoder_name(old_format));
return;
}
@@ -7446,15 +7454,15 @@ void vj_event_tag_set_format(void *ptr, const char format[], va_list ap)
if( vj_el_is_dv( v->current_edit_list ))
{
_recorder_format = ENCODER_QUICKTIME_DV;
- veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in QT DV format");
}
- else
- veejay_msg(VEEJAY_MSG_ERROR, "Not working in valid DV resolution");
+ else
+ {
+ veejay_msg(VEEJAY_MSG_ERROR, "Cannot set Quicktime-DV format (invalid DV resolution)");
+ _recorder_format = old_format;
+ }
}
#endif
-
- veejay_msg(VEEJAY_MSG_INFO,
- "Recording in %s" , vj_avcodec_get_encoder_name( _recorder_format ) );
+ veejay_msg(VEEJAY_MSG_INFO, "Selected recording format %s" , vj_avcodec_get_encoder_name(old_format));
}
static void _vj_event_tag_record( veejay_t *v , int *args, char *str )