Skip to content

Commit

Permalink
[core] Removed deprecated features from SRT C API (#1364)
Browse files Browse the repository at this point in the history
* Cleared difference in cmake file
* ATTICs decommissioned
  • Loading branch information
ethouris authored Jun 26, 2020
1 parent 10ed37b commit 0e2201a
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 1,576 deletions.
630 changes: 0 additions & 630 deletions ATTIC/srt-multiplex.cpp

This file was deleted.

9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1146,15 +1146,6 @@ if (ENABLE_EXAMPLES)

srt_add_example(testcapi-connect.c)
target_link_libraries(testcapi-connect ${srt_link_library} ${DEPENDS_srt})

set (SOURCES_suflip
${CMAKE_CURRENT_SOURCE_DIR}/examples/suflip.cpp
${CMAKE_CURRENT_SOURCE_DIR}/apps/uriparser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/apps/apputil.cpp
)
srt_add_program(suflip ${SOURCES_suflip})
target_link_libraries(suflip ${srt_link_library})
install(TARGETS suflip RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()


Expand Down
63 changes: 0 additions & 63 deletions common/win/ATTIC/winporting.h

This file was deleted.

Loading

3 comments on commit 0e2201a

@hydra3333
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello.

I am cross-compiling ffmpeg (including srt as one of its dependencies) under ubuntu 20.04 with mingw64.
Whilst this srt commit 0e2201a builds OK of itself, subsequent building of ffmpeg crashes with the log shown below.
Building with the srt commit prior to 0e2201a yields a successful ffmpeg build.

Advice welcomed.

ffmpeg build log:

CC	libavformat/libopenmpt.o
CC	libavformat/librtmp.o
CC	libavformat/libsrt.o
libavformat/libopenmpt.c: In function 'read_probe_openmpt':
libavformat/libopenmpt.c:251:41: warning: passing argument 1 of 'probe_openmpt_extension' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  251 |             if (probe_openmpt_extension(p) > 0) {
      |                                         ^
libavformat/libopenmpt.c:221:49: note: expected 'AVProbeData *' but argument is of type 'const AVProbeData *'
  221 | static int probe_openmpt_extension(AVProbeData *p)
      |                                    ~~~~~~~~~~~~~^
libavformat/libopenmpt.c:274:36: warning: passing argument 1 of 'probe_openmpt_extension' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  274 |     return probe_openmpt_extension(p);
      |                                    ^
libavformat/libopenmpt.c:221:49: note: expected 'AVProbeData *' but argument is of type 'const AVProbeData *'
  221 | static int probe_openmpt_extension(AVProbeData *p)
      |                                    ~~~~~~~~~~~~~^
CC	libavformat/lmlm4.o
CC	libavformat/loasdec.o
CC	libavformat/lrc.o
CC	libavformat/lrcdec.o
libavformat/libsrt.c: In function 'libsrt_set_options_pre':
libavformat/libsrt.c:317:66: error: 'SRTO_STRICTENC' undeclared (first use in this function); did you mean 'SRTO_STATE'?
  317 |         (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
      |                                                                  ^~~~~~~~~~~~~~
      |                                                                  SRTO_STATE
libavformat/libsrt.c:317:66: note: each undeclared identifier is reported only once for each function it appears in
libavformat/libsrt.c:336:50: error: 'SRTO_SMOOTHER' undeclared (first use in this function); did you mean 'SRTO_SENDER'?
  336 |         (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
      |                                                  ^~~~~~~~~~~~~
      |                                                  SRTO_SENDER
libavformat/libsrt.c: In function 'libsrt_setup':
libavformat/libsrt.c:409:5: warning: 'srt_socket' is deprecated [-Wdeprecated-declarations]
  409 |     fd = srt_socket(cur_ai->ai_family, cur_ai->ai_socktype, 0);
      |     ^~
In file included from libavformat/libsrt.c:24:
/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/include/srt/srt.h:735:41: note: declared here
  735 | SRT_ATR_DEPRECATED_PX SRT_API SRTSOCKET srt_socket(int, int, int) SRT_ATR_DEPRECATED;
      |                                         ^~~~~~~~~~
make: *** [ffbuild/common.mak:59: libavformat/libsrt.o] Error 1
make: *** Waiting for unfinished jobs....
[09:54:42][ERROR] Error [2] running process: 'make -j 4 ' in '/home/u/Desktop/_working/workdir/x86_64_products/ffmpeg'
[09:54:42][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/_working/workdir/x86_64_products/ffmpeg' and re-run the script

@hydra3333
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also referenced in #1382 (comment)

@hydra3333
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ffmpeg ticket created https://trac.ffmpeg.org/ticket/8760

Please # to comment.