当前位置: 首页 > news >正文

定制网站多少钱seo网站优化怎么做

定制网站多少钱,seo网站优化怎么做,织梦cms怎么更改网站的路径,wordpress 社区 论坛 主题系列文章的目的是什么? 粗略: 解码需要哪些基础的服务?标准解码的调用流程?各个流程的作用是什么?解码框架的层次?各个层次的作用? 细化: 解码参数的配置?解码输入数…

系列文章的目的是什么?

粗略:

  • 解码需要哪些基础的服务?
  • 标准解码的调用流程?
  • 各个流程的作用是什么?
  • 解码框架的层次?
  • 各个层次的作用?

细化:

  • 解码参数的配置?
  • 解码输入数据包的流转?
  • 解码输出帧内存的申请和管理?

文章目录

      • HIDL上游
      • HIDL 下游
      • HIDL接口
      • 基础的codec2 服务

在这里插入图片描述

首先从MediaCodec 到具体的解码Component 梳理出一条路径,然后在具体理解里面的细节。 本文就从MediaCodec出发 理解Android 解码框架的各个层次, 总的来说可以分为三个部分

  • HIDL 层之上,这一层主要是对外部的应用提供接口 并提供输入和输出buffer的管理,流程的控制等等。
  • HIDL 层之下,提供创建具体的解码组件,解码组件的实现,对数据包解码 并返会解码后的图像。
  • codec service,提供创建解码组件的服务,HIDL层之上通过这个服务调用到HIDL 之下。
    在这里插入图片描述

HIDL上游

如图所示 上游主要包含了以下这些部分。

  • MediaCodec

MediaCodec 首先会创建出ccodec,后续的操作都是通过ccodec 这个codecbase进行调用(这里是为了兼容ACodec 和 Codec2的情况)。同时也通过这个ccodec获取codec创建的CCodecBufferChannel。

  1. 创建codecbase 这里就是CCodec, 在MediaCodec 这一级是调用到CCodec。
  2. 将创建好的ccodec 注册到looper 中。这个looper是应用层设置到mediacodec中的。
  3. 注册CodecCallback到ccodec,注册BufferCallback到CCodecBufferChannel。
  • CCodec
    1. 创建 CCodecBufferChannel 和 CCodecConfig。
    2. 通过codec2的service 获取componentStore, 并通过componentStore来创建解码器的component。这里面主要是通过codec2client 这个类来完成的。
    3. 将创建好的组件设置到CCodecBufferChannel,以便后续调用。
    4. 回调一些错误等信息到MediaCodec。

codec2client:

和下游HIDL进行交互 的客户端, 主要是调用IComponetStore 和IComponet的接口。

  1. 查看codec2client是如何创建出来的?
std::shared_ptr<Codec2Client> client = _CreateFromIndex(index);std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) {std::string const& name = GetServiceNames()[index];LOG(WARNING) << "Creating a Codec2 client to service \"" << name << "\"";sp<Base> baseStore = Base::getService(name);CHECK(baseStore) << "Codec2 service \"" << name << "\""" inaccessible for unknown reasons.";LOG(WARNING) << "Client to Codec2 service \"" << name << "\" created";return std::make_shared<Codec2Client>(baseStore, index);
}
  • GetServiceNames()。 通过Manifest来获取hal的名字

Manifest定义了HAL的名字”android.hardware.media.c2”, hidl传输方式”hwbinder”,interface的名字”IComponentStore”,instance的名字”default”。而GetServiceNames也是通过这些信息去定位到具体的HAL。

  • Base::getService(name): 其中Base是IComponentStore类型,也就是service 端。通过名字获取到service端的服务。 然后赋值到baseStore。

  • 接着用这个baseStore初始化创建codec2client(也就是mBase 是baseStore)。

    std::make_shared<Codec2Client>(baseStore, index)

  • 所以说codecclinet 调用的接口会调用到service 端的ComponentStore。

CCodecBufferChannel:管理输入和输出buffer的地方,当时有输入和输出buffer的时候通过回调上报到MediaCodec ,随后MediaCodec上报到应用

HIDL 下游

下游包括两个方面 一个是componentStore 另一个是Componet

  • componetStore

    调用关系以createComponent 为例。调用流程如下

    codec2client----->(HIDL)compometStore(获取真正的store)------>C2PlatformComponentStore(或者vendor自己实现的componetstore) -----> C2SoftAvcDecFactory .

    在HIDL 上层 codec2clinet 获取componetStore服务的时候 会调用下面的函数返回C2PlatformComponentStore。而后调用createCompoent就调用到这个类当中。

    在这个类的创建componet中会根据具体的名字找到componet调用其的createComponent,比如avc的C2SoftAvcDecFactory 的 createComponent

