diff options
author | mannol <eniz_vukovic@hotmail.com> | 2015-04-29 01:01:25 +0200 |
---|---|---|
committer | mannol <eniz_vukovic@hotmail.com> | 2015-04-29 01:01:25 +0200 |
commit | 9bba7a0434d0967d5dd76b8afc7783ea2edad0cf (patch) | |
tree | 6486c250acb38429a63a62e54cd1e4bcb0a029ee /toxav/video.h | |
parent | e4a020333d76bc30172f54f2545677f01bdd54b6 (diff) |
Done
Diffstat (limited to 'toxav/video.h')
-rw-r--r-- | toxav/video.h | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/toxav/video.h b/toxav/video.h index 78003ef3..8da15578 100644 --- a/toxav/video.h +++ b/toxav/video.h | |||
@@ -38,6 +38,9 @@ | |||
38 | 38 | ||
39 | struct RTPMessage_s; | 39 | struct RTPMessage_s; |
40 | 40 | ||
41 | /* | ||
42 | * Base Video Codec session type. | ||
43 | */ | ||
41 | typedef struct VCSession_s { | 44 | typedef struct VCSession_s { |
42 | 45 | ||
43 | /* encoding */ | 46 | /* encoding */ |
@@ -65,23 +68,46 @@ typedef struct VCSession_s { | |||
65 | const uint8_t *processing_video_frame; | 68 | const uint8_t *processing_video_frame; |
66 | uint16_t processing_video_frame_size; | 69 | uint16_t processing_video_frame_size; |
67 | 70 | ||
68 | |||
69 | ToxAV *av; | 71 | ToxAV *av; |
70 | int32_t friend_id; | 72 | uint32_t friend_number; |
71 | 73 | ||
72 | PAIR(toxav_receive_video_frame_cb *, void *) vcb; /* Video frame receive callback */ | 74 | PAIR(toxav_receive_video_frame_cb *, void *) vcb; /* Video frame receive callback */ |
73 | 75 | ||
74 | pthread_mutex_t queue_mutex[1]; | 76 | pthread_mutex_t queue_mutex[1]; |
75 | } VCSession; | 77 | } VCSession; |
76 | 78 | ||
77 | VCSession* vc_new(ToxAV* av, uint32_t friend_id, toxav_receive_video_frame_cb *cb, void *cb_data, uint32_t mvfpsz); | 79 | /* |
80 | * Create new Video Codec session. | ||
81 | */ | ||
82 | VCSession* vc_new(ToxAV* av, uint32_t friend_number, toxav_receive_video_frame_cb *cb, void *cb_data, uint32_t mvfpsz); | ||
83 | /* | ||
84 | * Kill the Video Codec session. | ||
85 | */ | ||
78 | void vc_kill(VCSession* vc); | 86 | void vc_kill(VCSession* vc); |
87 | /* | ||
88 | * Do periodic work. Work is consisted out of decoding only. | ||
89 | */ | ||
79 | void vc_do(VCSession* vc); | 90 | void vc_do(VCSession* vc); |
91 | /* | ||
92 | * Set new video splitting cycle. This is requirement in order to send video packets. | ||
93 | */ | ||
80 | void vc_init_video_splitter_cycle(VCSession* vc); | 94 | void vc_init_video_splitter_cycle(VCSession* vc); |
95 | /* | ||
96 | * Update the video splitter cycle with new data. | ||
97 | */ | ||
81 | int vc_update_video_splitter_cycle(VCSession* vc, const uint8_t* payload, uint16_t length); | 98 | int vc_update_video_splitter_cycle(VCSession* vc, const uint8_t* payload, uint16_t length); |
99 | /* | ||
100 | * Iterate over splitted cycle. | ||
101 | */ | ||
82 | const uint8_t *vc_iterate_split_video_frame(VCSession* vc, uint16_t *size); | 102 | const uint8_t *vc_iterate_split_video_frame(VCSession* vc, uint16_t *size); |
103 | /* | ||
104 | * Queue new rtp message. | ||
105 | */ | ||
83 | int vc_queue_message(void *vcp, struct RTPMessage_s *msg); | 106 | int vc_queue_message(void *vcp, struct RTPMessage_s *msg); |
84 | int vc_reconfigure_encoder(VCSession* vc, int32_t bitrate, uint16_t width, uint16_t height); | 107 | /* |
85 | int vc_reconfigure_test_encoder(VCSession* vc, int32_t bitrate, uint16_t width, uint16_t height); | 108 | * Set new values to the encoders. |
109 | */ | ||
110 | int vc_reconfigure_encoder(VCSession* vc, int32_t bit_rate, uint16_t width, uint16_t height); | ||
111 | int vc_reconfigure_test_encoder(VCSession* vc, int32_t bit_rate, uint16_t width, uint16_t height); | ||
86 | 112 | ||
87 | #endif /* VIDEO_H */ \ No newline at end of file | 113 | #endif /* VIDEO_H */ \ No newline at end of file |