-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?

2
  • 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, 2015 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, 2015 at 13:36

1 Answer 1

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");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.