This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

encode channels

Hi,

In RDK2.8,

a) if I want to encode with 2 channels, can it start each channel respectively? e.g. channel 0 first, channel 1 the second.

b) And can it encode different resolution in different channel?

c) can it support dynamically change resolution?

Best regards,

 

  • a) if I want to encode with 2 channels, can it start each channel respectively? e.g. channel 0 first, channel 1 the second.

      - Sorry I didnt understand the question. You can create 2 encoder channels and they will encode if input is available. There is no encLink API to start encoding. You can howvever disable a channel and enable it runtime using Venc_enableChn and Venc_disableChn


    b) And can it encode different resolution in different channel?

     - Yes.

    c) can it support dynamically change resolution?

     - Yes

  • a) while at runtime, if encode parameters of ch1 needs to be changed, can it set the changed parameters and then renable ch1?

  • Most encoder parameters  like bitrate can be changed runtime. There is no need to disable the encode channel.Resolution also can change runtime but resolution cannot be greater than the create time resolution. Switch to any lower resolution is supported.In RDK 3.5 support is added to delete and create encoder algorithm.Using this feature you can change the codec type also runtime 

  • Is that means if I we require 2 channels, that it should create the 2 channels at start time? Can it add one more channel for 3 channels?

    And in RDK3.5, I've found out SWITCH_CODEC_CHANNEL  to dynamically change codec types at runtime, but can it support delete and create CHANNEL at runtime, like DEC_LINK_CMD_DELETE_CHANNEL and DEC_LINK_CMD_CREATE_CHANNEL in decode_display demos?

  • Is that means if I we require 2 channels, that it should create the 2 channels at start time? Can it add one more channel for 3 channels?

     - Yes if you require 2 channels you should create them at encLink create time. It is not possible to dynamically add a 3rd channel.

    And in RDK3.5, I've found out SWITCH_CODEC_CHANNEL  to dynamically change codec types at runtime, but can it support delete and create CHANNEL at runtime, like DEC_LINK_CMD_DELETE_CHANNEL and DEC_LINK_CMD_CREATE_CHANNEL in decode_display demos?

     - As you mentioned the SWITCH_CODEC_CHANNEL  can only be used to change the codec type . The encoder buffers output are not deleted and recreated so you have to create the encoder channel for max required resolution and you can change to a lower resolution if required at runtime

  • Thank you very much, Badri.

    I am still not very clear about whether encoder can dynamically delete and create channels. As in DecLink_tskMain() in decLink_tsk.c, it has the CMDs of DEC_LINK_CMD_CREATE_CHANNEL and DEC_LINK_CMD_DELETE_CHANNEL to dynamically delete and create channels, and I've tested them. If delete a channel and then recreate it, it can change to a higher resolution. But I didn't find the similar CMDs in encoder in RDK2.8, RDK 3.5 neither.

    But the release note of RDK3.5 says it supports dynamically create/delete channels: Encode link dynamic channel create/delete (works when encode channel is created in NON-TILED mode ONLY). See note (1)

    Can you show me which file realize them in codes? Thanks very much!

  • I am still not very clear about whether encoder can dynamically delete and create channels. As in DecLink_tskMain() in decLink_tsk.c, it has the CMDs of DEC_LINK_CMD_CREATE_CHANNEL and DEC_LINK_CMD_DELETE_CHANNEL to dynamically delete and create channels, and I've tested them. If delete a channel and then recreate it, it can change to a higher resolution. But I didn't find the similar CMDs in encoder in RDK2.8, RDK 3.5 neither.

    - Encoder does _not_ support cmd similar to decoder. Encoder only support switching codec type in runtime.For example code pls refer /dvr_rdk/demos/mcfw_api_demos/mcfw_demo/demo_encode.c for encoder codec switch


  • OK. Thank you. But why doesn't encoder support the similar delete/create channels dynamically like decoder does for a higer resolution?

  • We have no plans to support dynamic encoder delete like decoder .It was not implemented as it was not a requirement so far. Also implementing it for encoder is more complex than decoder because the output of encoder is sent to A8 so deleting buffers should be done only after application frees the buffers

  • So the release note of RDK3.5 says it supports Encode link dynamic channel create/delete ONLY refer to change codec type? If not, what it refers to?

    the release note of RDK3.5 says it supports dynamically create/delete channels: Encode link dynamic channel create/delete (works when encode channel is created in NON-TILED mode ONLY). See note (1)

  • So the release note of RDK3.5 says it supports Encode link dynamic channel create/delete ONLY refer to change codec type? Or what it refers to?

     - It refers ONLY to change codec type.

    I want to understand why you require dynamic channel create/delete. You can create encoder with max resolution and dynamically switch to any smaller resolution. Are you facing issue with memory allocation ? If not there is no advantage to dynamically deleting and creating an encoder channel.

  • Badri Narayanan said:

    I want to understand why you require dynamic channel create/delete. You can create encoder with max resolution and dynamically switch to any smaller resolution. Are you facing issue with memory allocation ? If not there is no advantage to dynamically deleting and creating an encoder channel.

    Thank you very much, Badri. It's just our project requirement to use channels arbitrarily, but the encoder has some limits. And it seems that decoder has more function than the encoder, so I am inquisitive about whether encoder also has the same function, such as dynamic channel create/delete.

  • And it leads to ambiguity what the release note of RDK3.5 referring Encode link supports dynamic channel create/delete, what I've thought it exactly like the decoder provides DEC_LINK_CMD_CREATE_CHANNEL and DEC_LINK_CMD_DELETE_CHANNEL.

  • You are correct. We will fix the documentation in the next RDK release