Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/lib_ccx/ccx_demuxer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct cap_info
{
int pid;
int program_number;
enum ccx_stream_type stream;
enum ccx_stream_type stream;
enum ccx_code_type codec;
long capbufsize;
unsigned char *capbuf;
Expand All @@ -52,17 +52,17 @@ struct cap_info
void *codec_private_data;
int ignore;

/**
List joining all stream in TS
/**
List joining all stream in TS
*/
struct list_head all_stream;
/**
List joining all sibling Stream in Program
/**
List joining all sibling Stream in Program
*/
struct list_head sib_head;
struct list_head sib_stream;
/**
List joining all sibling Stream in Program
/**
List joining all sibling Stream in Program
*/
struct list_head pg_stream;

Expand Down Expand Up @@ -169,8 +169,8 @@ struct demuxer_data* alloc_demuxer_data(void);
void delete_demuxer_data(struct demuxer_data *data);
int update_capinfo(struct ccx_demuxer *ctx, int pid, enum ccx_stream_type stream, enum ccx_code_type codec, int pn, void *private_data);
struct cap_info * get_cinfo(struct ccx_demuxer *ctx, int pid);
int need_capInfo(struct ccx_demuxer *ctx, int program_number);
int need_capInfo_for_pid(struct ccx_demuxer *ctx, int pid);
int need_cap_info(struct ccx_demuxer *ctx, int program_number);
int need_cap_info_for_pid(struct ccx_demuxer *ctx, int pid);
struct demuxer_data *get_best_data(struct demuxer_data *data);
struct demuxer_data *get_data_stream(struct demuxer_data *data, int pid);
int get_best_stream(struct ccx_demuxer *ctx);
Expand Down
19 changes: 9 additions & 10 deletions src/lib_ccx/ts_info.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#include "ccx_demuxer.h"
#include "ccx_common_common.h"
#include "lib_ccx.h"
#include "dvb_subtitle_decoder.h"
#include "dvb_subtitle_decoder.h"

/**
We need stream info from PMT table when any of the following Condition meets:
1) Dont have any caption stream registered to be extracted
2) Want a streams per program, and program_number has never been registered
3) We need single stream and its info about codec and buffertype is incomplete
*/
int need_capInfo(struct ccx_demuxer *ctx, int program_number)
int need_cap_info(struct ccx_demuxer *ctx, int program_number)
{
struct cap_info* iter;
struct cap_info* iter;
if(list_empty(&ctx->cinfo_tree.all_stream))
{
return CCX_TRUE;
Expand Down Expand Up @@ -39,7 +39,7 @@ int need_capInfo(struct ccx_demuxer *ctx, int program_number)

void ignore_other_stream(struct ccx_demuxer *ctx, int pid)
{
struct cap_info* iter;
struct cap_info* iter;
list_for_each_entry(iter, &ctx->cinfo_tree.all_stream, all_stream, struct cap_info)
{
if(iter->pid != pid)
Expand Down Expand Up @@ -89,7 +89,7 @@ struct cap_info* get_best_sib_stream(struct cap_info* program)

void ignore_other_sib_stream(struct cap_info* head, int pid)
{
struct cap_info* iter;
struct cap_info* iter;
list_for_each_entry(iter, &head->sib_head, sib_stream, struct cap_info)
{
if(iter->pid != pid)
Expand Down Expand Up @@ -136,9 +136,9 @@ struct demuxer_data *get_data_stream(struct demuxer_data *data, int pid)

return NULL;
}
int need_capInfo_for_pid(struct ccx_demuxer *ctx, int pid)
int need_cap_info_for_pid(struct ccx_demuxer *ctx, int pid)
{
struct cap_info* iter;
struct cap_info* iter;
if(list_empty(&ctx->cinfo_tree.all_stream))
{
return CCX_FALSE;
Expand Down Expand Up @@ -251,7 +251,7 @@ int update_capinfo(struct ccx_demuxer *ctx, int pid, enum ccx_stream_type stream

void dinit_cap (struct ccx_demuxer *ctx)
{
struct cap_info* iter;
struct cap_info* iter;
while(!list_empty(&ctx->cinfo_tree.all_stream))
{
iter = list_entry(ctx->cinfo_tree.all_stream.next, struct cap_info, all_stream);
Expand All @@ -267,7 +267,7 @@ void dinit_cap (struct ccx_demuxer *ctx)

struct cap_info * get_cinfo(struct ccx_demuxer *ctx, int pid)
{
struct cap_info* iter;
struct cap_info* iter;

list_for_each_entry(iter, &ctx->cinfo_tree.all_stream, all_stream, struct cap_info)
{
Expand All @@ -276,4 +276,3 @@ struct cap_info * get_cinfo(struct ccx_demuxer *ctx, int pid)
}
return NULL;
}

4 changes: 2 additions & 2 deletions src/lib_ccx/ts_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ int parse_PMT (struct ccx_demuxer *ctx, unsigned char *buf, int len, struct pro
// program_number , desc[stream_type], stream_type, elementary_PID);
}

if(need_capInfo_for_pid(ctx, elementary_PID) == CCX_TRUE)
if(need_cap_info_for_pid(ctx, elementary_PID) == CCX_TRUE)
{
// We found the user selected CAPPID in PMT. We make a note of its type and don't
// touch anything else
Expand Down Expand Up @@ -655,7 +655,7 @@ int parse_PAT (struct ccx_demuxer *ctx)
* is already there in pinfo array and if we have program number
* already in our array we dont need to update our array
* so we break if program_number already exist and make j != ctx->nb_program
*
*
* Loop without break means j would be equal to ctx->nb_program
*/
for (j = 0; j < ctx->nb_program; j++)
Expand Down