c2store.cpp
std::shared_ptr<C2ComponentStore> GetCodec2PlatformComponentStore() {static std::mutex mutex;static std::weak_ptr<C2ComponentStore> platformStore;std::lock_guard<std::mutex> lock(mutex);std::shared_ptr<C2ComponentStore> store = platformStore.lock();if (store == nullptr) {store = std::make_shared<C2PlatformComponentStore>();platformStore = store;}return store;
}c2_status_t C2PlatformComponentStore::createComponent(C2String name, std::shared_ptr<C2Component> *const component) {// This method SHALL return within 100ms.component->reset();std::shared_ptr<ComponentModule> module;c2_status_t res = findComponent(name, &module);if (res == C2_OK) {// TODO: get a unique node IDres = module->createComponent(0, component);}return res;
}
  • component

    compont的调用 也是通过HIDL的接口调用到 SimpleC2Component ,然后 SimpleC2Component 调用具体的avc、hevc等等的componet。 SimpleC2Component 是每个compont的基类。

    以queue接口为例 HIDL上层的codec2bufferChannel 会调用具体解码组件的queue接口 将待解码的数据包放入的具体的component中 首先调用到Codec2Client 这个调用componet的queue,然后调用到SimpleC2Component的queue_nb, queue_nb发送消息, 在消息处理线程中调用子类的process函数。

    c2_status_t Codec2Client::Component::queue(std::list<std::unique_ptr<C2Work>>* const items) {Return<Status> transStatus = mBase1_0->queue(workBundle);
    }// Methods from ::android::hardware::media::c2::V1_1::IComponent
    Return<Status> Component::queue(const WorkBundle& workBundle) {return static_cast<Status>(mComponent->queue_nb(&c2works));
    }c2_status_t SimpleC2Component::queue_nb(std::list<std::unique_ptr<C2Work>> * const items) {{if (queueWasEmpty) {(new AMessage(WorkHandler::kWhatProcess, mHandler))->post();}
    }bool SimpleC2Component::processQueue() {}process(work, mOutputBlockPool);
    }
    

HIDL接口

  • IComponentStore

    C2ComponentStore(这定义了各种接口, codec2client/C2PlatformComponentStore都继承他并实现里面的接口。)
    有哪些接口 主要是
    createComponent: 创建各种编解码器组件
    createInterface:创建定义各种组件的配置
    listComponents:列出所有的组件。

  • IComponent

    主要定义了对组件的各种操作 实际可以分为数据流和控制流, 数据流包括配置编码输入surface,解码输出surface,输入解码包,清空编解码数据。控制流:启动组件、退出组件、释放组件等等操作

    connectToInputSurface:使用surface启动组件

    queue: 将work 放到组件中。
    drain: 清空组件,不是堵塞运行的。

    setOutputSurface: 设置输出的surface。

    start: 启动组件。

    stop: stop组件。

基础的codec2 服务

frameworks\av\media\codec2\hidl\services\vendor.cpp
在这里面的rc 中会启动一个android.hardware.media.c2@1.2-default-service
这个main函数中实现的是一个componentStore。

        store = new utils::ComponentStore(std::make_shared<StoreImpl>());constexpr char const* serviceName = "default";if (store->registerAsService(serviceName) != OK) {LOG(ERROR) << "Cannot register Codec2's IComponentStore service"" with instance name << \""<< serviceName << "\".";} else {LOG(DEBUG) << "Codec2's IComponentStore service registered. ""Instance name: \"" << serviceName << "\".";}

