Skip to content

Commit

Permalink
Fix bug for v5.12.15
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 12, 2023
1 parent 7aa3b2b commit bc79a51
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Empty file.
4 changes: 2 additions & 2 deletions platform/dvr-local-disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (v *RecordWorker) Handle(ctx context.Context, handler *http.ServeMux) error
} else if globs, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, "globs").Result(); err != nil && err != redis.Nil {
return errors.Wrapf(err, "hget %v globs", SRS_RECORD_PATTERNS)
} else if processCpDir, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)).Result(); err != nil && err != redis.Nil {
return errors.Wrapf(err, "hget %v %v", string(RecordPostProcessCpFile))
return errors.Wrapf(err, "hget %v %v", SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile))
} else {
globFilters := []string{}
if globs != "" {
Expand Down Expand Up @@ -1072,7 +1072,7 @@ func (v *RecordM3u8Stream) finishM3u8(ctx context.Context) error {
func (v *RecordM3u8Stream) postProcessing(ctx context.Context) error {
processCpDir, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)).Result()
if err != nil && err != redis.Nil {
return errors.Wrapf(err, "hget %v %v", string(RecordPostProcessCpFile))
return errors.Wrapf(err, "hget %v %v", SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile))
}

if processCpDir == "" {
Expand Down
2 changes: 2 additions & 0 deletions platform/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ func initPlatform(ctx context.Context) error {
}

// Create directories for data, allow user to link it.
// Keep in mind that we must not create the containers/data/srs-s3-bucket, as the user should generate
// and mount it if they wish to save recordings to cloud storage.
for _, dir := range []string{
"containers/data/dvr", "containers/data/record", "containers/data/vod",
"containers/data/upload", "containers/data/vlive", "containers/data/signals",
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/ScenarioRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ScenarioRecordImpl({activeKeys, defaultApplyAll, defaultGlobs, defaultP
const [targetUrl, setTargetUrl] = React.useState();

const [postProcess, setPostProcess] = React.useState(defaultPostProcess);
const [postCpDir, setPostCpDir] = React.useState(defaultPostProcessValue || '/media/srs-bucket');
const [postCpDir, setPostCpDir] = React.useState(defaultPostProcessValue || '/data/srs-s3-bucket');

const testGlobFilters = React.useCallback(() => {
if (!targetUrl) return alert(t('record.urlEmpty'));
Expand Down Expand Up @@ -300,7 +300,7 @@ function ScenarioRecordImpl({activeKeys, defaultApplyAll, defaultGlobs, defaultP
<Form.Label>{t('record.postCp2')}</Form.Label>
<Form.Text> * {t('record.postCp3')}</Form.Text>
<Form.Control as="input" type='text' defaultValue={postCpDir}
placeholder="For example: /media/srs-bucket"
placeholder="For example: /data/srs-s3-bucket"
onChange={(e) => setPostCpDir(e.target.value)}/>
</Form.Group>}
<Button variant="primary" type="submit" onClick={(e) => {
Expand Down

0 comments on commit bc79a51

Please sign in to comment.