blob: 00ca662c1080c57ca638480daf3c616d1a1b5ceb [file] [log] [blame]
Ray Essick6ce27e52019-02-15 10:58:05 -08001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Robert Shih2e15aed2021-03-16 18:30:35 -070017#include <memory>
18#include <stats_event.h>
19
Ray Essick6ce27e52019-02-15 10:58:05 -080020namespace android {
Robert Shih2e15aed2021-03-16 18:30:35 -070021namespace mediametrics {
22class Item;
23}
Ray Essick6ce27e52019-02-15 10:58:05 -080024
Andy Hung5be90c82021-03-30 14:30:20 -070025using statsd_pusher = bool (const std::shared_ptr<const mediametrics::Item>& item,
26 const std::shared_ptr<mediametrics::StatsdLog>& statsdLog);
Ray Essick6ce27e52019-02-15 10:58:05 -080027// component specific dumpers
Andy Hung5be90c82021-03-30 14:30:20 -070028extern statsd_pusher statsd_audiopolicy;
29extern statsd_pusher statsd_audiorecord;
30extern statsd_pusher statsd_audiothread;
31extern statsd_pusher statsd_audiotrack;
32extern statsd_pusher statsd_codec;
33extern statsd_pusher statsd_extractor;
34extern statsd_pusher statsd_mediaparser;
Ray Essick6ce27e52019-02-15 10:58:05 -080035
Andy Hung5be90c82021-03-30 14:30:20 -070036extern statsd_pusher statsd_nuplayer;
37extern statsd_pusher statsd_recorder;
38extern statsd_pusher statsd_mediadrm;
39extern statsd_pusher statsd_drmmanager;
Ray Essick6ce27e52019-02-15 10:58:05 -080040
Andy Hung5be90c82021-03-30 14:30:20 -070041using statsd_puller = bool (const std::shared_ptr<const mediametrics::Item>& item,
42 AStatsEventList *);
Robert Shih2e15aed2021-03-16 18:30:35 -070043// component specific pullers
Andy Hung5be90c82021-03-30 14:30:20 -070044extern statsd_puller statsd_mediadrm_puller;
Robert Shih2e15aed2021-03-16 18:30:35 -070045
Andy Hung5be90c82021-03-30 14:30:20 -070046bool dump2Statsd(const std::shared_ptr<const mediametrics::Item>& item,
47 const std::shared_ptr<mediametrics::StatsdLog>& statsdLog);
Robert Shih2e15aed2021-03-16 18:30:35 -070048bool dump2Statsd(const std::shared_ptr<const mediametrics::Item>& item, AStatsEventList* out);
49
Ray Essick6ce27e52019-02-15 10:58:05 -080050} // namespace android