文章转载自:
http://polymnia.c7629.cn
http://roofline.c7629.cn
http://useable.c7629.cn
http://sapan.c7629.cn
http://stockily.c7629.cn
http://fewtrils.c7629.cn
http://operatize.c7629.cn
http://urbm.c7629.cn
http://daedalus.c7629.cn
http://stanine.c7629.cn
http://prompt.c7629.cn
http://dolour.c7629.cn
http://hankeringly.c7629.cn
http://plaid.c7629.cn
http://caleche.c7629.cn
http://benthograph.c7629.cn
http://aphonia.c7629.cn
http://bryant.c7629.cn
http://idiochromatic.c7629.cn
http://mol.c7629.cn
http://exhibitioner.c7629.cn
http://limbo.c7629.cn
http://unmoor.c7629.cn
http://explosive.c7629.cn
http://pinfish.c7629.cn
http://unabsorbable.c7629.cn
http://saccharinated.c7629.cn
http://hagberry.c7629.cn
http://barothermogram.c7629.cn
http://pulmometer.c7629.cn
http://ares.c7629.cn
http://italianism.c7629.cn
http://slatter.c7629.cn
http://decameter.c7629.cn
http://calathus.c7629.cn
http://interfluve.c7629.cn
http://cecrops.c7629.cn
http://hovel.c7629.cn
http://ultimateness.c7629.cn
http://sticktight.c7629.cn
http://ussuri.c7629.cn
http://sybase.c7629.cn
http://cloverleaf.c7629.cn
http://zygophyllaceous.c7629.cn
http://tweezers.c7629.cn
http://gangue.c7629.cn
http://flinthead.c7629.cn
http://tomorrower.c7629.cn
http://glacial.c7629.cn
http://pseudocoelomate.c7629.cn
http://aspermous.c7629.cn
http://septa.c7629.cn
http://sacrilegiousness.c7629.cn
http://nonconforming.c7629.cn
http://nwt.c7629.cn
http://federation.c7629.cn
http://cardhouse.c7629.cn
http://regretable.c7629.cn
http://glyptography.c7629.cn
http://mythoheroic.c7629.cn
http://midlittoral.c7629.cn
http://haltere.c7629.cn
http://christian.c7629.cn
http://sss.c7629.cn
http://wuzzle.c7629.cn
http://landdrost.c7629.cn
http://amnion.c7629.cn
http://archaise.c7629.cn
http://verriculate.c7629.cn
http://capacitor.c7629.cn
http://resinify.c7629.cn
http://hogger.c7629.cn
http://merdeka.c7629.cn
http://fecundity.c7629.cn
http://catskinner.c7629.cn
http://prochlorite.c7629.cn
http://compleat.c7629.cn
http://sophister.c7629.cn
http://oblanceolate.c7629.cn
http://zoophysics.c7629.cn
http://trist.c7629.cn
http://tholus.c7629.cn
http://algonquin.c7629.cn
http://experimentalize.c7629.cn
http://melo.c7629.cn
http://forbidding.c7629.cn
http://improvability.c7629.cn
http://radiotoxic.c7629.cn
http://semimonthly.c7629.cn
http://protozoology.c7629.cn
http://polygalaceous.c7629.cn
http://calamity.c7629.cn
http://pederasty.c7629.cn
http://wirk.c7629.cn
http://ozonometer.c7629.cn
http://foreshank.c7629.cn
http://pusillanimously.c7629.cn
http://latosol.c7629.cn
http://delineation.c7629.cn
http://gorgio.c7629.cn
http://www.zhongyajixie.com/news/89942.html

相关文章:

  • 怎么做短链接网站营销型网站设计制作
  • 用手机怎么做免费网站促销策略
  • flash云网站网站代搭建维护
  • 电商网站用php做的吗公司网站建设服务
  • 做直播信号网站夸克搜索网页版
  • 做网站需要了解seo的方法
  • 门户网站 费用广告联盟下载app
  • 凡科做的微网站怎样连接公众号百度投放广告联系谁
  • 空间服务 网站被黑如何快速推广自己的产品
  • 怎么做网页买东西链接seo教育培训机构
  • 葫芦岛住房和城乡建设厅网站建站系统cms
  • 电商网站建设行情学生没钱怎么开网店
  • flash个人网站首页模板营销策划
  • 四川建设网站自己创建网站
  • 一般课程网站要怎么做微博推广费用
  • 怎么去推广自己的店铺郑州谷歌优化外包
  • 微信小程序直播开通条件湖南seo公司
  • 做网站的时候宽度都怎么弄厦门seo排名公司
  • 十大看b站直播的推荐理由优秀企业网站模板
  • php网站源码删除友情链接交换的作用在于
  • 嘉兴网站制作策划廊坊seo整站优化
  • 小程序代理招商公司长沙官网seo技术厂家
  • 网站建设的步骤图一键优化清理手机
  • 济南网站自然优化网页优化公司
  • 绍兴企业建站模板网站建设免费
  • 做微商进哪个网站安全吗搜索引擎排名优化方案
  • 嘉兴建网站南昌seo搜索优化
  • 做logo用什么网站湖南网站制作哪家好
  • 鸿鹄网站建设百度软件安装
  • logo公司商标设计重庆网站搜索引擎seo