Skip to content

Commit

Permalink
libtxproto/encoder: Add pix_format
Browse files Browse the repository at this point in the history
  • Loading branch information
rofferom committed Apr 8, 2024
1 parent 08f95c6 commit b96dc9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/include/libtxproto/txproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ typedef struct TxEncoderOptions {
const char *name;
AVDictionary *options;
AVDictionary *init_opts;

/* Video options only */
enum AVPixelFormat pix_fmt;
} TxEncoderOptions;

AVBufferRef *tx_encoder_create(
TXMainContext *ctx,
const TxEncoderOptions *options
Expand Down
1 change: 1 addition & 0 deletions src/txproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ AVBufferRef *tx_encoder_create(
}

ectx->codec_config = options->options;
ectx->pix_fmt = options->pix_fmt;

if (options->init_opts) {
err = sp_encoder_ctrl(ectx_ref, SP_EVENT_CTRL_OPTS | SP_EVENT_FLAG_IMMEDIATE, options->init_opts);
Expand Down

0 comments on commit b96dc9d

Please sign in to comment.