Skip to content

gmp-openh264.cpp: add missing vector include - #4062

Open
juippis wants to merge 1 commit into
cisco:masterfrom
juippis:make-plugin-fix-missing-vector-include
Open

juippis wants to merge 1 commit into
cisco:masterfrom
juippis:make-plugin-fix-missing-vector-include

Conversation

@juippis

@juippis juippis commented Oct 23, 2026

Copy link
Copy Markdown

make plugin fails to build to:

make V=Yes CFLAGS_M32= CFLAGS_M64= CFLAGS_OPT= PREFIX=/usr LIBDIR_NAME=lib64 SHAREDLIB_DIR=/usr/lib64 INCLUDES_DIR=/usr/include/openh264 HAVE_AVX2=Yes HAVE_GTEST=Yes ARCH=amd64 ENABLEPIC=Yes ENABLE64BIT=Yes plugin 
x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -frecord-gcc-switches  -DNDEBUG -Wall -fno-strict-aliasing -fPIC -MMD -MP -fstack-protector-all -DGENERATED_VERSION_HEADER -march=native -O2 -pipe -frecord-gcc-switches -I./codec/api/wels -I./codec/common/inc -Icodec/common/inc  -I./gmp-api -c -o module/gmp-openh264.o module/gmp-openh264.cpp
module/gmp-openh264.cpp: In member function 'void OpenH264VideoEncoder::Encode_m(GMPVideoi420Frame*, SFrameBSInfo*, GMPVideoFrameType)':
module/gmp-openh264.cpp:718:10: error: 'vector' is not a member of 'std'
  718 |     std::vector<uint32_t> lengths;
      |          ^~~~~~
module/gmp-openh264.cpp:94:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
   93 | #include "task_utils.h"
  +++ |+#include <vector>
   94 | 
module/gmp-openh264.cpp:718:25: error: expected primary-expression before '>' token
  718 |     std::vector<uint32_t> lengths;
      |                         ^
module/gmp-openh264.cpp:718:27: error: 'lengths' was not declared in this scope; did you mean 'length'?
  718 |     std::vector<uint32_t> lengths;
      |                           ^~~~~~~
      |                           length
module/gmp-openh264.cpp: At global scope:
module/gmp-openh264.cpp:811:6: error: variable or field 'copyWithStartCode' declared void
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |      ^~~~~~~~~~~~~~~~~
module/gmp-openh264.cpp:811:29: error: 'vector' is not a member of 'std'
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                             ^~~~~~
module/gmp-openh264.cpp:811:29: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
module/gmp-openh264.cpp:811:43: error: expected primary-expression before '>' token
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                           ^
module/gmp-openh264.cpp:811:46: error: 'out' was not declared in this scope
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                              ^~~
module/gmp-openh264.cpp:811:51: error: expected primary-expression before 'const'
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                                   ^~~~~
module/gmp-openh264.cpp:811:77: error: expected primary-expression before 'size'
  811 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                                                             ^~~~
module/gmp-openh264.cpp: In member function 'virtual void OpenH264VideoDecoder::InitDecode(const GMPVideoCodec&, const uint8_t*, uint32_t, GMPVideoDecoderCallback*, int32_t)':
module/gmp-openh264.cpp:888:12: error: 'vector' is not a member of 'std'
  888 |       std::vector<uint8_t> annexb;
      |            ^~~~~~
module/gmp-openh264.cpp:888:12: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
module/gmp-openh264.cpp:888:26: error: expected primary-expression before '>' token
  888 |       std::vector<uint8_t> annexb;
      |                          ^
module/gmp-openh264.cpp:888:28: error: 'annexb' was not declared in this scope
  888 |       std::vector<uint8_t> annexb;
      |                            ^~~~~~
module/gmp-openh264.cpp:912:9: error: 'copyWithStartCode' was not declared in this scope
  912 |         copyWithStartCode(annexb, avcc, size);
      |         ^~~~~~~~~~~~~~~~~
module/gmp-openh264.cpp:929:9: error: 'copyWithStartCode' was not declared in this scope
  929 |         copyWithStartCode(annexb, avcc, size);
      |         ^~~~~~~~~~~~~~~~~
make: *** [module/targets.mk:13: module/gmp-openh264.o] Error 1

This simple include makes the build pass.

That being said, meson didn't seem to have a similar option to building gmp-api plugin that the current Makefile has, therefore I didn't attempt to build with meson.

Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant