Skip to content

Conversation

@squarebracket
Copy link
Contributor

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

This is a simple change to allow for binding to source-specific multicast UDP feeds.

I've modified the GUI to allow for enough characters to bind to a SSM address, but it doesn't seem to work, even for simple UDP feeds. Can anyone confirm that the GUI works with UDP?

Also, I tried to validate that it works with Windows, but was unable. I see the packets in wireshark, but all of ccextractor, vlc, and mpv do not seem to get anything. If someone with more Windows-fu can validate that would be great.

@cfsmp3 cfsmp3 requested a review from Izaron November 1, 2017 22:50
LLONG debug_mask; // dbg_print will use this mask to print or ignore different types
LLONG debug_mask_on_debug; // If we're using temp_debug to enable/disable debug "live", this is the mask when temp_debug=1
/* Networking */
char *udpsrc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check surrounding indentation

case CCX_DS_NETWORK:
if (ccx_options.udpaddr == NULL)
if (ccx_options.udpsrc != NULL)
mprint ("Network, %s@%s:%d", ccx_options.udpsrc, ccx_options.udpaddr, ccx_options.udpport);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

udpaddr could be null, first check for null or in if add condition

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow. Is params_dump.c used without params.c being called? Unless I messed up the parameter parsing, if you have a udpsrc you must have a udpaddr -- even if it's just \0 -- so you won't end up in a condition where udpaddr is null if udpsrc is not also null.

Of course, if there's a path to params_dump.c which doesn't first use params.c, then yeah it might be null, but I'm assuming that's not the case.

/* Network stuff */
if (strcmp (argv[i],"-udp")==0 && i<argc-1)
{
char *at = strchr(argv[i + 1], '@');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look for surrounding indentation

group.imr_multiaddr.s_addr = htonl(addr);
group.imr_interface.s_addr = htonl(INADDR_ANY);
if (setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group)) < 0)
int setsockopt_return = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look for surrounding indentation

@anshul1912
Copy link
Contributor

One of the build error I see is "/usr/bin/ld: cannot find -lz"

@saurabhshri
Copy link
Member

@anshul1912 You probably are using cmake to build. Earlier we were using zlib installed in the environment, hence that flag was required. Now we are using the supplied ones so that flag probably is obsolete. Could you try building again after removing this line : https://github.com/CCExtractor/ccextractor/blob/master/src/CMakeLists.txt#L86 ?

@squarebracket
Copy link
Contributor Author

Agh, tab spacing :( will fix

@squarebracket
Copy link
Contributor Author

whitespace issues are fixed

case CCX_DS_NETWORK:
if (ccx_options.udpaddr == NULL)
if (ccx_options.udpsrc != NULL)
mprint ("Network, %s@%s:%d", ccx_options.udpsrc, ccx_options.udpaddr, ccx_options.udpport);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for ccx_options.udpaddr to be null is still missing.
I would suggest to put (ccx_options.udpsrc != NULL) in else if that would make sure if (ccx_options.udpaddr == NULL) has failed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my reply to your previous comment, which was hidden due to white space changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my reply to your previous comment, which was hidden due to white space changes.

@anshul1912
Copy link
Contributor

@squarebracket : Sorry for incovinence, I arrpove your changes.
Windows and linux difference of outputs test have not passed, can you please sync up with Willem and run them manually

@canihavesomecoffee
Copy link
Member

@squarebracket If you'd make one small change (e.g. add your improvement to the changelog) and push that, the tests should be run again, and then we can see how it's impacting the program 👍

@squarebracket
Copy link
Contributor Author

Should I just add it as Unreleased?

@canihavesomecoffee
Copy link
Member

Just add it on the next version number or so :)

@squarebracket
Copy link
Contributor Author

build errors are due to the python api stuff. I'd already preparing a PR to fix the build system to not break from the python stuff, would you like me to submit that first?

@canihavesomecoffee
Copy link
Member

That would be awesome 👍

@cfsmp3
Copy link
Contributor

cfsmp3 commented Dec 23, 2017

Please reopen (or better, send a new PR) when the build errors are fixed. Other than that the changes seem reasonable.

@cfsmp3 cfsmp3 closed this Dec 23, 2017
@squarebracket
Copy link
Contributor Author

squarebracket commented Dec 23, 2017

Build errors are unrelated to changes; the changes to the python API I'm talking about above are due to the currently broken automake caused by missing python symbols when building the code. Those I will submit in a different PR, since they are entirely unrelated to these changes.

@cfsmp3 cfsmp3 reopened this Dec 24, 2017
@cfsmp3 cfsmp3 merged commit 59b8f81 into CCExtractor:master Dec 24, 2017
hrideshmg pushed a commit to hrideshmg/ccextractor that referenced this pull request Mar 12, 2025
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.5 to 7.2.6.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](coveragepy/coveragepy@7.2.5...7.2.6)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Willem <github@canihavesome.coffee>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants