1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the macro SRS_FFMPEG to SRS_FFMPEG_STUB, SRS_FFMPEG_TOOL to build ffmpeg tool

This commit is contained in:
winlin 2014-04-08 15:28:34 +08:00
parent 70e73bc281
commit eba35e2ac0
8 changed files with 31 additions and 27 deletions

View file

@ -289,7 +289,7 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir
// write ffmpeg info to log file.
log_file = _srs_config->get_ffmpeg_log_dir();
log_file += "/";
log_file += "encoder";
log_file += "ffmpeg-encoder";
log_file += "-";
log_file += req->vhost;
log_file += "-";

View file

@ -39,7 +39,7 @@ using namespace std;
#include <srs_app_pithy_print.hpp>
#include <srs_protocol_rtmp_stack.hpp>
#ifdef SRS_FFMPEG
#ifdef SRS_FFMPEG_STUB
#define SRS_ENCODER_COPY "copy"
#define SRS_ENCODER_NO_VIDEO "vn"

View file

@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core.hpp>
#ifdef SRS_FFMPEG
#ifdef SRS_FFMPEG_STUB
#include <string>
#include <vector>

View file

@ -246,7 +246,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S
// write ffmpeg info to log file.
log_file = _srs_config->get_ffmpeg_log_dir();
log_file += "/";
log_file += "ingest";
log_file += "ffmpeg-ingest";
log_file += "-";
log_file += vhost->arg0();
log_file += "-";
@ -305,6 +305,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S
std::string vcodec = _srs_config->get_engine_vcodec(engine);
std::string acodec = _srs_config->get_engine_acodec(engine);
// whatever the engine config, use copy as default.
if (!engine || !_srs_config->get_engine_enabled(engine) || vcodec.empty() || acodec.empty()) {
if ((ret = ffmpeg->initialize_copy()) != ERROR_SUCCESS) {
return ret;

View file

@ -163,6 +163,9 @@ SrsServer::SrsServer()
srs_assert(_srs_config);
_srs_config->subscribe(this);
// donot new object in constructor,
// for some global instance is not ready now,
// new these objects in initialize instead.
#ifdef SRS_HTTP_API
http_api_handler = NULL;
#endif