mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-10 17:11:20 +02:00
2018-10-17 Fred Gleason <fredg@paravelsystems.com>
* Added an 'ExportedFileMode=' parameter to the '[Tuning]' section of rd.conf(5).
This commit is contained in:
parent
f060189fca
commit
0be9c9ee4a
@ -16711,3 +16711,6 @@
|
||||
* Updated the copyright of the Operations Guide.
|
||||
* Documented GPIO support for AudioScience cards in the
|
||||
'Local Audio Adapter' section of the Operations Guide.
|
||||
2018-10-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'ExportedFileMode=' parameter to the '[Tuning]' section
|
||||
of rd.conf(5).
|
||||
|
@ -130,6 +130,10 @@ ChannelsPerPcm=-1
|
||||
UseRealtime=Yes
|
||||
RealtimePriority=9
|
||||
|
||||
; The mode to be set on a file when exported to a local
|
||||
; filesystem (octal).
|
||||
ExportedFileMode=0664
|
||||
|
||||
; Introduce a delay of this many microseconds in each loop iteration
|
||||
; when transcoding files.
|
||||
TranscodingDelay=0
|
||||
|
5
lib/rd.h
5
lib/rd.h
@ -85,6 +85,11 @@
|
||||
#define RD_ALSA_FADE_INTERVAL 100
|
||||
#define RD_ALSA_SAMPLE_RATE_TOLERANCE 100
|
||||
|
||||
/*
|
||||
* Tuning Settings
|
||||
*/
|
||||
#define RD_TUNING_DEFAULT_EXPORTED_FILE_MODE 0664
|
||||
|
||||
/*
|
||||
* Date Limits
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Export an Audio File using the RdXport Web Service
|
||||
//
|
||||
// (C) Copyright 2010,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -217,6 +217,7 @@ RDAudioExport::ErrorCode RDAudioExport::runExport(const QString &username,
|
||||
|
||||
if(response_code==200) {
|
||||
*conv_err=RDAudioConvert::ErrorOk;
|
||||
chmod(conv_dst_filename,conv_config->tuningExportedFileMode());
|
||||
return RDAudioExport::ErrorOk;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Export an Audio File using the RdXport Web Service
|
||||
//
|
||||
// (C) Copyright 2010,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <unistd.h>
|
||||
@ -473,6 +472,12 @@ int RDConfig::transcodingDelay() const
|
||||
return conf_transcoding_delay;
|
||||
}
|
||||
|
||||
|
||||
mode_t RDConfig::tuningExportedFileMode() const
|
||||
{
|
||||
return conf_tuning_exported_file_mode;
|
||||
}
|
||||
|
||||
// Don't use this method in application code, use RDTempDirectory()
|
||||
QString RDConfig::tempDirectory()
|
||||
{
|
||||
@ -640,6 +645,10 @@ void RDConfig::load()
|
||||
conf_use_realtime=profile->boolValue("Tuning","UseRealtime",false);
|
||||
conf_realtime_priority=profile->intValue("Tuning","RealtimePriority",9);
|
||||
conf_transcoding_delay=profile->intValue("Tuning","TranscodingDelay");
|
||||
conf_tuning_exported_file_mode=profile->
|
||||
stringValue("Tuning","ExportedFileMode",
|
||||
QString().sprintf("%o",RD_TUNING_DEFAULT_EXPORTED_FILE_MODE)).
|
||||
toInt(NULL,8);
|
||||
conf_temp_directory=profile->stringValue("Tuning","TempDirectory","");
|
||||
conf_sas_station=profile->stringValue("SASFilter","Station","");
|
||||
conf_sas_matrix=profile->intValue("SASFilter","Matrix",0);
|
||||
@ -750,6 +759,7 @@ void RDConfig::clear()
|
||||
conf_enable_mixer_logging=false;
|
||||
conf_use_realtime=false;
|
||||
conf_realtime_priority=9;
|
||||
conf_tuning_exported_file_mode=RD_TUNING_DEFAULT_EXPORTED_FILE_MODE;
|
||||
conf_transcoding_delay=0;
|
||||
conf_temp_directory="";
|
||||
conf_sas_station="";
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A container class for a Rivendell Base Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -26,6 +26,8 @@
|
||||
#include <unistd.h>
|
||||
#endif // WIN32
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <qhostaddress.h>
|
||||
@ -111,6 +113,7 @@ class RDConfig
|
||||
bool useRealtime();
|
||||
int realtimePriority();
|
||||
int transcodingDelay() const;
|
||||
mode_t tuningExportedFileMode() const;
|
||||
QString tempDirectory();
|
||||
QString sasStation() const;
|
||||
int sasMatrix() const;
|
||||
@ -178,6 +181,7 @@ class RDConfig
|
||||
QString conf_cae_logfile;
|
||||
bool conf_enable_mixer_logging;
|
||||
bool conf_use_realtime;
|
||||
mode_t conf_tuning_exported_file_mode;
|
||||
int conf_transcoding_delay;
|
||||
int conf_realtime_priority;
|
||||
QString conf_temp_directory;
|
||||
|
@ -336,6 +336,10 @@ void MainObject::RunUpload(CatchEvent *evt)
|
||||
catch_config->logXloadDebugData()))) {
|
||||
case RDUpload::ErrorOk:
|
||||
catch_connect->setExitCode(evt->id(),RDRecording::Ok,tr("Ok"));
|
||||
if(QUrl(evt->resolvedUrl()).protocol().lower()=="file") {
|
||||
chmod(QUrl(evt->resolvedUrl()).path(),
|
||||
catch_config->tuningExportedFileMode());
|
||||
}
|
||||
qApp->processEvents();
|
||||
LogLine(RDConfig::LogInfo,QString().
|
||||
sprintf("finished upload of %s to %s, id=%d",
|
||||
|
Loading…
x
Reference in New Issue
Block a user