From cc1543abf3126b9eacc73068407b85276c5eaf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Tue, 24 May 2016 12:16:26 +0200 Subject: [PATCH] Move H264BitstreamParser to video_coding. Moves parser, used in video_coding/ from rtp_rtcp where it is unused. BUG=webrtc:5678 R=asapersson@webrtc.org TBR=glaznev@webrt.org Review URL: https://codereview.webrtc.org/2007553003 . Cr-Commit-Position: refs/heads/master@{#12866} --- webrtc/api/java/jni/androidmediaencoder_jni.cc | 2 +- webrtc/modules/modules.gyp | 2 +- webrtc/modules/rtp_rtcp/BUILD.gn | 2 -- webrtc/modules/rtp_rtcp/rtp_rtcp.gypi | 2 -- webrtc/modules/video_coding/BUILD.gn | 2 ++ .../utility}/h264_bitstream_parser.cc | 2 +- .../source => video_coding/utility}/h264_bitstream_parser.h | 6 +++--- .../utility}/h264_bitstream_parser_unittest.cc | 2 +- .../modules/video_coding/utility/video_coding_utility.gyp | 2 ++ 9 files changed, 11 insertions(+), 11 deletions(-) rename webrtc/modules/{rtp_rtcp/source => video_coding/utility}/h264_bitstream_parser.cc (99%) rename webrtc/modules/{rtp_rtcp/source => video_coding/utility}/h264_bitstream_parser.h (91%) rename webrtc/modules/{rtp_rtcp/source => video_coding/utility}/h264_bitstream_parser_unittest.cc (96%) diff --git a/webrtc/api/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc index 8fbd594db7..da0f2e6717 100644 --- a/webrtc/api/java/jni/androidmediaencoder_jni.cc +++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc @@ -29,8 +29,8 @@ #include "webrtc/base/thread_checker.h" #include "webrtc/base/timeutils.h" #include "webrtc/common_types.h" -#include "webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.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/vp8_header_parser.h" #include "webrtc/system_wrappers/include/field_trial.h" diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index e11bbfe88b..d7476d5b98 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -297,7 +297,6 @@ 'rtp_rtcp/source/fec_test_helper.cc', 'rtp_rtcp/source/fec_test_helper.h', 'rtp_rtcp/source/h264_sps_parser_unittest.cc', - 'rtp_rtcp/source/h264_bitstream_parser_unittest.cc', 'rtp_rtcp/source/nack_rtx_unittest.cc', 'rtp_rtcp/source/packet_loss_stats_unittest.cc', 'rtp_rtcp/source/producer_fec_unittest.cc', @@ -382,6 +381,7 @@ 'video_coding/test/stream_generator.cc', 'video_coding/test/stream_generator.h', '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/quality_scaler_unittest.cc', 'video_processing/test/denoiser_test.cc', diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index 9d69811ef3..b826fd1ea9 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -32,8 +32,6 @@ source_set("rtp_rtcp") { "source/forward_error_correction.h", "source/forward_error_correction_internal.cc", "source/forward_error_correction_internal.h", - "source/h264_bitstream_parser.cc", - "source/h264_bitstream_parser.h", "source/h264_sps_parser.cc", "source/h264_sps_parser.h", "source/mock/mock_rtp_payload_strategy.h", diff --git a/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi b/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi index 3f1e935b2a..cfb3916ce0 100644 --- a/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi +++ b/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi @@ -135,8 +135,6 @@ 'source/forward_error_correction.h', 'source/forward_error_correction_internal.cc', 'source/forward_error_correction_internal.h', - 'source/h264_bitstream_parser.cc', - 'source/h264_bitstream_parser.h', 'source/h264_sps_parser.cc', 'source/h264_sps_parser.h', 'source/producer_fec.cc', diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index 755e6efa9d..e0f26f365d 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -104,6 +104,8 @@ source_set("video_coding_utility") { sources = [ "utility/frame_dropper.cc", "utility/frame_dropper.h", + "utility/h264_bitstream_parser.cc", + "utility/h264_bitstream_parser.h", "utility/ivf_file_writer.cc", "utility/ivf_file_writer.h", "utility/moving_average.h", diff --git a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc b/webrtc/modules/video_coding/utility/h264_bitstream_parser.cc similarity index 99% rename from webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc rename to webrtc/modules/video_coding/utility/h264_bitstream_parser.cc index e23a3fa629..9102a6a62d 100644 --- a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc +++ b/webrtc/modules/video_coding/utility/h264_bitstream_parser.cc @@ -7,7 +7,7 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h" +#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h" #include #include diff --git a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h b/webrtc/modules/video_coding/utility/h264_bitstream_parser.h similarity index 91% rename from webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h rename to webrtc/modules/video_coding/utility/h264_bitstream_parser.h index 28276afb72..b6fe1aa18d 100644 --- a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h +++ b/webrtc/modules/video_coding/utility/h264_bitstream_parser.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_ -#define WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_ +#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ +#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ #include #include @@ -77,4 +77,4 @@ class H264BitstreamParser { } // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_H264_BITSTREAM_PARSER_H_ +#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_H264_BITSTREAM_PARSER_H_ diff --git a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser_unittest.cc b/webrtc/modules/video_coding/utility/h264_bitstream_parser_unittest.cc similarity index 96% rename from webrtc/modules/rtp_rtcp/source/h264_bitstream_parser_unittest.cc rename to webrtc/modules/video_coding/utility/h264_bitstream_parser_unittest.cc index 6c726c3120..ebc4467544 100644 --- a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser_unittest.cc +++ b/webrtc/modules/video_coding/utility/h264_bitstream_parser_unittest.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h" +#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/webrtc/modules/video_coding/utility/video_coding_utility.gyp b/webrtc/modules/video_coding/utility/video_coding_utility.gyp index 8edfd61986..4d8b7c3199 100644 --- a/webrtc/modules/video_coding/utility/video_coding_utility.gyp +++ b/webrtc/modules/video_coding/utility/video_coding_utility.gyp @@ -20,6 +20,8 @@ 'sources': [ 'frame_dropper.cc', 'frame_dropper.h', + 'h264_bitstream_parser.cc', + 'h264_bitstream_parser.h', 'ivf_file_writer.cc', 'ivf_file_writer.h', 'moving_average.h',