-1
  1. we can make distinguish between audio and video if we use android standard api to implement apk to play music/movie. no matter under libaudioflinger or decoder's lib.

when decode audio/video in awesomeplayer.cpp,we can judge the source data't type,audio? or video?

  1. we can make distinguish the app's type under libaudioflinger

use getCallingPid()

Question:

how can we make distinguish 3rd's data source type(Audio?video?)under audioflinger?

caopeng
  • 914
  • 13
  • 23
  • What exactly do you mean by _"under audioflinger"_? Anyway, the AudioFlinger deals with audio, not with media containers that can contain streams of various types (video, audio, subtitles, ...). – Michael Mar 14 '15 at 10:39
  • what's "under audioflinger" means? I mean,in the audiofinger source code. does AF process the PCM data? If APP decode the media content(such as mp3,mp4 .) using android default decoder which define under frameworks/av.we can set some flags from decoder to AF. however,lots of 3rd app has own's decoder,and send the decoded data to AF directly – caopeng Mar 14 '15 at 13:36

1 Answers1

0

yes audioflinger process the pcm data . However if you want to set some parameters from Application then you can use AudioManager's setParametes API and then have a handling for that parameter in AudioFlinger .

AudioManager am = (AudioManager)context.getSystemService(context.AUDIO_SERVICE); am.setParameters("key_value_pair");

hellrocker
  • 628
  • 8
  • 15