rtp_target.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 55 行

H
55
字号
/*******************************************************************
 * 
 *  Copyright C 2005 by Amlogic, Inc. All Rights Reserved.
 *
 *  Description: RTP Data feeder.
 *
 *  Author: Tim Yao
 *  Created: Wed Jun 30 16:02:20 2005
 *
 *******************************************************************/

#ifndef RTP_TARGET_H_
#define RTP_TARGET_H_

enum rtp_target_type {
    RTP_TARGET_VIDEO = 0,
    RTP_TARGET_AUDIO
};

enum rtp_target_status {
    RTP_TARGET_EMPTY = 0,
    RTP_TARGET_UNREADY,
    RTP_TARGET_RUNNING
};

typedef struct rtp_audio_ctrl {
#ifdef AVOS
    OS_EVENT *audio_msgq;       /* audio lib control interface */
#endif
} rtp_audio_ctrl;

typedef struct rtp_video_ctrl {
    /* TBD */
    unsigned reserved;
} rtp_video_ctrl;

typedef void (*rtp_payload_callback)(struct pbuf *rtp_payload, char **decoder_payload, uint32_t *decoder_size);

typedef struct rtp_target {
    enum rtp_target_type type;          /* rtp target type */
    enum rtp_target_status status;      /* rtp target status */
    PBUFStream input_stream;            /* incoming data source */
    int target_fd;                      /* audio target datapath */
    rtp_payload_callback get_payload;   /* function to get real data from rtp payload */
    union {
        struct rtp_audio_ctrl   audio;
        struct rtp_video_ctrl   video;
    } ctrl;
} rtp_target;

rtp_target * rtp_target_get(enum rtp_target_type, rtp_payload_callback payload_cb);
void rtp_target_del(rtp_target * target);

#endif /* RTP_TARGET_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?