Skip to content

Commit

Permalink
Merge pull request bilibili#31 from befovy/develop
Browse files Browse the repository at this point in the history
fix: generate ijkversion.h, complete notify position
  • Loading branch information
befovy committed May 17, 2020
2 parents b8f29f8 + d252733 commit 77d41b9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
14 changes: 12 additions & 2 deletions ijkmedia/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,27 @@ if (NOT DEFINED FIJKROOT_PATH)
set(FIJKROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/../)
endif ()

if(IJK_DESKTOP_UNI)
if (IJK_DESKTOP_UNI)
add_subdirectory(portaudio)
add_subdirectory(ijkyuv)

target_compile_options(portaudio_static PRIVATE "-Wno-deprecated-declarations")
target_compile_options(portaudio PRIVATE "-Wno-deprecated-declarations")
endif()
endif ()

add_subdirectory(ijksdl)
add_subdirectory(ijkplayer)

set(GIT_DESCRIBE "unknown, dose not found git")
execute_process(
COMMAND git describe --dirty
OUTPUT_VARIABLE GIT_DESCRIBE
OUTPUT_STRIP_TRAILING_WHITESPACE
# ERROR_QUIET
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
)
configure_file(ijkplayer/ijkversion.h.in ${CMAKE_CURRENT_LIST_DIR}/ijkplayer/ijkversion.h @ONLY)

if (ANDROID)
add_subdirectory(ijksoundtouch)
add_subdirectory(ijkyuv)
Expand Down
6 changes: 0 additions & 6 deletions ijkmedia/ijkplayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,3 @@ if (ANDROID)
target_link_libraries(${IJKPLAYER_LIB_NAME} android)
endif ()

if (NOT WIN32)
add_custom_command(TARGET ${IJKPLAYER_LIB_NAME}
PRE_BUILD
COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/version.sh ${CMAKE_CURRENT_LIST_DIR} ijkversion.h
)
endif()
6 changes: 5 additions & 1 deletion ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,11 @@ static int read_thread(void *arg)
av_strerror(ffp->error, error_msg, AV_ERROR_MAX_STRING_SIZE);
ffp_notify_msg4(ffp, FFP_MSG_ERROR, ffp->error, 0, error_msg, AV_ERROR_MAX_STRING_SIZE);
} else {
ffp_clock_msg_notify_cycle(ffp, -1);
if (ffp->enable_position_notify) {
int64_t position = ffp_get_duration_l(ffp);
ffp_notify_msg2(ffp, FFP_MSG_CURRENT_POSITION_UPDATE, (int) position);
}
ALOGW("msg complete, duration %ld. position %ld", ffp_get_duration_l(ffp), ffp_get_current_position_l(ffp));
av_log(ffp, AV_LOG_INFO, "ffp_toggle_buffering: completed: OK\n");
ffp_notify_msg1(ffp, FFP_MSG_COMPLETED);
}
Expand Down
5 changes: 5 additions & 0 deletions ijkmedia/ijkplayer/ijkversion.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Automatically generated by cmake configure, do not manually edit! */
#ifndef IJKVERSION_H
#define IJKVERSION_H
#define IJKPLAYER_VERSION "@GIT_DESCRIBE@"
#endif /* IJKVERSION_H */
1 change: 1 addition & 0 deletions ijkmedia/ijksdl/ijksdl_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define IJKSDL__IJKSDL_LOG_H

#include <stdio.h>
#include <stdarg.h>

void ijk_log_set_level(int level);
void ijk_log_print(int level, const char *tag, const char *fmt, ...);
Expand Down

0 comments on commit 77d41b9

Please sign in to comment.