New upstream version 23.2.1+dfsg1
This commit is contained in:
parent
cdc9a9fc87
commit
b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions
|
|
@ -1,26 +1,20 @@
|
|||
project(ffmpeg-mux)
|
||||
project(obs-ffmpeg-mux)
|
||||
|
||||
find_package(FFmpeg REQUIRED
|
||||
COMPONENTS avcodec avutil avformat)
|
||||
include_directories(${FFMPEG_INCLUDE_DIRS})
|
||||
|
||||
set(ffmpeg-mux_SOURCES
|
||||
set(obs-ffmpeg-mux_SOURCES
|
||||
ffmpeg-mux.c)
|
||||
|
||||
set(ffmpeg-mux_HEADERS
|
||||
set(obs-ffmpeg-mux_HEADERS
|
||||
ffmpeg-mux.h)
|
||||
|
||||
add_executable(ffmpeg-mux
|
||||
${ffmpeg-mux_SOURCES}
|
||||
${ffmpeg-mux_HEADERS})
|
||||
add_executable(obs-ffmpeg-mux
|
||||
${obs-ffmpeg-mux_SOURCES}
|
||||
${obs-ffmpeg-mux_HEADERS})
|
||||
|
||||
target_link_libraries(ffmpeg-mux
|
||||
target_link_libraries(obs-ffmpeg-mux
|
||||
${FFMPEG_LIBRARIES})
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(ffmpeg-mux
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "ffmpeg-mux${_output_suffix}")
|
||||
endif()
|
||||
|
||||
install_obs_datatarget(ffmpeg-mux "obs-plugins/obs-ffmpeg")
|
||||
install_obs_core(obs-ffmpeg-mux)
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ static bool new_stream(struct ffmpeg_mux *ffm, AVStream **stream,
|
|||
AVCodec *codec;
|
||||
|
||||
if (!desc) {
|
||||
printf("Couldn't find encoder '%s'\n", name);
|
||||
fprintf(stderr, "Couldn't find encoder '%s'\n", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -276,13 +276,13 @@ static bool new_stream(struct ffmpeg_mux *ffm, AVStream **stream,
|
|||
|
||||
codec = avcodec_find_encoder(desc->id);
|
||||
if (!codec) {
|
||||
printf("Couldn't create encoder");
|
||||
fprintf(stderr, "Couldn't create encoder");
|
||||
return false;
|
||||
}
|
||||
|
||||
*stream = avformat_new_stream(ffm->output, codec);
|
||||
if (!*stream) {
|
||||
printf("Couldn't create stream for encoder '%s'\n", name);
|
||||
fprintf(stderr, "Couldn't create stream for encoder '%s'\n", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -469,7 +469,7 @@ static inline int open_output_file(struct ffmpeg_mux *ffm)
|
|||
ret = avio_open(&ffm->output->pb, ffm->params.file,
|
||||
AVIO_FLAG_WRITE);
|
||||
if (ret < 0) {
|
||||
printf("Couldn't open '%s', %s",
|
||||
fprintf(stderr, "Couldn't open '%s', %s",
|
||||
ffm->params.file, av_err2str(ret));
|
||||
return FFM_ERROR;
|
||||
}
|
||||
|
|
@ -482,7 +482,7 @@ static inline int open_output_file(struct ffmpeg_mux *ffm)
|
|||
AVDictionary *dict = NULL;
|
||||
if ((ret = av_dict_parse_string(&dict, ffm->params.muxer_settings,
|
||||
"=", " ", 0))) {
|
||||
printf("Failed to parse muxer settings: %s\n%s",
|
||||
fprintf(stderr, "Failed to parse muxer settings: %s\n%s",
|
||||
av_err2str(ret), ffm->params.muxer_settings);
|
||||
|
||||
av_dict_free(&dict);
|
||||
|
|
@ -501,7 +501,7 @@ static inline int open_output_file(struct ffmpeg_mux *ffm)
|
|||
|
||||
ret = avformat_write_header(ffm->output, &dict);
|
||||
if (ret < 0) {
|
||||
printf("Error opening '%s': %s",
|
||||
fprintf(stderr, "Error opening '%s': %s",
|
||||
ffm->params.file, av_err2str(ret));
|
||||
|
||||
av_dict_free(&dict);
|
||||
|
|
@ -521,7 +521,7 @@ static int ffmpeg_mux_init_context(struct ffmpeg_mux *ffm)
|
|||
|
||||
output_format = av_guess_format(NULL, ffm->params.file, NULL);
|
||||
if (output_format == NULL) {
|
||||
printf("Couldn't find an appropriate muxer for '%s'\n",
|
||||
fprintf(stderr, "Couldn't find an appropriate muxer for '%s'\n",
|
||||
ffm->params.file);
|
||||
return FFM_ERROR;
|
||||
}
|
||||
|
|
@ -529,7 +529,7 @@ static int ffmpeg_mux_init_context(struct ffmpeg_mux *ffm)
|
|||
ret = avformat_alloc_output_context2(&ffm->output, output_format,
|
||||
NULL, NULL);
|
||||
if (ret < 0) {
|
||||
printf("Couldn't initialize output context: %s\n",
|
||||
fprintf(stderr, "Couldn't initialize output context: %s\n",
|
||||
av_err2str(ret));
|
||||
return FFM_ERROR;
|
||||
}
|
||||
|
|
@ -679,7 +679,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
ret = ffmpeg_mux_init(&ffm, argc, argv);
|
||||
if (ret != FFM_SUCCESS) {
|
||||
puts("Couldn't initialize muxer");
|
||||
fprintf(stderr, "Couldn't initialize muxer\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue