package cn.reghao.oss.store.rpc.media;

import cn.reghao.oss.store.task.MediaConverter;
import cn.reghao.oss.api.iface.media.ConvertService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * @author reghao
 * @date 2023-10-08 16:54:25
 */
@DubboService
@Service
public class ConvertServiceImpl implements ConvertService {
    private final MediaConverter mediaConverter;

    public ConvertServiceImpl(MediaConverter mediaConverter) {
        this.mediaConverter = mediaConverter;
    }

    @Override
    public void convertVideo(String videoFileId) {
        mediaConverter.convertVideo(videoFileId);
    }

    @Override
    public void convertAudio(String audioFileId) {
        mediaConverter.convertAudio(audioFileId);
    }
}
