chromium/media/muxers/BUILD.gn

# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//media/media_options.gni")
import("//third_party/libgav1/options.gni")

source_set("muxers") {
  # Do not expand the visibility here without double-checking with OWNERS, this
  # is a roll-up target which is part of the //media component. Most other DEPs
  # should be using //media and not directly DEP this roll-up target.
  visibility = [ "//media" ]

  sources = [
    "box_byte_stream.cc",
    "box_byte_stream.h",
    "file_webm_muxer_delegate.cc",
    "file_webm_muxer_delegate.h",
    "live_webm_muxer_delegate.cc",
    "live_webm_muxer_delegate.h",
    "mp4_box_writer.cc",
    "mp4_box_writer.h",
    "mp4_fragment_box_writer.cc",
    "mp4_fragment_box_writer.h",
    "mp4_movie_box_writer.cc",
    "mp4_movie_box_writer.h",
    "mp4_muxer.cc",
    "mp4_muxer.h",
    "mp4_muxer_context.cc",
    "mp4_muxer_context.h",
    "mp4_muxer_delegate.cc",
    "mp4_muxer_delegate.h",
    "mp4_muxer_delegate_fragment.cc",
    "mp4_muxer_delegate_fragment.h",
    "mp4_type_conversion.cc",
    "mp4_type_conversion.h",
    "muxer.cc",
    "muxer.h",
    "muxer_timestamp_adapter.cc",
    "muxer_timestamp_adapter.h",
    "output_position_tracker.cc",
    "output_position_tracker.h",
    "webm_muxer.cc",
    "webm_muxer.h",
  ]

  deps = [
    "//base",
    "//components/version_info:version_info",
    "//media/base",
    "//media/formats",
    "//third_party/libwebm",
    "//ui/gfx/geometry",
  ]

  assert(use_libgav1_parser)
  deps += [ "//third_party/libgav1:libgav1_parser" ]

  configs += [ "//media:subcomponent_config" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "box_byte_stream_unittest.cc",
    "mp4_muxer_box_writer_unittest.cc",
    "mp4_muxer_context_unittest.cc",
    "mp4_muxer_delegate_unittest.cc",
    "mp4_muxer_unittest.cc",
    "mp4_type_conversion_unittest.cc",
    "muxer_timestamp_adapter_unittest.cc",
    "output_position_tracker_unittest.cc",
    "webm_muxer_unittest.cc",
  ]

  deps = [
    "//base/test:test_support",
    "//media:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/libwebm",
  ]
}