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.cpp"
|
||||||
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.cc"
|
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.h"
|
"${LIBWEBM_SRC_DIR}/sample_muxer_metadata.h"
|
||||||
"${LIBWEBM_SRC_DIR}/vttreader.cc"
|
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/vttreader.h"
|
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.h"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||||
target_link_libraries(sample_muxer LINK_PUBLIC webm)
|
target_link_libraries(sample_muxer LINK_PUBLIC webm)
|
||||||
|
|
||||||
# Dumpvtt section.
|
# Dumpvtt section.
|
||||||
add_executable(dumpvtt
|
add_executable(dumpvtt
|
||||||
"${LIBWEBM_SRC_DIR}/dumpvtt.cc"
|
"${LIBWEBM_SRC_DIR}/dumpvtt.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/vttreader.cc"
|
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/vttreader.h"
|
"${LIBWEBM_SRC_DIR}/webvtt/vttreader.h"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||||
target_link_libraries(dumpvtt LINK_PUBLIC webm)
|
target_link_libraries(dumpvtt LINK_PUBLIC webm)
|
||||||
|
|
||||||
# Vttdemux section.
|
# Vttdemux section.
|
||||||
add_executable(vttdemux
|
add_executable(vttdemux
|
||||||
"${LIBWEBM_SRC_DIR}/vttdemux.cc"
|
"${LIBWEBM_SRC_DIR}/vttdemux.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.cc"
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.cc"
|
||||||
"${LIBWEBM_SRC_DIR}/webvttparser.h")
|
"${LIBWEBM_SRC_DIR}/webvtt/webvttparser.h")
|
||||||
target_link_libraries(vttdemux LINK_PUBLIC webm)
|
target_link_libraries(vttdemux LINK_PUBLIC webm)
|
||||||
|
|
||||||
if (ENABLE_WEBMTS)
|
if (ENABLE_WEBMTS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
CXX := g++
|
CXX := g++
|
||||||
PREDEFINES := -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
DEFINES := -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
||||||
INCLUDES := -I.
|
INCLUDES := -I.
|
||||||
CXXFLAGS := -W -Wall -g -MMD -MP $(PREDEFINES) $(INCLUDES)
|
CXXFLAGS := -W -Wall -g -MMD -MP $(DEFINES) $(INCLUDES)
|
||||||
LIBWEBMA := libwebm.a
|
LIBWEBMA := libwebm.a
|
||||||
LIBWEBMSO := libwebm.so
|
LIBWEBMSO := libwebm.so
|
||||||
WEBMOBJS := mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
WEBMOBJS := mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
||||||
@ -9,7 +9,7 @@ WEBMOBJS += mkvparser/mkvparser.o mkvparser/mkvreader.o
|
|||||||
WEBMOBJS += common/file_util.o common/hdr_util.o
|
WEBMOBJS += common/file_util.o common/hdr_util.o
|
||||||
OBJSA := $(WEBMOBJS:.o=_a.o)
|
OBJSA := $(WEBMOBJS:.o=_a.o)
|
||||||
OBJSSO := $(WEBMOBJS:.o=_so.o)
|
OBJSSO := $(WEBMOBJS:.o=_so.o)
|
||||||
VTTOBJS := vttreader.o webvttparser.o sample_muxer_metadata.o
|
VTTOBJS := webvtt/vttreader.o webvtt/webvttparser.o sample_muxer_metadata.o
|
||||||
EXEOBJS := sample.o sample_muxer.o dumpvtt.o vttdemux.o
|
EXEOBJS := sample.o sample_muxer.o dumpvtt.o vttdemux.o
|
||||||
DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d)
|
DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d)
|
||||||
DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) $(OBJSA:.o=.d) $(OBJSSO:.o=.d)
|
DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) $(OBJSA:.o=.d) $(OBJSSO:.o=.d)
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include "./vttreader.h"
|
#include "webvtt/vttreader.h"
|
||||||
#include "./webvttparser.h"
|
#include "webvtt/webvttparser.h"
|
||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "mkvmuxer.hpp"
|
#include "mkvmuxer.hpp"
|
||||||
#include "vttreader.h"
|
#include "webvtt/vttreader.h"
|
||||||
|
|
||||||
namespace libwebm {
|
namespace libwebm {
|
||||||
|
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "mkvmuxertypes.hpp"
|
#include "webvtt/webvttparser.h"
|
||||||
#include "webvttparser.h"
|
|
||||||
|
|
||||||
namespace libwebm {
|
namespace libwebm {
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "mkvparser/mkvparser.hpp"
|
#include "mkvparser/mkvparser.hpp"
|
||||||
#include "mkvparser/mkvreader.hpp"
|
#include "mkvparser/mkvreader.hpp"
|
||||||
#include "webvttparser.h"
|
#include "webvtt/webvttparser.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Disable MSVC warnings that suggest making code non-portable.
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#ifndef VTTREADER_H_ // NOLINT
|
#ifndef WEBVTT_VTTREADER_H_
|
||||||
#define VTTREADER_H_
|
#define WEBVTT_VTTREADER_H_
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include "./webvttparser.h"
|
#include "./webvttparser.h"
|
||||||
@ -41,4 +41,4 @@ class VttReader : public libwebvtt::Reader {
|
|||||||
|
|
||||||
} // namespace libwebvtt
|
} // namespace libwebvtt
|
||||||
|
|
||||||
#endif // VTTREADER_H_ // NOLINT
|
#endif // WEBVTT_VTTREADER_H_
|
@ -6,8 +6,8 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#ifndef WEBVTTPARSER_H_ // NOLINT
|
#ifndef WEBVTT_WEBVTTPARSER_H_
|
||||||
#define WEBVTTPARSER_H_
|
#define WEBVTT_WEBVTTPARSER_H_
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -155,4 +155,4 @@ class Parser : private LineReader {
|
|||||||
|
|
||||||
} // namespace libwebvtt
|
} // namespace libwebvtt
|
||||||
|
|
||||||
#endif // WEBVTTPARSER_H_ // NOLINT
|
#endif // WEBVTT_WEBVTTPARSER_H_
|
Loading…
x
Reference in New Issue
Block a user