Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

mac cli optical scanning
Wednesday, April 9th, 2008 at 12:18:40pm MDT 

  1. Index: test/test.c
  2. ===================================================================
  3. --- test/test.c (revision 1397)
  4. +++ test/test.c (working copy)
  5. @@ -13,6 +13,10 @@
  6.  #include "hb.h"
  7.  #include "parsecsv.h"
  8.  
  9. +#ifdef __APPLE_CC__
  10. +#import <CoreServices/CoreServices.h>
  11. +#endif
  12. +
  13.  /* Options */
  14.  static int    debug       = HB_DEBUG_NONE;
  15.  static int    update      = 0;
  16. @@ -1641,6 +1645,45 @@
  17.                  break;
  18.              case 'i':
  19.                  input = strdup( optarg );
  20. +                #ifdef __APPLE_CC__
  21. +                    fprintf(stderr, "input was: %s", input);
  22. +                    if( strcmp("/dev/", input) > 0 )
  23. +                    {
  24. +                        OSStatus err;
  25. +                        FSRef ref;
  26. +                        err = FSPathMakeRef( (const UInt8 *) input,
  27. +                                             &ref, NULL );     
  28. +                        if( err != noErr )
  29. +                        {
  30. +                            return 0;
  31. +                        }
  32. +       
  33. +                        // Get the volume reference number.
  34. +                        FSCatalogInfo catalogInfo;
  35. +                        err = FSGetCatalogInfo( &ref, kFSCatInfoVolume, &catalogInfo, NULL, NULL,
  36. +                                                NULL);
  37. +                        if( err != noErr )
  38. +                        {
  39. +                            return 0;
  40. +                        }
  41. +                        FSVolumeRefNum volRefNum = catalogInfo.volume;
  42. +       
  43. +                        // Now let's get the device name
  44. +                        GetVolParmsInfoBuffer volumeParms;
  45. +                        // Let's use FSGetVolumeParms
  46. +                        err = FSGetVolumeParms ( volRefNum, &volumeParms, sizeof( volumeParms ) );
  47. +       
  48. +                        if( err != noErr )
  49. +                        {
  50. +                            return 0;
  51. +                        }
  52. +       
  53. +                        // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the vMDeviceID field.
  54. +                        // It is actually a char * value. This is mentioned in the header CoreServices/CarbonCore/Files.h.
  55. +                        sprintf(input, "/dev/%s", volumeParms.vMDeviceID);
  56. +                    }
  57. +                #endif
  58. +               
  59.                  break;
  60.              case 'o':
  61.                  output = strdup( optarg );
  62. Index: macosx/HandBrake.xcodeproj/project.pbxproj
  63. ===================================================================
  64. --- macosx/HandBrake.xcodeproj/project.pbxproj  (revision 1397)
  65. +++ macosx/HandBrake.xcodeproj/project.pbxproj  (working copy)
  66. @@ -90,6 +90,7 @@
  67.                593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
  68.                59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */ = {isa = PBXBuildFile; fileRef = 59CBD2360BBB44DA004A3BE3 /* parsecsv.c */; };
  69.                59CBD2650BBB4D1B004A3BE3 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
  70. +              74B6022F0DAD226C00C2C8E5 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74B6022E0DAD226C00C2C8E5 /* CoreServices.framework */; };
  71.                A22C85EC0D05D35000C10E36 /* HBPresets.h in Headers */ = {isa = PBXBuildFile; fileRef = A22C85EA0D05D35000C10E36 /* HBPresets.h */; };
  72.                A22C85ED0D05D35100C10E36 /* HBPresets.m in Sources */ = {isa = PBXBuildFile; fileRef = A22C85EB0D05D35000C10E36 /* HBPresets.m */; };
  73.                A25289E60D87A27D00461D5B /* enctheora.c in Sources */ = {isa = PBXBuildFile; fileRef = A25289E50D87A27D00461D5B /* enctheora.c */; };
  74. @@ -258,6 +259,7 @@
  75.                593034E90BBA39A100172349 /* ChapterTitles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChapterTitles.h; sourceTree = "<group>"; };
  76.                593034EA0BBA39A100172349 /* ChapterTitles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChapterTitles.m; sourceTree = "<group>"; };
  77.                59CBD2360BBB44DA004A3BE3 /* parsecsv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parsecsv.c; path = ../test/parsecsv.c; sourceTree = SOURCE_ROOT; };
  78. +              74B6022E0DAD226C00C2C8E5 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
  79.                A22C85EA0D05D35000C10E36 /* HBPresets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPresets.h; sourceTree = "<group>"; };
  80.                A22C85EB0D05D35000C10E36 /* HBPresets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPresets.m; sourceTree = "<group>"; };
  81.                A25289E50D87A27D00461D5B /* enctheora.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = enctheora.c; path = ../libhb/enctheora.c; sourceTree = SOURCE_ROOT; };
  82. @@ -346,6 +348,7 @@
  83.                       isa = PBXFrameworksBuildPhase;
  84.                       buildActionMask = 2147483647;
  85.                       files = (
  86. +                            74B6022F0DAD226C00C2C8E5 /* CoreServices.framework in Frameworks */,
  87.                       );
  88.                       runOnlyForDeploymentPostprocessing = 0;
  89.                };
  90. @@ -476,6 +479,7 @@
  91.                526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */ = {
  92.                       isa = PBXGroup;
  93.                       children = (
  94. +                            74B6022E0DAD226C00C2C8E5 /* CoreServices.framework */,
  95.                              0DF377970B7BF99A00115CB0 /* fakexcode.cpp */,
  96.                              526FBC760B4CA8F40064E04C /* test.c */,
  97.                              59CBD2360BBB44DA004A3BE3 /* parsecsv.c */,

Paste Details

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation