Move current bitstream parser to more appropriate directory.

This CL groups together the code that has to do with parsing H264 bitstreams.
This code logically belongs together, and having it in the same directory not
only simplifies things from a project structure perspective, but also makes it
easier to refactor out common parts incrementally.
An added benefit is that this simplifies modular compilation, where for example
one would like a build of WebRTC without the H264 codec-specific parts.

BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2370853005
Cr-Commit-Position: refs/heads/master@{#14684}
This commit is contained in:
kthelgason
2016-10-19 09:31:09 -07:00
committed by Commit bot
parent 577bc19210
commit cc6817e9ce
10 changed files with 11 additions and 13 deletions

View File

@ -29,8 +29,8 @@
#include "webrtc/base/thread_checker.h" #include "webrtc/base/thread_checker.h"
#include "webrtc/base/timeutils.h" #include "webrtc/base/timeutils.h"
#include "webrtc/common_types.h" #include "webrtc/common_types.h"
#include "webrtc/common_video/h264/h264_bitstream_parser.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h" #include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h"
#include "webrtc/modules/video_coding/utility/quality_scaler.h" #include "webrtc/modules/video_coding/utility/quality_scaler.h"
#include "webrtc/modules/video_coding/utility/vp8_header_parser.h" #include "webrtc/modules/video_coding/utility/vp8_header_parser.h"
#include "webrtc/system_wrappers/include/field_trial.h" #include "webrtc/system_wrappers/include/field_trial.h"

View File

@ -18,6 +18,8 @@ config("common_video_config") {
rtc_static_library("common_video") { rtc_static_library("common_video") {
sources = [ sources = [
"bitrate_adjuster.cc", "bitrate_adjuster.cc",
"h264/h264_bitstream_parser.cc",
"h264/h264_bitstream_parser.h",
"h264/h264_common.cc", "h264/h264_common.cc",
"h264/h264_common.h", "h264/h264_common.h",
"h264/pps_parser.cc", "h264/pps_parser.cc",
@ -93,6 +95,7 @@ if (rtc_include_tests) {
sources = [ sources = [
"bitrate_adjuster_unittest.cc", "bitrate_adjuster_unittest.cc",
"h264/h264_bitstream_parser_unittest.cc",
"h264/pps_parser_unittest.cc", "h264/pps_parser_unittest.cc",
"h264/sps_parser_unittest.cc", "h264/sps_parser_unittest.cc",
"h264/sps_vui_rewriter_unittest.cc", "h264/sps_vui_rewriter_unittest.cc",

View File

@ -7,7 +7,7 @@
* 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.
*/ */
#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h" #include "webrtc/common_video/h264/h264_bitstream_parser.h"
#include <memory> #include <memory>
#include <vector> #include <vector>

View File

@ -8,8 +8,8 @@
* 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 WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ #ifndef WEBRTC_COMMON_VIDEO_H264_H264_BITSTREAM_PARSER_H_
#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ #define WEBRTC_COMMON_VIDEO_H264_H264_BITSTREAM_PARSER_H_
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
@ -56,4 +56,4 @@ class H264BitstreamParser {
} // namespace webrtc } // namespace webrtc
#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ #endif // WEBRTC_COMMON_VIDEO_H264_H264_BITSTREAM_PARSER_H_

View File

@ -8,7 +8,7 @@
* 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.
*/ */
#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h" #include "webrtc/common_video/h264/h264_bitstream_parser.h"
#include "webrtc/test/gtest.h" #include "webrtc/test/gtest.h"

View File

@ -490,7 +490,6 @@ if (rtc_include_tests) {
"video_coding/test/stream_generator.h", "video_coding/test/stream_generator.h",
"video_coding/timing_unittest.cc", "video_coding/timing_unittest.cc",
"video_coding/utility/frame_dropper_unittest.cc", "video_coding/utility/frame_dropper_unittest.cc",
"video_coding/utility/h264_bitstream_parser_unittest.cc",
"video_coding/utility/ivf_file_writer_unittest.cc", "video_coding/utility/ivf_file_writer_unittest.cc",
"video_coding/utility/moving_average_unittest.cc", "video_coding/utility/moving_average_unittest.cc",
"video_coding/utility/quality_scaler_unittest.cc", "video_coding/utility/quality_scaler_unittest.cc",

View File

@ -98,8 +98,6 @@ rtc_static_library("video_coding_utility") {
sources = [ sources = [
"utility/frame_dropper.cc", "utility/frame_dropper.cc",
"utility/frame_dropper.h", "utility/frame_dropper.h",
"utility/h264_bitstream_parser.cc",
"utility/h264_bitstream_parser.h",
"utility/ivf_file_writer.cc", "utility/ivf_file_writer.cc",
"utility/ivf_file_writer.h", "utility/ivf_file_writer.h",
"utility/moving_average.cc", "utility/moving_average.cc",

View File

@ -15,8 +15,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "webrtc/common_video/h264/h264_bitstream_parser.h"
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h"
#include "webrtc/modules/video_coding/utility/quality_scaler.h" #include "webrtc/modules/video_coding/utility/quality_scaler.h"
#include "third_party/openh264/src/codec/api/svc/codec_app_def.h" #include "third_party/openh264/src/codec/api/svc/codec_app_def.h"

View File

@ -13,10 +13,10 @@
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_ #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_
#include "webrtc/base/criticalsection.h" #include "webrtc/base/criticalsection.h"
#include "webrtc/common_video/h264/h264_bitstream_parser.h"
#include "webrtc/common_video/include/bitrate_adjuster.h" #include "webrtc/common_video/include/bitrate_adjuster.h"
#include "webrtc/common_video/rotation.h" #include "webrtc/common_video/rotation.h"
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h"
#include "webrtc/modules/video_coding/utility/quality_scaler.h" #include "webrtc/modules/video_coding/utility/quality_scaler.h"
#if defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) #if defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)

View File

@ -21,8 +21,6 @@
'sources': [ 'sources': [
'frame_dropper.cc', 'frame_dropper.cc',
'frame_dropper.h', 'frame_dropper.h',
'h264_bitstream_parser.cc',
'h264_bitstream_parser.h',
'ivf_file_writer.cc', 'ivf_file_writer.cc',
'ivf_file_writer.h', 'ivf_file_writer.h',
'moving_average.cc', 'moving_average.cc',