change ffmpeg_hw.c to ffmpeg_hw.cpp

dev
xufuji456 3 years ago
parent 5de596bb0f
commit 483b145893
  1. 2
      app/CMakeLists.txt
  2. 8
      app/src/main/cpp/ffmpeg/ffmpeg_hw.cpp

@ -24,7 +24,7 @@ add_library( # Sets the name of the library.
src/main/cpp/ffmpeg/ffmpeg_opt.c
src/main/cpp/ffmpeg_cmd.c
src/main/cpp/ffmpeg/ffprobe.c
src/main/cpp/ffmpeg/ffmpeg_hw.c
src/main/cpp/ffmpeg/ffmpeg_hw.cpp
src/main/cpp/audio_player.cpp
src/main/cpp/openSL_audio_player.cpp
src/main/cpp/video_player.cpp

@ -58,7 +58,7 @@ static HWDevice *hw_device_add(void)
nb_hw_devices = 0;
return NULL;
}
hw_devices[nb_hw_devices] = av_mallocz(sizeof(HWDevice));
hw_devices[nb_hw_devices] = static_cast<HWDevice *>(av_mallocz(sizeof(HWDevice)));
if (!hw_devices[nb_hw_devices])
return NULL;
return hw_devices[nb_hw_devices++];
@ -74,7 +74,7 @@ static char *hw_device_default_name(enum AVHWDeviceType type)
size_t index_pos;
int index, index_limit = 1000;
index_pos = strlen(type_name);
name = av_malloc(index_pos + 4);
name = static_cast<char *>(av_malloc(index_pos + 4));
if (!name)
return NULL;
for (index = 0; index < index_limit; index++) {
@ -432,7 +432,7 @@ int hw_device_setup_for_encode(OutputStream *ost)
static int hwaccel_retrieve_data(AVCodecContext *avctx, AVFrame *input)
{
InputStream *ist = avctx->opaque;
InputStream *ist = static_cast<InputStream *>(avctx->opaque);
AVFrame *output = NULL;
enum AVPixelFormat output_format = ist->hwaccel_output_format;
int err;
@ -474,7 +474,7 @@ fail:
int hwaccel_decode_init(AVCodecContext *avctx)
{
InputStream *ist = avctx->opaque;
InputStream *ist = static_cast<InputStream *>(avctx->opaque);
ist->hwaccel_retrieve_data = &hwaccel_retrieve_data;
Loading…
Cancel
Save