webvtt: Organize and clean up webvtt support.
Move webvtt support code into webvtt sub dir, and update build/includes as necessary. Change-Id: I1c0891afd413e92d43ba54b61cc8dc694c0bff36
This commit is contained in:
parent
7abe8ace91
commit
5f1065e4e2
@ -84,26 +84,26 @@ add_executable(sample_muxer
|
||||
"${LIBWEBM_SRC_DIR}/sample_muxer.cpp"
|
||||
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.cc"
|
||||
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.h"
|
||||
"${LIBWEBM_SRC_DIR}/vttreader.cc"
|
||||
"${LIBWEBM_SRC_DIR}/vttreader.h"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.h"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||
target_link_libraries(sample_muxer LINK_PUBLIC webm)
|
||||
|
||||
# Dumpvtt section.
|
||||
add_executable(dumpvtt
|
||||
"${LIBWEBM_SRC_DIR}/dumpvtt.cc"
|
||||
"${LIBWEBM_SRC_DIR}/vttreader.cc"
|
||||
"${LIBWEBM_SRC_DIR}/vttreader.h"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.h"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||
target_link_libraries(dumpvtt LINK_PUBLIC webm)
|
||||
|
||||
# Vttdemux section.
|
||||
add_executable(vttdemux
|
||||
"${LIBWEBM_SRC_DIR}/vttdemux.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||
target_link_libraries(vttdemux LINK_PUBLIC webm)
|
||||
|
||||
if (ENABLE_WEBMTS)
|
||||
|
@ -1,22 +1,22 @@
|
||||
CXX := g++
|
||||
PREDEFINES := -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
||||
INCLUDES := -I.
|
||||
CXXFLAGS := -W -Wall -g -MMD -MP $(PREDEFINES) $(INCLUDES)
|
||||
LIBWEBMA := libwebm.a
|
||||
LIBWEBMSO := libwebm.so
|
||||
WEBMOBJS := mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
||||
WEBMOBJS += mkvparser/mkvparser.o mkvparser/mkvreader.o
|
||||
WEBMOBJS += common/file_util.o common/hdr_util.o
|
||||
OBJSA := $(WEBMOBJS:.o=_a.o)
|
||||
OBJSSO := $(WEBMOBJS:.o=_so.o)
|
||||
VTTOBJS := vttreader.o webvttparser.o sample_muxer_metadata.o
|
||||
EXEOBJS := sample.o sample_muxer.o dumpvtt.o vttdemux.o
|
||||
DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d)
|
||||
DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) $(OBJSA:.o=.d) $(OBJSSO:.o=.d)
|
||||
DEPS += $(VTTOBJS:.o=.d) $(EXEOBJS:.o=.d)
|
||||
EXES := sample_muxer sample dumpvtt vttdemux
|
||||
CLEAN := $(EXEOBJS) $(VTTOBJS) $(WEBMOBJS) $(OBJSA) $(OBJSSO) $(LIBWEBMA)
|
||||
CLEAN += $(LIBWEBMSO) $(EXES) $(DEPS)
|
||||
CXX := g++
|
||||
DEFINES := -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
||||
INCLUDES := -I.
|
||||
CXXFLAGS := -W -Wall -g -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
LIBWEBMA := libwebm.a
|
||||
LIBWEBMSO := libwebm.so
|
||||
WEBMOBJS := mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
||||
WEBMOBJS += mkvparser/mkvparser.o mkvparser/mkvreader.o
|
||||
WEBMOBJS += common/file_util.o common/hdr_util.o
|
||||
OBJSA := $(WEBMOBJS:.o=_a.o)
|
||||
OBJSSO := $(WEBMOBJS:.o=_so.o)
|
||||
VTTOBJS := webvtt/vttreader.o webvtt/webvttparser.o sample_muxer_metadata.o
|
||||
EXEOBJS := sample.o sample_muxer.o dumpvtt.o vttdemux.o
|
||||
DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d)
|
||||
DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) $(OBJSA:.o=.d) $(OBJSSO:.o=.d)
|
||||
DEPS += $(VTTOBJS:.o=.d) $(EXEOBJS:.o=.d)
|
||||
EXES := sample_muxer sample dumpvtt vttdemux
|
||||
CLEAN := $(EXEOBJS) $(VTTOBJS) $(WEBMOBJS) $(OBJSA) $(OBJSSO) $(LIBWEBMA)
|
||||
CLEAN += $(LIBWEBMSO) $(EXES) $(DEPS)
|
||||
|
||||
all: $(EXES)
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "./vttreader.h"
|
||||
#include "./webvttparser.h"
|
||||
#include "webvtt/vttreader.h"
|
||||
#include "webvtt/webvttparser.h"
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
if (argc != 2) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "mkvmuxer.hpp"
|
||||
#include "vttreader.h"
|
||||
#include "webvtt/vttreader.h"
|
||||
|
||||
namespace libwebm {
|
||||
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "mkvmuxertypes.hpp"
|
||||
#include "webvttparser.h"
|
||||
#include "webvtt/webvttparser.h"
|
||||
|
||||
namespace libwebm {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "mkvparser/mkvparser.hpp"
|
||||
#include "mkvparser/mkvreader.hpp"
|
||||
#include "webvttparser.h"
|
||||
#include "webvtt/webvttparser.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable MSVC warnings that suggest making code non-portable.
|
||||
@ -1002,4 +1002,4 @@ int main(int argc, const char* argv[]) {
|
||||
CloseFiles(&metadata_map);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
#ifndef VTTREADER_H_ // NOLINT
|
||||
#define VTTREADER_H_
|
||||
#ifndef WEBVTT_VTTREADER_H_
|
||||
#define WEBVTT_VTTREADER_H_
|
||||
|
||||
#include <cstdio>
|
||||
#include "./webvttparser.h"
|
||||
@ -41,4 +41,4 @@ class VttReader : public libwebvtt::Reader {
|
||||
|
||||
} // namespace libwebvtt
|
||||
|
||||
#endif // VTTREADER_H_ // NOLINT
|
||||
#endif // WEBVTT_VTTREADER_H_
|
@ -6,8 +6,8 @@
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
#ifndef WEBVTTPARSER_H_ // NOLINT
|
||||
#define WEBVTTPARSER_H_
|
||||
#ifndef WEBVTT_WEBVTTPARSER_H_
|
||||
#define WEBVTT_WEBVTTPARSER_H_
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
@ -155,4 +155,4 @@ class Parser : private LineReader {
|
||||
|
||||
} // namespace libwebvtt
|
||||
|
||||
#endif // WEBVTTPARSER_H_ // NOLINT
|
||||
#endif // WEBVTT_WEBVTTPARSER_H_
|
Loading…
Reference in New Issue
Block a user