changed the muxer api a bit, the pkt packet type can differ and needs to be casted (from void*).
This commit is contained in:
parent
5f8dca956b
commit
d84f92028e
4 changed files with 9 additions and 7 deletions
|
@ -295,12 +295,12 @@ muxer_write_meta(muxer_t *m, struct epg_broadcast *eb)
|
|||
* sanity wrapper arround m_write_pkt()
|
||||
*/
|
||||
int
|
||||
muxer_write_pkt(muxer_t *m, struct th_pkt *pkt)
|
||||
muxer_write_pkt(muxer_t *m, void *data)
|
||||
{
|
||||
if(!m || !pkt)
|
||||
if(!m || !data)
|
||||
return -1;
|
||||
|
||||
return m->m_write_pkt(m, pkt);
|
||||
return m->m_write_pkt(m, data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct muxer {
|
|||
int (*m_close) (struct muxer *); // Close the muxer
|
||||
void (*m_destroy) (struct muxer *); // Free the memory
|
||||
int (*m_write_meta) (struct muxer *, struct epg_broadcast *); // Append epg data
|
||||
int (*m_write_pkt) (struct muxer *, struct th_pkt *); // Append a media packet
|
||||
int (*m_write_pkt) (struct muxer *, void *); // Append a media packet
|
||||
|
||||
int m_errors; // Number of errors
|
||||
muxer_container_type_t m_container; // The type of the container
|
||||
|
@ -68,7 +68,7 @@ int muxer_init (muxer_t *m, const struct streaming_start *ss, con
|
|||
int muxer_close (muxer_t *m);
|
||||
int muxer_destroy (muxer_t *m);
|
||||
int muxer_write_meta (muxer_t *m, struct epg_broadcast *eb);
|
||||
int muxer_write_pkt (muxer_t *m, struct th_pkt *pkt);
|
||||
int muxer_write_pkt (muxer_t *m, void *data);
|
||||
const char* muxer_mime (muxer_t *m, const struct streaming_start *ss);
|
||||
const char* muxer_suffix (muxer_t *m, const struct streaming_start *ss);
|
||||
|
||||
|
|
|
@ -223,8 +223,9 @@ pass_muxer_write_ts(muxer_t *m, struct th_pkt *pkt)
|
|||
* Write a packet directly to the file descriptor
|
||||
*/
|
||||
static int
|
||||
pass_muxer_write_pkt(muxer_t *m, struct th_pkt *pkt)
|
||||
pass_muxer_write_pkt(muxer_t *m, void *data)
|
||||
{
|
||||
th_pkt_t *pkt = (th_pkt_t*)data;
|
||||
pass_muxer_t *pm = (pass_muxer_t*)m;
|
||||
|
||||
switch(pm->m_container) {
|
||||
|
|
|
@ -117,8 +117,9 @@ tvh_muxer_open_file(muxer_t *m, const char *filename)
|
|||
* Write a packet to the muxer
|
||||
*/
|
||||
static int
|
||||
tvh_muxer_write_pkt(muxer_t *m, struct th_pkt *pkt)
|
||||
tvh_muxer_write_pkt(muxer_t *m, void *data)
|
||||
{
|
||||
th_pkt_t *pkt = (th_pkt_t*)data;
|
||||
tvh_muxer_t *tm = (tvh_muxer_t*)m;
|
||||
|
||||
if(mk_mux_write_pkt(tm->tm_ref, pkt)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue